diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a20eed63d..a49788c0fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,9 +69,9 @@ set(TITLE_SEQUENCE_VERSION "0.4.14") set(TITLE_SEQUENCE_URL "https://github.com/OpenRCT2/title-sequences/releases/download/v${TITLE_SEQUENCE_VERSION}/title-sequences.zip") set(TITLE_SEQUENCE_SHA1 "6c04781b959b468e1f65ec2d2f21f5aaa5e5724d") -set(OBJECTS_VERSION "1.5.1") +set(OBJECTS_VERSION "1.6.1") set(OBJECTS_URL "https://github.com/OpenRCT2/objects/releases/download/v${OBJECTS_VERSION}/objects.zip") -set(OBJECTS_SHA1 "e922b9fd779e7752176f1d0d8766c2ee6ad1e41b") +set(OBJECTS_SHA1 "749a9df9ed728676ef7c3b87c8a6b813069476d3") set(OPENSFX_VERSION "1.0.5") set(OPENSFX_URL "https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v${OPENSFX_VERSION}/opensound.zip") diff --git a/contributors.md b/contributors.md index 007ba77088..7de294e982 100644 --- a/contributors.md +++ b/contributors.md @@ -249,6 +249,7 @@ Appreciation for contributors who have provided substantial work, but are no lon * Brendan Heinonen (staticinvocation) * (QuestionableDeer) * David Sungaila (sungaila) +* Garrett Leach (GarrettLeach) ## Toolchain * (Balletie) - macOS @@ -270,6 +271,7 @@ Appreciation for contributors who have provided substantial work, but are no lon * Mithun Hunsur (Philpax) * (RollingStar) * (That Human Being) +* Alex Marck (ATMarcks) ## Translation * Extracting from original files: Ted John (IntelOrca) diff --git a/data/language/ar-EG.txt b/data/language/ar-EG.txt index 83543c6d69..ccfee27e6b 100644 --- a/data/language/ar-EG.txt +++ b/data/language/ar-EG.txt @@ -2258,10 +2258,6 @@ STR_3252 :Can’t increase maximum loan size any further! STR_3253 :Can’t reduce maximum loan size any further! STR_3254 :Can’t increase interest rate any further! STR_3255 :Can’t reduce interest rate any further! -STR_3256 :Guests prefer less intense rides -STR_3257 :Select whether guests should generally prefer less intense rides only -STR_3258 :Guests prefer more intense rides -STR_3259 :Select whether guests should generally prefer more intense rides only STR_3260 :{WINDOW_COLOUR_2}Cash per guest (average): STR_3261 :{WINDOW_COLOUR_2}Guests initial happiness: STR_3262 :{WINDOW_COLOUR_2}Guests initial hunger: diff --git a/data/language/ca-ES.txt b/data/language/ca-ES.txt index 7ce0cd6d24..517fea5d61 100644 --- a/data/language/ca-ES.txt +++ b/data/language/ca-ES.txt @@ -337,8 +337,8 @@ STR_0938 :Modifica l’altura i inclinació del terreny STR_0939 :Vista subterrània/interior STR_0940 :Oculta el terreny de base STR_0941 :Oculta les parets verticals -STR_0942 :Veu a través de les atraccions -STR_0943 :Veu a través de les decoracions +STR_0942 :Mostra a través de les atraccions +STR_0943 :Mostra a través de les decoracions STR_0944 :Desa STR_0945 :No desis STR_0946 :Cancel·la @@ -746,7 +746,7 @@ STR_1348 :{WINDOW_COLOUR_2}Acceleració màxima vertical positiva: {BLACK}{CO STR_1349 :{WINDOW_COLOUR_2}Acceleració màxima vertical positiva: {OUTLINE}{RED}{COMMA2DP32} g STR_1350 :{WINDOW_COLOUR_2}Acceleració màxima vertical negativa: {BLACK}{COMMA2DP32} g STR_1351 :{WINDOW_COLOUR_2}Acceleració màxima vertical negativa: {OUTLINE}{RED}{COMMA2DP32} g -STR_1352 :{WINDOW_COLOUR_2}Acceleració màxima lateral: {BLACK}{COMMA2DP32}g +STR_1352 :{WINDOW_COLOUR_2}Acceleració màxima lateral: {BLACK}{COMMA2DP32} g STR_1353 :{WINDOW_COLOUR_2}Acceleració màxima lateral: {OUTLINE}{RED}{COMMA2DP32} g STR_1354 :{WINDOW_COLOUR_2}Longitud de la caiguda més gran: {BLACK}{LENGTH} STR_1355 :{WINDOW_COLOUR_2}Caigudes: {BLACK}{COMMA16} @@ -1248,7 +1248,6 @@ STR_1870 :Nombre de voltes completes STR_1871 :{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{POP16}{COMMA16} STR_1873 :{WINDOW_COLOUR_2}Ingressos: {BLACK}{CURRENCY2DP} per hora STR_1874 :{WINDOW_COLOUR_2}Benefici: {BLACK}{CURRENCY2DP} per hora -STR_1875 :{BLACK} {SPRITE}{BLACK} {STRINGID} STR_1876 :{WINDOW_COLOUR_2}{INLINE_SPRITE}{251}{19}{00}{00}Inspecciona atraccions STR_1877 :{WINDOW_COLOUR_2}{INLINE_SPRITE}{252}{19}{00}{00}Repara atraccions STR_1878 :{WINDOW_COLOUR_2}Inspecciona: @@ -2169,7 +2168,6 @@ STR_3136 :Avís: Aquest disseny es construirà amb un tipus de vehicle altern STR_3137 :Trieu decorat proper STR_3138 :Restableix la selecció STR_3139 :El cable d’elevació no pot funcionar en aquest mode. -STR_3140 :El cable d’elevació ha de començar immediatament després de l’andana. STR_3141 :No es pot establir un multicircuit si l’atracció té cable d’elevació. STR_3142 :{WINDOW_COLOUR_2}Capacitat: {BLACK}{STRINGID} STR_3143 :Mostra gent al mapa @@ -2201,7 +2199,7 @@ STR_3188 :Senyals de camí STR_3189 :Camins (versions clàssiques) STR_3190 :Extres dels camins STR_3191 :Grups de decoracions -STR_3192 :Entrada al parc +STR_3192 :Entrades del parc STR_3193 :Aigua STR_3195 :Llista de recerques STR_3196 :{WINDOW_COLOUR_2}Grup de recerca: {BLACK}{STRINGID} @@ -2264,10 +2262,6 @@ STR_3252 :El préstec màxim no es pot augmentar més! STR_3253 :El préstec màxim no es pot reduir més! STR_3254 :La taxa d’interès anual no es pot augmentar més! STR_3255 :La taxa d’interès anual no es pot reduir més! -STR_3256 :Els visitants prefereixen atraccions menys intenses -STR_3257 :Trieu si els visitants haurien de preferir només les atraccions menys intenses. -STR_3258 :Els visitants prefereixen atraccions més intenses -STR_3259 :Trieu si els visitants haurien de preferir només les atraccions més intenses. STR_3260 :{WINDOW_COLOUR_2}Efectiu per visitant (mitjana): STR_3261 :{WINDOW_COLOUR_2}Felicitat inicial dels visitants: STR_3262 :{WINDOW_COLOUR_2}Gana inicial dels visitants: @@ -2608,7 +2602,7 @@ STR_5368 :Esborra historial d’accidents STR_5371 :Selecció d’objectes STR_5372 :Inverteix el desplaçament amb el ratolí STR_5373 :Nom {STRINGID} -STR_5374 :Data {STRINGID} +STR_5374 :Data de modificació {STRINGID} STR_5375 :▲ STR_5376 :▼ STR_5404 :El nom ja existeix. @@ -3025,7 +3019,7 @@ STR_5907 :Quan s’activa, l’apropament es farà respecte la posició del c STR_5908 :Permet canvis de tipus de via arbitraris STR_5909 :Permet canviar el tipus d’atracció lliurement. Pot causar fallades del joc. STR_5910 :Aplica -STR_5911 :Veu a través dels camins +STR_5911 :Mostra a través dels camins STR_5912 :Alterna veure a través dels camins STR_5913 :Xat STR_5914 :Atracció desconeguda @@ -3099,7 +3093,7 @@ STR_5981 :No és un cartell STR_5982 :Tipus de decoració gran: {BLACK}{COMMA16} STR_5983 :Id de peça d’escenari gran: {BLACK}{COMMA16} STR_5984 :Camins blocats: -STR_5985 :Nova carpeta +STR_5985 :Carpeta nova STR_5986 :Escriviu el nom de la carpeta nova STR_5987 :La carpeta no s’ha pogut crear. STR_5988 :No hi ha més terrenys a la venda. @@ -3219,7 +3213,7 @@ STR_6102 :El valor de les atraccions no disminuirà amb el pas del temps, de STR_6103 :Aquesta opció està desactivada si es juga en xarxa. STR_6105 :Hipermuntanya russa STR_6107 :Monster Trucks -STR_6109 :Hiper-Twister +STR_6109 :Muntanya russa Hyper-Twister STR_6111 :Minimuntanya russa clàssica STR_6113 :Una muntanya russa alta sense inversions, amb llargues caigudes, alta velocitat, vagons còmodes i amb només unes barres de subjecció. STR_6115 :Camions 4x4 gegants i autopropulsats que poden pujar per pendents empinades. @@ -3533,9 +3527,9 @@ STR_6467 :Nàusea: {COMMA2DP32} STR_6468 :Desconegut/da STR_6469 :Ajusta una àrea de treball més petita. STR_6470 :Ajusta una àrea de treball més gran. -STR_6471 :Veu a través de la vegetació -STR_6472 :Veu a través dels vehicles -STR_6473 :Veu a través dels suports +STR_6471 :Mostra a través de la vegetació +STR_6472 :Mostra a través dels vehicles +STR_6473 :Mostra a través dels suports STR_6474 :Visitants invisibles STR_6475 :Empleats invisibles STR_6476 :Vegetació invisible @@ -3773,3 +3767,43 @@ STR_6707 :(cap de seleccionat) STR_6708 :Força suau STR_6709 :Escriviu una força suau entre {COMMA16} i {COMMA16} STR_6710 :Ordre estable +STR_6711 :Nom de fitxer: +STR_6712 :Desa +STR_6713 :{COMMA32} {STRINGID} +STR_6714 :Nom del fitxer +STR_6715 :Data de modificació +STR_6716 :Mida de fitxer +STR_6717 :Mida de fitxer {STRINGID} +STR_6718 :Animacions de les persones +STR_6719 :Cal triar com a mínim una animació de visitant. +STR_6720 :Cal triar com a mínim una animació de personal de neteja. +STR_6721 :Cal triar com a mínim una animació de mecànic. +STR_6722 :Cal triar com a mínim una animació de guarda de seguretat. +STR_6723 :Cal triar com a mínim una animació d’animador. +STR_6724 :Textos d’escenari +STR_6725 :X: +STR_6726 :Y: +STR_6727 :Dive loop (esquerra) +STR_6728 :Dive Loop (dreta) +STR_6729 :El cable d’elevació ha de començar immediatament després de l’andana o d’un bloc de frens. +STR_6730 :Exporta dades d’emscripten +STR_6731 :Importa dades d’emscripten +STR_6732 :Mostra un botó a la barra d’eines per a girar la vista en sentit antihorari. +STR_6733 :Mostra a través +STR_6734 :Els elements del mapa que estiguin a l’alçària de tall o per sobre d’aquesta es mostren translúcids. +STR_6735 :Vés a la carpeta superior +STR_6736 :Vista prèvia +STR_6737 :No hi ha vista prèvia disponible +STR_6738 :{WINDOW_COLOUR_2}Valoració del parc: {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}Data: {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}Efectiu: {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}Nre. atraccions: {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}Nre. visitants: {BLACK}{UINT16} +STR_6743 :Clima +STR_6744 :{WINDOW_COLOUR_2}{UINT16} % +STR_6745 :{WINDOW_COLOUR_2}Preferències d’intensitat dels visitants: +STR_6746 :Sense preferències +STR_6747 :Les preferències varien (per defecte) +STR_6748 :Només les atraccions menys intenses +STR_6749 :Només les atraccions més intenses +STR_6750 :Trieu quin tipus d’intensitat d’atraccions han de preferir els visitants nous. diff --git a/data/language/cs-CZ.txt b/data/language/cs-CZ.txt index 859bb669a0..6fdbef70e1 100644 --- a/data/language/cs-CZ.txt +++ b/data/language/cs-CZ.txt @@ -2260,10 +2260,6 @@ STR_3252 :Nelze zvýšit maximální půjčku! STR_3253 :Nelze snížit maximální půjčku! STR_3254 :Nelze zvýšit úrok půjčky! STR_3255 :Nelze snížit úrok půjčky! -STR_3256 :Návštěvníci preferují mírnější atrakce -STR_3257 :Vyberte, zda návštěvníci mají obecně preferovat jen mírnější atrakce -STR_3258 :Návštěvníci preferují divočejší atrakce -STR_3259 :Vyberte, zda návštěvníci mají obecně preferovat jen divočejší atrakce STR_3260 :{WINDOW_COLOUR_2}Průměrná hotovost návštěvníků: STR_3261 :{WINDOW_COLOUR_2}Počáteční nálada návštěvníků: STR_3262 :{WINDOW_COLOUR_2}Počáteční hlad návštěvníků: diff --git a/data/language/da-DK.txt b/data/language/da-DK.txt index 165a80abf0..8bbe0cd96b 100644 --- a/data/language/da-DK.txt +++ b/data/language/da-DK.txt @@ -1740,7 +1740,7 @@ STR_2392 :{BLACK}At opnå en månedlig indkomst fra forlystelser på mindst { STR_2393 :{BLACK}At have 10 forskellige typer rutschebaner i gang i parken på samme tid, hver med en minimums længde på {LENGTH}, og en spændings vurdering på mindst 7.00 STR_2394 :{BLACK}At færdiggøre alle 5 af de delvist færdige byggede rutschebaner i denne park, design dem til at have at opnå en spændings vurdering på mindst {POP16}{POP16}{COMMA2DP32} hver STR_2395 :{BLACK}At tilbagebetale dit lån og opnå en park vurdering på mindst {POP16}{POP16}{CURRENCY} -STR_2396 :{BLACK}At opnå en månedlig profit far mad, drikkevarer og merchandise salg på mindst {POP16}{POP16}{CURRENCY} +STR_2396 :{BLACK}At opnå en månedlig profit for mad, drikkevarer og merchandise salg på mindst {POP16}{POP16}{CURRENCY} STR_2397 :Ingen STR_2398 :Antal gæster ved en given dato STR_2399 :Park værdi ved en given dato @@ -2259,10 +2259,6 @@ STR_3252 :Kan ikke forøge maksimum lånestørrelse yderligere! STR_3253 :Kan ikke reducere maksimum lånestørrelse yderligere! STR_3254 :Kan ikke forøge rentesats yderligere! STR_3255 :Kan ikke reducere rentesats yderligere! -STR_3256 :Gæster foretrækker mindre intense forlystelser -STR_3257 :Vælg om gæster generelt foretrækker mindre intense forlystelser -STR_3258 :Gæster foretrækker mere intense forlystelser -STR_3259 :Vælg om gæster generelt foretrækker mere intense forlystelser STR_3260 :{WINDOW_COLOUR_2}Penge per gæst (gennemsnit): STR_3261 :{WINDOW_COLOUR_2}Gæsters start-glæde: STR_3262 :{WINDOW_COLOUR_2}Gæsters start-sult: diff --git a/data/language/de-DE.txt b/data/language/de-DE.txt index 163477d238..96f4650deb 100644 --- a/data/language/de-DE.txt +++ b/data/language/de-DE.txt @@ -99,6 +99,8 @@ STR_0094 :Einschienenachterbahn STR_0095 :Alpenachterbahn STR_0096 :Klassische Holzachterbahn STR_0097 :Klassische Stehachterbahn +STR_0098 :LSM-Achterbahn +STR_0099 :Klassische Holztwisterachterbahn STR_0512 :Eine kompakte Stahlachterbahn mit einem Spirallifthügel und Wagen mit Sitzen in einer Reihe STR_0513 :Eine Looping-Achterbahn, bei der sich die Fahrgäste in einer stehenden Position befinden STR_0514 :Die unterhalb der Schiene aufgehängten Züge schwingen in Kurven seitlich aus. @@ -183,6 +185,8 @@ STR_0604 :Die Fahrgäste fahren in einer Einzelreihe auf einer engen Einschie STR_0605 :Die Fahrgäste rodeln eine sich schlängelnde Stahlbahn hinunter und bremsen, um ihre Geschwindigkeit zu regulieren STR_0606 :Eine Holzachterbahn nach älterer Art. Sie ist schnell, rau, laut und gibt einem das Gefühl, außer Kontrolle zu sein, wobei man gelegentlich seitlichen Gs ausgesetzt und häufig „in der Luft“ ist STR_0607 :Eine intensive Stahl-Looping-Achterbahn älterer Art, bei der die Fahrer im Stehen fahren +STR_0608 :Die Achterbahnzüge werden von linearen Synchronmotoren angetrieben und rasen durch enge Windungen und Kurven +STR_0609 :Eine Holzachterbahn der älteren Bauart mit einer schnellen und ruppigen Fahrt mit Gelenkzügen, viel Zeit „in der Luft“ und einer sich windenden Strecke STR_0767 :Besucher {INT32} STR_0768 :Parkpfleger {INT32} STR_0769 :Mechaniker {INT32} @@ -2164,7 +2168,6 @@ STR_3136 :Warnung: Dieser Entwurf wird mit einer alternativen Fahrzeugart geb STR_3137 :Nahe Szenerie auswählen STR_3138 :Auswahl zurücksetzen STR_3139 :Kabellift funktioniert nicht in diesem Betriebsmodus -STR_3140 :Kabellifthügel muss direkt nach der Station beginnen STR_3141 :Mehrere Runden bei Kabellifthügel nicht möglich STR_3142 :{WINDOW_COLOUR_2}Fassungsvermögen: {BLACK}{STRINGID} STR_3143 :Personen auf Karte anzeigen @@ -2196,7 +2199,7 @@ STR_3188 :Fußwegschilder STR_3189 :Legacy-Fußwege STR_3190 :Fußwegextras STR_3191 :Szeneriegruppen -STR_3192 :Parkeingang +STR_3192 :Parkeingänge STR_3193 :Wasser STR_3195 :Erfindungsliste STR_3196 :{WINDOW_COLOUR_2}Forschungsgruppe: {BLACK}{STRINGID} @@ -2259,10 +2262,6 @@ STR_3252 :Maximales Darlehen kann nicht{NEWLINE}weiter erhöht werden! STR_3253 :Maximales Darlehen kann nicht{NEWLINE}weiter reduziert werden! STR_3254 :Zinsrate kann nicht weiter{NEWLINE}erhöht werden! STR_3255 :Zinsrate kann nicht weiter{NEWLINE}reduziert werden! -STR_3256 :Weniger aufregende Bahnen bevorzugt -STR_3257 :Wählen Sie aus, ob die Besucher im Allgemeinen weniger aufregende{NEWLINE}Bahnen vorziehen -STR_3258 :Aufregendere Bahnen bevorzugt -STR_3259 :Wählen Sie aus, ob die Besucher im Allgemeinen aufregendere{NEWLINE}Bahnen vorziehen STR_3260 :{WINDOW_COLOUR_2}Durchschnittliches Geld pro Besucher: STR_3261 :{WINDOW_COLOUR_2}Vergnügen der Besucher zu Beginn: STR_3262 :{WINDOW_COLOUR_2}Hunger der Besucher zu Beginn: @@ -2600,7 +2599,7 @@ STR_5368 :Unfallstatus entf. STR_5371 :Objektauswahl STR_5372 :Ziehen mit rechter Maustaste umkehren STR_5373 :Name {STRINGID} -STR_5374 :Datum {STRINGID} +STR_5374 :Änderungsdatum {STRINGID} STR_5375 :▲ STR_5376 :▼ STR_5404 :Dieser Name existiert bereits @@ -3591,7 +3590,7 @@ STR_6537 :Normale Fußwege als Warteschlangen erlauben STR_6538 :Zeigt normale Fußwege in der Warteschlangenliste im Fußwegfenster an STR_6539 :Bremse geschlossen STR_6540 :{WINDOW_COLOUR_2}Besonderen Dank an die folgenden Unternehmen für die Gestattung der Verwendung ihrer Abbilder: -STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG +STR_6541 :{WINDOW_COLOUR_2}Rocky Mountain Construction Group, Josef Wiegand GmbH & Co. KG, Intamin Amusement Rides Int. Corp. Est. STR_6542 :Mitwirkende STR_6543 :Mitwirkende … STR_6544 :Darlehen kann nicht negativ sein! @@ -3760,3 +3759,44 @@ STR_6706 :{WINDOW_COLOUR_2}Aktuelle Bilddatei: {BLACK}{STRING} STR_6707 :(keine ausgewählt) STR_6708 :Weiche Stärke STR_6709 :Weiche Stärke zwischen {COMMA16} und {COMMA16} eingeben +STR_6710 :Stabile Sortierung +STR_6711 :Dateiname: +STR_6712 :Speichern +STR_6713 :{COMMA32} {STRINGID} +STR_6714 :Dateiname +STR_6715 :Änderungsdatum +STR_6716 :Dateigröße +STR_6717 :Dateigröße {STRINGID} +STR_6718 :Besucheranimationen +STR_6719 :Es muss mindestens ein Besucher-Peep-Animationsobjekt ausgewählt sein +STR_6720 :Es muss mindestens ein Parkpfleger-Peep-Animationsobjekt ausgewählt sein +STR_6721 :Es muss mindestens ein Mechaniker-Peep-Animationsobjekt ausgewählt sein +STR_6722 :Es muss mindestens ein Aufseher-Peep-Animationsobjekt ausgewählt sein +STR_6723 :Es muss mindestens ein Entertainer-Peep-Animationsobjekt ausgewählt sein +STR_6724 :Szenariotexte +STR_6725 :X: +STR_6726 :Y: +STR_6727 :Sturzflugschleife (links) +STR_6728 :Sturzflugschleife (rechts) +STR_6729 :Kabellifthügel muss direkt nach der Station oder einer Blockbremse beginnen +STR_6730 :Emscripten-Daten exportieren +STR_6731 :Emscripten-Daten importieren +STR_6732 :Einen Knopf in der Werkzeugleiste anzeigen, um die Ansicht entgegen dem Uhrzeigersinn zu rotieren +STR_6733 :Durchsichtig +STR_6734 :Kartenelemente, welche sich an oder oberhalb der Schnitthöhe befinden, werden transluzent angezeigt +STR_6735 :Hoch zum übergeordnetem Ordner gehen +STR_6736 :Vorschau +STR_6737 :Keine Vorschau verfügbar +STR_6738 :{WINDOW_COLOUR_2}Parkbewertung: {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}Datum: {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}Geld: {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}Anz. Fahrgeschäfte: {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}Anz. Besucher: {BLACK}{UINT16} +STR_6743 :Klima +STR_6744 :{WINDOW_COLOUR_2}{UINT16}% +STR_6745 :{WINDOW_COLOUR_2}Intensitätspräferenzen der Besucher: +STR_6746 :Keine Präferenzen +STR_6747 :Präferenzen variieren (Standard) +STR_6748 :Nur weniger intensive Fahrgeschäfte +STR_6749 :Nur intensivere Fahrgeschäfte +STR_6750 :Auswählen, welche Art von Fahrgeschäft die neu erzeugten Besucher bevorzugen. diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index cdb641d0bb..8fda3ff305 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -2260,14 +2260,10 @@ STR_3252 :Can’t increase maximum loan size any further! STR_3253 :Can’t reduce maximum loan size any further! STR_3254 :Can’t increase interest rate any further! STR_3255 :Can’t reduce interest rate any further! -STR_3256 :Guests prefer less intense rides -STR_3257 :Select whether guests should generally prefer less intense rides only -STR_3258 :Guests prefer more intense rides -STR_3259 :Select whether guests should generally prefer more intense rides only STR_3260 :{WINDOW_COLOUR_2}Cash per guest (average): -STR_3261 :{WINDOW_COLOUR_2}Guests initial happiness: -STR_3262 :{WINDOW_COLOUR_2}Guests initial hunger: -STR_3263 :{WINDOW_COLOUR_2}Guests initial thirst: +STR_3261 :{WINDOW_COLOUR_2}Guests’ initial happiness: +STR_3262 :{WINDOW_COLOUR_2}Guests’ initial hunger: +STR_3263 :{WINDOW_COLOUR_2}Guests’ initial thirst: STR_3264 :Can’t increase this any further! STR_3265 :Can’t reduce this any further! STR_3266 :Select how this park charges for entrance and rides @@ -3794,3 +3790,19 @@ STR_6732 :Show a button in the toolbar to rotate the view anti-clockwise STR_6733 :See-Through STR_6734 :Map elements that are at or above the cutting height are rendered translucent. STR_6735 :Go up to parent folder +STR_6736 :Preview +STR_6737 :No preview available +STR_6738 :{WINDOW_COLOUR_2}Park rating: {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}Date: {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}Cash: {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}Num. rides: {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}Num. guests: {BLACK}{UINT16} +STR_6743 :Climate +STR_6744 :{WINDOW_COLOUR_2}{UINT16}% +STR_6745 :{WINDOW_COLOUR_2}Guests’ intensity preferences: +STR_6746 :No preferences +STR_6747 :Preferences vary (default) +STR_6748 :Only less intense rides +STR_6749 :Only more intense rides +STR_6750 :Select what kind of ride intensity newly spawned guests prefer. +STR_6751 :Queue paths cannot be used for level crossings! diff --git a/data/language/en-US.txt b/data/language/en-US.txt index d4e7cb53f3..a43c08351e 100644 --- a/data/language/en-US.txt +++ b/data/language/en-US.txt @@ -231,8 +231,15 @@ STR_6274 :Can’t set color scheme… STR_6307 :Color scheme: {BLACK}{STRINGID} STR_6328 :With this option enabled, giant screenshots will have a transparent background instead of the default black color. STR_6501 :Random color +STR_6529 :Invalid color scheme parameter! +STR_6575 :Allow special color schemes +STR_6576 :Adds special colors to color dropdown STR_6625 :Invalid color STR_6629 :Align toolbar buttons horizontally centered STR_6630 :This setting will align the toolbar buttons horizontally in the center of the screen. The traditional way of aligning them is in the left and right corner. + +STR_6661 :Randomize all +STR_6662 :Randomize colors for every train or vehicle + STR_6732 :Show a button in the toolbar to rotate the view counterclockwise diff --git a/data/language/eo-ZZ.txt b/data/language/eo-ZZ.txt index e74b5de3d9..b90db74ad5 100644 --- a/data/language/eo-ZZ.txt +++ b/data/language/eo-ZZ.txt @@ -2260,10 +2260,6 @@ STR_3252 :Ne eblas pliigi maksimuman prunton plu! STR_3253 :Ne eblas malpliigi maksimuman prunton plu! STR_3254 :Ne eblas pliigi procenton de interezo plu! STR_3255 :Ne eblas malpliigi procenton de interezo plu! -STR_3256 :Gastoj preferas malpli intensajn atrakciojn -STR_3257 :Elekti ĉu gastoj kutime preferas nur malpli intensajn atrakciojn -STR_3258 :Gastoj preferas pli intensajn atrakciojn -STR_3259 :Elekti ĉu gastoj kutime preferas nur pli intensajn atrakciojn STR_3260 :{WINDOW_COLOUR_2}Mono por ĉiu gasto (meznombro): STR_3261 :{WINDOW_COLOUR_2}Komenca feliĉeco de gastoj: STR_3262 :{WINDOW_COLOUR_2}Komenca malsateco de gastoj: @@ -3285,7 +3281,7 @@ STR_6199 :Agordi daton STR_6200 :Rekomencigi daton STR_6201 :{MONTH} STR_6202 :Stilo de virtuala planko: -STR_6203 :Se ŝaltita, virtuala planko bildiĝos per premteni Ctrl aŭ Shift, por faciligi vertikalan lokadon de elementoj. +STR_6203 :Se ŝaltita, virtuala planko bildigos per premteni Ctrl aŭ Shift, por faciligi vertikalan lokadon de elementoj. STR_6215 :Konstruado STR_6216 :Funkciado STR_6217 :Havebleco de atrakcio / trako @@ -3365,7 +3361,7 @@ STR_6302 :Kopii la tutan liston da mankantaj objektoj al la tondujo. STR_6303 :Elŝuti objekton ({COMMA16} / {COMMA16}): [{STRING}] STR_6304 :Malfermi elektilon de pejzaĝo STR_6305 :Disfadenigo -STR_6306 :Opcio eksperimenta por uzi multoblajn fadenojn por bildiĝi. Povas kaŭzi nestabilecon. +STR_6306 :Opcio eksperimenta por uzi multoblajn fadenojn por bildigi. Povas kaŭzi nestabilecon. STR_6307 :Kolorskemo: {BLACK}{STRINGID} STR_6308 :{TOPAZ}“{STRINGID}{OUTLINE}{TOPAZ}”{NEWLINE}{STRINGID} STR_6309 :Rekonektiĝi @@ -3788,4 +3784,22 @@ STR_6728 :Plonĝlopo (dekstre) STR_6729 :Kablolifto-monteto devas komenci tuj post stacio aŭ bremso de blokparto STR_6730 :Eksporti datumojn de emscripten STR_6731 :Importi datumojn de emscripten -STR_6732 :Montri butonon en la ilobreto por turni la vidon maldekstrumen \ No newline at end of file +STR_6732 :Montri butonon en la ilobreto por turni la vidon maldekstrumen +STR_6733 :Travideblo +STR_6734 :Mapelementoj ĉe aŭ sub la tranĉita alteco estas bildigitaj travideble. +STR_6735 :Supreniri al patra dosierulo +STR_6736 :Antaŭrigardo +STR_6737 :Neniu antaŭrigardo disponebla +STR_6738 :{WINDOW_COLOUR_2}Pritakso de parko: {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}Dato: {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}Mono: {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}Nombro de atrakcioj: {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}Nombro de gastoj: {BLACK}{UINT16} +STR_6743 :Klimato +STR_6744 :{WINDOW_COLOUR_2}{UINT16}% +STR_6745 :{WINDOW_COLOUR_2}Intenseco-preferoj de gastoj: +STR_6746 :Neniuj preferoj +STR_6747 :Preferoj varias (defaŭlto) +STR_6748 :Nur malpli intensaj atrakcioj +STR_6749 :Nur pli intensaj atrakcioj +STR_6750 :Elekti kian atrakcio-intensecon, ke nove generitaj gastoj preferas. diff --git a/data/language/es-ES.txt b/data/language/es-ES.txt index 53ed3aab56..735d464cc8 100644 --- a/data/language/es-ES.txt +++ b/data/language/es-ES.txt @@ -2262,10 +2262,6 @@ STR_3252 :¡No se puede incrementar más el préstamo máximo! STR_3253 :¡No se puede reducir más el préstamo máximo! STR_3254 :¡No se puede incrementar más la tasa de interés! STR_3255 :¡No se puede reducir más la tasa de interés! -STR_3256 :Visitantes prefieren atracciones tranquilas -STR_3257 :Los visitantes prefieren atracciones de baja intensidad normalmente -STR_3258 :Visitantes prefieren atracciones intensas -STR_3259 :Los visitantes prefieren atracciones de alta intensidad normalmente STR_3260 :{WINDOW_COLOUR_2}Efectivo por visitante (media): STR_3261 :{WINDOW_COLOUR_2}Felicidad inicial de visitantes: STR_3262 :{WINDOW_COLOUR_2}Hambre inicial de visitantes: diff --git a/data/language/fi-FI.txt b/data/language/fi-FI.txt index 6a67f76d39..0d467e46f4 100644 --- a/data/language/fi-FI.txt +++ b/data/language/fi-FI.txt @@ -2264,10 +2264,6 @@ STR_3252 :Enimmäislainamäärää ei voi korottaa enempää! STR_3253 :Enimmäislainamäärää ei voi laskea enempää! STR_3254 :Vuosittaiskorkoa ei voi korottaa enempää! STR_3255 :Vuosittaiskorkoa ei voi laskea enempää! -STR_3256 :Kävijät tykkäävät lempeämmistä laitteista -STR_3257 :Valitse haluavatko kävijät mieluummin mennä vain vähemmän jännittäviin laitteisiin -STR_3258 :Kävijät tykkäävät jännittävimmistä laitteista -STR_3259 :Valitse haluavatko kävijät mieluummin mennä vain kaikista jännittävimpiin laitteisiin STR_3260 :{WINDOW_COLOUR_2}Kävijöiden varat (keskiarvo): STR_3261 :{WINDOW_COLOUR_2}Kävijöiden alustava iloisuus: STR_3262 :{WINDOW_COLOUR_2}Kävijöiden alustava nälkä: diff --git a/data/language/fr-FR.txt b/data/language/fr-FR.txt index 690f11684e..a837704595 100644 --- a/data/language/fr-FR.txt +++ b/data/language/fr-FR.txt @@ -2267,10 +2267,6 @@ STR_3252 :Impossible d’augmenter davantage l’emprunt maximum ! STR_3253 :Impossible de diminuer davantage l’emprunt maximum ! STR_3254 :Impossible d’augmenter davantage le taux d’intérêt ! STR_3255 :Impossible de diminuer davantage le taux d’intérêt ! -STR_3256 :Attr. moins dures pour visiteurs -STR_3257 :Les visiteurs préfèrent des attractions moins intenses -STR_3258 :Attr. plus dures pour visiteurs -STR_3259 :Les visiteurs préfèrent des attractions plus intenses STR_3260 :{WINDOW_COLOUR_2}Argent par visiteur (en moyenne) : STR_3261 :{WINDOW_COLOUR_2}Bonheur initial : STR_3262 :{WINDOW_COLOUR_2}Faim initiale : @@ -3799,3 +3795,13 @@ STR_6730 :Exporter les données emscripten STR_6731 :Importer les données emscripten STR_6732 :Afficher un bouton dans la barre d’outils pour tourner la vue dans le sens inverse des aiguilles d’une montre +STR_6733 :Translucide +STR_6734 :Rend translucides les éléments de carte à la hauteur de coupe ou au-dessus +STR_6735 :Aller au dossier parent +STR_6736 :Aperçu +STR_6737 :Pas d’aperçu disponible +STR_6738 :{WINDOW_COLOUR_2}Évaluation : {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}Date : {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}Argent : {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}Attractions : {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}Visiteurs : {BLACK}{UINT16} diff --git a/data/language/gl-ES.txt b/data/language/gl-ES.txt index f1bf77d073..6d12bc8adf 100644 --- a/data/language/gl-ES.txt +++ b/data/language/gl-ES.txt @@ -2261,10 +2261,6 @@ STR_3252 :O préstamo máximo non se pode aumentar máis! STR_3253 :O préstamo máximo non se pode reducir máis! STR_3254 :O tipo de interese non se pode aumentar máis! STR_3255 :O tipo de interese non se pode reducir máis! -STR_3256 :Os visitantes prefiren as atraccións tranquilas -STR_3257 :Os visitantes adoitan preferir atraccións de baixa intensidade -STR_3258 :Os visitantes prefiren atraccións intensas -STR_3259 :Os visitantes adoitan preferir atraccións de alta intensidade STR_3260 :{WINDOW_COLOUR_2}Efectivo por visitante (media): STR_3261 :{WINDOW_COLOUR_2}Felicidade inicial do visitante: STR_3262 :{WINDOW_COLOUR_2}Fame inicial do visitante: @@ -3214,7 +3210,7 @@ STR_6102 :O valor dunha atracción non diminúe co paso do tempo, polo que os STR_6103 :Esta opción está desactivada durante unha partida multixogador. STR_6105 :Hiper montaña rusa STR_6107 :Camións Monstro -STR_6109 :Hyper-Twister +STR_6109 :Montaña Rusa Hiper-Twister STR_6111 :Mini montaña rusa clásica STR_6113 :Unha montaña rusa alta e non invertible con grandes caídas, coches de alta velocidade e cómodos con só unhas poucas barras para agarrarse STR_6115 :Camións 4x4 autopropulsados ​​xigantes que poden escalar outeiros impresionantes @@ -3769,6 +3765,8 @@ STR_6707 :(Ningún escollido) STR_6708 :Intensidade de suavizado STR_6709 :Introduce a intensidade de suavizado entre {COMMA16} e {COMMA16} STR_6710 :Ordenación estable +STR_6711 :Nome do ficheiro: +STR_6712 :Gardar STR_6713 :{COMMA32} {STRINGID} STR_6714 :Nome do ficheiro STR_6715 :Data de modificación @@ -3784,5 +3782,20 @@ STR_6724 :Textos do escenario STR_6725 :X: STR_6726 :Y: STR_6727 :Bucle de mergullo (esquerda) -STR_6728 :Loop de mergullo (dereita) +STR_6728 :Bucle de mergullo (dereita) STR_6729 :A subida da telecadeira debe comezar inmediatamente despois da estación ou do freno de bloqueo +STR_6730 :Exportar datos de Emscripten +STR_6731 :Importar datos de Emscripten +STR_6732 :Amosar un botón na barra de ferramentas para xirar a vista en sentido antihorario +STR_6733 :Translúcido +STR_6734 :Os elementos do mapa que están a altura de corte ou por riba renderízanse translúcidos. +STR_6735 :Sube ao cartafol principal +STR_6736 :Vista previa +STR_6737 :Non hai vista previa dispoñible +STR_6738 :{WINDOW_COLOUR_2}Valoración do parque: {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}Data: {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}Efectivo: {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}Núm. de atraccións: {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}Núm. de visitantes: {BLACK}{UINT16} +STR_6743 :Clima +STR_6744 :{WINDOW_COLOUR_2}{UINT16}% diff --git a/data/language/hu-HU.txt b/data/language/hu-HU.txt index 2b9d00b5e2..de44a3ac59 100644 --- a/data/language/hu-HU.txt +++ b/data/language/hu-HU.txt @@ -2257,10 +2257,6 @@ STR_3252 :A maximum kölcsön összege nem növelhető tovább! STR_3253 :A maximum kölcsön összege nem csökkenthető tovább! STR_3254 :A kamatláb nem növelhető tovább! STR_3255 :A kamatláb nem csökkenthető tovább! -STR_3256 :A vendégek a kevésbé intenzív játékokat részesítik előnyben -STR_3257 :Válaszd ki, hogy a vendégek általában csak a kevésbé intenzív játékokat részesítsék előnyben -STR_3258 :A vendégek az intenzívebb játékokat részesítik előnyben -STR_3259 :Válaszd ki, hogy a vendégek általában csak a intenzívebb játékokat részesítsék előnyben STR_3260 :{WINDOW_COLOUR_2}Készpénz/vendég (átlagosan): STR_3261 :{WINDOW_COLOUR_2}Vendégek kezdeti boldogsága: STR_3262 :{WINDOW_COLOUR_2}Vendégek kezdeti éhsége: diff --git a/data/language/it-IT.txt b/data/language/it-IT.txt index 6e6e5338bf..c60b82dd2f 100644 --- a/data/language/it-IT.txt +++ b/data/language/it-IT.txt @@ -2261,10 +2261,6 @@ STR_3252 :Impossibile aumentare ulteriormente il prestito massimo! STR_3253 :Impossibile ridurre ulteriormente il prestito massimo! STR_3254 :Impossibile aumentare ulteriormente il tasso d’interessi! STR_3255 :Impossibile ridurre ulteriormente il tasso d’interessi! -STR_3256 :Attrazioni meno intense preferite -STR_3257 :Stabilisci se i visitatori in generale dovrebbero preferire solo le attrazioni meno intense -STR_3258 :Attrazioni più intense preferite -STR_3259 :Stabilisci se i visitatori in generale dovrebbero preferire solo attrazioni più intense STR_3260 :{WINDOW_COLOUR_2}Denaro per visitatore (media): STR_3261 :{WINDOW_COLOUR_2}Felicità iniziale visitatori: STR_3262 :{WINDOW_COLOUR_2}Fame iniziale visitatori: diff --git a/data/language/ja-JP.txt b/data/language/ja-JP.txt index 937ec0a7c0..500e389910 100644 --- a/data/language/ja-JP.txt +++ b/data/language/ja-JP.txt @@ -1737,7 +1737,7 @@ STR_2391 :{BLACK}パークに少なくとも{COMMA32}ゲストを入れてを STR_2392 :{BLACK}ライドの月次総収入の{POP16}{POP16}{CURRENCY}を取得する必要があります。 STR_2393 :{BLACK}パークで10タイプのジェットコースターを操作しますし、それぞれ所定の長さの{LENGTH}し, 7.00以上の興奮度が必要です。 STR_2394 :{BLACK}パークであるの5ジェットコースターの建設を仕上げますし、 それぞれ{POP16}{POP16}{COMMA2DP32}以上の興奮度が必要です。 -STR_2395 :{BLACK}借金完済を取得するし、パーク評価額{CURRENCY}以上を取得する必要があります。 +STR_2395 :{BLACK}借金完済を取得するし、パーク評価額{POP16}{POP16}{CURRENCY}以上を取得する必要があります。 STR_2396 :{BLACK}飲食やお土産の売ることで、月利益を{POP16}{POP16}{CURRENCY}以上を得ります。 STR_2397 :なし STR_2398 :指定された日付のゲスト数 @@ -2257,10 +2257,6 @@ STR_3252 :これ以上最大ローン額を増やすことはできません! STR_3253 :これ以上最大ローン額を減らすことはできません! STR_3254 :これ以上利率を上げることはできません! STR_3255 :これ以上利率を下げることはできません! -STR_3256 :ゲストは低いライドの強烈度が好きです。 -STR_3257 :ゲストは低いライドの強烈度が好きの設定です。 -STR_3258 :ゲストは高いライドの強烈度が好きです。 -STR_3259 :ゲストは高いライドの強烈度が好きの設定です。 STR_3260 :{WINDOW_COLOUR_2}ゲストの平均所持金: STR_3261 :{WINDOW_COLOUR_2}ゲストの幸福度 初期値: STR_3262 :{WINDOW_COLOUR_2}ゲストの空腹度 初期値: diff --git a/data/language/ko-KR.txt b/data/language/ko-KR.txt index a3def69818..e4b13e5f3a 100644 --- a/data/language/ko-KR.txt +++ b/data/language/ko-KR.txt @@ -2264,10 +2264,6 @@ STR_3252 :최대 대출금을 더 늘릴 수 없습니다! STR_3253 :최대 대출금을 더 줄일 수 없습니다! STR_3254 :이자율을 더 늘릴 수 없습니다! STR_3255 :이자율을 더 줄일 수 없습니다! -STR_3256 :손님들이 격렬하지 않은 놀이기구를 선호함 -STR_3257 :손님들이 일반적으로 덜 격렬한 놀이기구를 선호하게 만들지를 선택합니다 -STR_3258 :손님들이 격렬한 놀이기구를 선호함 -STR_3259 :손님들이 일반적으로 더욱 격렬한 놀이기구를 선호하게 만들지를 선택합니다 STR_3260 :{WINDOW_COLOUR_2}각 손님의 보유금 (평균): STR_3261 :{WINDOW_COLOUR_2}손님의 초기 행복도: STR_3262 :{WINDOW_COLOUR_2}손님의 초기 배고픔: @@ -3795,3 +3791,18 @@ STR_6732 :게임 화면을 시계반대방향으로 90° 회전하기 STR_6733 :반투명하게 보기 STR_6734 :해당 높이 또는 그 이상의 위치에 있는 지도 요소를 반투명하게 표시합니다. STR_6735 :상위 폴더로 이동 +STR_6736 :미리보기 +STR_6737 :미리보기 없음 +STR_6738 :{WINDOW_COLOUR_2}공원 등급: {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}날짜: {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}재정: {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}놀이기구 수: {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}손님 수: {BLACK}{UINT16} +STR_6743 :기후 +STR_6744 :{WINDOW_COLOUR_2}{UINT16}% +STR_6745 :{WINDOW_COLOUR_2}손님 선호 격렬도: +STR_6746 :별도의 선호 격렬도 없음 +STR_6747 :다양한 선호도 (기본값) +STR_6748 :얌전한 놀이기구만 선호 +STR_6749 :격렬한 놀이기구만 선호 +STR_6750 :새로 공원을 찾은 손님이 선호하는 놀이기구 격렬도 종류를 선택하세요. diff --git a/data/language/nb-NO.txt b/data/language/nb-NO.txt index 60e02a1d2e..c0d411fc4a 100644 --- a/data/language/nb-NO.txt +++ b/data/language/nb-NO.txt @@ -2255,10 +2255,6 @@ STR_3252 :Kan ikke øke maksimal lånstørrelse videre! STR_3253 :Kan ikke senke maksimal lånstørrelse videre! STR_3254 :Kan ikke øke renter videre! STR_3255 :Kan ikke senke renter videre! -STR_3256 :Gjester foretrekker mindre intense attraksjoner -STR_3257 :Velg om gjester kun skal generelt foretrekke mindre intense attraksjoner -STR_3258 :Gjester foretrekker mer intense attraksjoner -STR_3259 :Velg om gjester kun skal generelt foretrekke mer intense attraksjoner STR_3260 :{WINDOW_COLOUR_2}Penger per gjest (gjennomsnitt): STR_3261 :{WINDOW_COLOUR_2}Gjester's innledende glede: STR_3262 :{WINDOW_COLOUR_2}Gjester's innledende sult: diff --git a/data/language/nl-NL.txt b/data/language/nl-NL.txt index f9beaad479..0bdf2ade10 100644 --- a/data/language/nl-NL.txt +++ b/data/language/nl-NL.txt @@ -445,9 +445,9 @@ STR_1050 :Kan dit niet laden…{NEWLINE}Bestand bevat ongeldige gegevens! STR_1051 :Onzichtbare ondersteuningen STR_1052 :Onzichtbare mensen STR_1053 :Attracties in park -STR_1054 :Attractienaam -STR_1055 :Persoonsnaam -STR_1056 :Werknemersnaam +STR_1054 :Attractienaam wijzigen +STR_1055 :Naam wijzigen +STR_1056 :Naam wijzigen STR_1057 :Attractienaam STR_1058 :Voer een nieuwe naam in voor deze attractie: STR_1059 :Kan deze attractie geen andere naam geven… @@ -2128,7 +2128,7 @@ STR_3099 :Kleur selecteren STR_3100 :Tweede kleur selecteren STR_3101 :Derde kleur selecteren STR_3102 :Gekleurd decor opnieuw verven -STR_3103 :Kan dit niet opnieuw verversen… +STR_3103 :Kan dit niet opnieuw verven… STR_3104 :Toon een lijst van attracties STR_3105 :Toon een lijst van winkels en kraampjes STR_3106 :Toon een lijst van informatiekiosken en andere faciliteiten @@ -2259,10 +2259,6 @@ STR_3252 :Kan de maximumlening niet verder verhogen! STR_3253 :Kan de maximumlening niet verder verlagen! STR_3254 :Kan de rente niet verder verhogen! STR_3255 :Kan de rente niet verder verlagen! -STR_3256 :Bezoekers houden meer van rustigere attracties -STR_3257 :Selecteer of bezoekers in het algemeen meer van rustigere attracties houden -STR_3258 :Bezoekers houden meer van spannende attracties -STR_3259 :Selecteer of bezoekers in het algemeen meer van spannende attracties houden STR_3260 :{WINDOW_COLOUR_2}Geld per bezoeker (gemiddeld): STR_3261 :{WINDOW_COLOUR_2}Aanvankelijke stemming bezoekers: STR_3262 :{WINDOW_COLOUR_2}Aanvankelijke honger bezoekers: @@ -3737,10 +3733,10 @@ STR_6678 :Bronbestand: STR_6679 :Vlak land STR_6680 :Simplex-ruis STR_6681 :Hoogtekaart -STR_6682 :Mapgenerator - Generator -STR_6683 :Mapgenerator - Terrein -STR_6684 :Mapgenerator - Water -STR_6685 :Mapgenerator - Bossen +STR_6682 :Kaartgenerator - Generator +STR_6683 :Kaartgenerator - Terrein +STR_6684 :Kaartgenerator - Water +STR_6685 :Kaartgenerator - Bossen STR_6686 :Ratio bomen/land: STR_6687 :Minimale boomhoogte: STR_6688 :Maximale boomhoogte: @@ -3791,3 +3787,10 @@ STR_6732 :Toon een knop in de werkbalk om het beeld tegen de klok in te draai STR_6733 :Doorzichtig STR_6734 :Maakt kaartelementen die hoger staan dan de ingestelde bovengrens doorzichtig. STR_6735 :Naar bovenliggende map navigeren +STR_6736 :Preview +STR_6737 :Geen preview beschikbaar. +STR_6738 :{WINDOW_COLOUR_2}Parkwaardering: {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}Datum: {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}Geld: {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}Aantal attracties: {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}Aantal bezoekers: {BLACK}{UINT16} diff --git a/data/language/pl-PL.txt b/data/language/pl-PL.txt index 98c04f9c30..cc7fffb5e2 100644 --- a/data/language/pl-PL.txt +++ b/data/language/pl-PL.txt @@ -2260,10 +2260,6 @@ STR_3252 :Nie można bardziej zwiększyć maksymalnego zadłużenia! STR_3253 :Nie można bardziej zmniejszyć maksymalnego zadłużenia! STR_3254 :Nie można bardziej zwiększyć oprocentowania pożyczek! STR_3255 :Nie można bardziej zmniejszyć oprocentowania pożyczek! -STR_3256 :Goście preferują mniej intensywne atrakcje -STR_3257 :Wybierz czy goście powinni preferować tylko mniej intensywne atrakcje -STR_3258 :Goście preferują bardziej intensywne atrakcje -STR_3259 :Wybierz czy goście powinni preferować tylko bardziej intensywne atrakcje STR_3260 :{WINDOW_COLOUR_2}Gotówka na gościa (średnia): STR_3261 :{WINDOW_COLOUR_2}Początkowe zadowolenie gości: STR_3262 :{WINDOW_COLOUR_2}Początkowy głód gości: @@ -3792,3 +3788,10 @@ STR_6732 :Pokaż przycisk na pasku narzędzi do obracania widoku w kierunku p STR_6733 :Półprzezroczystość STR_6734 :Elementy mapy, które znajdują się na lub powyżej wysokości cięcia, są wyświetlane jako półprzezroczyste STR_6735 :Idź do katalogu nadrzędnego +STR_6736 :Podgląd +STR_6737 :Brak podglądu +STR_6738 :{WINDOW_COLOUR_2}Atrakcyjność parku: {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}Data: {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}Gotówka: {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}Liczba atrakcji: {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}Liczba gości: {BLACK}{UINT16} diff --git a/data/language/pt-BR.txt b/data/language/pt-BR.txt index ba3edba1ac..be2a892cae 100644 --- a/data/language/pt-BR.txt +++ b/data/language/pt-BR.txt @@ -2260,10 +2260,6 @@ STR_3252 :Impossível aumentar ainda mais o tamanho do empréstimo! STR_3253 :Impossível diminuir ainda mais o tamanho do empréstimo! STR_3254 :Impossível aumentar ainda mais a taxa de juros! STR_3255 :Impossível diminuir ainda mais a taxa de juros! -STR_3256 :Visitantes preferem atrações menos intensas -STR_3257 :Selecionar se os visitantes geralmente preferem somente atrações menos intensas -STR_3258 :Visitantes preferem atrações mais intensas -STR_3259 :Selecionar se os visitantes geralmente preferem somente atrações mais intensas STR_3260 :{WINDOW_COLOUR_2}Dinheiro por visitante (em média): STR_3261 :{WINDOW_COLOUR_2}Felicidade inicial dos visitantes: STR_3262 :{WINDOW_COLOUR_2}Fome inicial dos visitantes: @@ -3792,3 +3788,18 @@ STR_6732 :Mostrar um botão na barra de ferramentas para girar a visualizaç STR_6733 :Ver através STR_6734 :Elementos do mapa que estiverem na altura de corte ou superior são desenhados translúcidos. STR_6735 :Ir para pasta acima +STR_6736 :Pré-visualização +STR_6737 :Nenhuma pré-visualização disponível +STR_6738 :{WINDOW_COLOUR_2}Classifiação do parque: {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}Data: {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}Dinheiro: {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}Núm. atrações: {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}Núm. visitantes: {BLACK}{UINT16} +STR_6743 :Clima +STR_6744 :{WINDOW_COLOUR_2}{UINT16}% +STR_6745 :{WINDOW_COLOUR_2}Preferências de intensidade dos visitantes: +STR_6746 :Sem preferências +STR_6747 :Preferências variam (padrão) +STR_6748 :Apenas atrações menos intensas +STR_6749 :Apenas atrações mais intensas +STR_6750 :Selecionar que tipo de intensidade de atração visitantes recém criados preferem. diff --git a/data/language/ru-RU.txt b/data/language/ru-RU.txt index 930f6bfa46..7c368098a7 100644 --- a/data/language/ru-RU.txt +++ b/data/language/ru-RU.txt @@ -2253,10 +2253,6 @@ STR_3252 :Невозможно повышать сумму максималь STR_3253 :Невозможно понижать сумму максимального займа! STR_3254 :Невозможно повышать процентную ставку! STR_3255 :Невозможно понижать процентную ставку! -STR_3256 :Гости любят менее напряжённые аттракционы -STR_3257 :Должны ли гости предпочитать менее напряжённые аттракционы -STR_3258 :Гости любят более напряжённые аттракционы -STR_3259 :Должны ли гости предпочитать более напряжённые аттракционы STR_3260 :{WINDOW_COLOUR_2}Денег с клиента (в среднем): STR_3261 :{WINDOW_COLOUR_2}Начальное счастье гостей: STR_3262 :{WINDOW_COLOUR_2}Начальный голод гостей: @@ -3780,3 +3776,18 @@ STR_6731 :Импорт данных emscripten STR_6733 :Прозрачность STR_6734 :Элементы карты выше указанной высоты отображаются прозрачно. STR_6735 :Перейти вверх +STR_6736 :Предпросмотр +STR_6737 :Предпросмотр недоступен +STR_6738 :{WINDOW_COLOUR_2}Рейтинг парка: {BLACK}{UINT16} +STR_6739 :{WINDOW_COLOUR_2}Дата: {BLACK}{STRINGID} +STR_6740 :{WINDOW_COLOUR_2}Деньги: {BLACK}{CURRENCY2DP} +STR_6741 :{WINDOW_COLOUR_2}Кол-во аттр.: {BLACK}{UINT16} +STR_6742 :{WINDOW_COLOUR_2}Кол-во гостей: {BLACK}{UINT16} +STR_6743 :Климат +STR_6744 :{WINDOW_COLOUR_2}{UINT16}% +STR_6745 :{WINDOW_COLOUR_2}Предпочтения гостей по интенсивности: +STR_6746 :Без предпочтений +STR_6747 :Различные предпочтения (умолч.) +STR_6748 :Только слабо-интенсивные аттр. +STR_6749 :Только сильно-интенсивные аттр. +STR_6750 :Выберите предпочтения новых гостей относительно интенсивности аттракционов. diff --git a/data/language/sv-SE.txt b/data/language/sv-SE.txt index 8856f02f12..64ed357baf 100644 --- a/data/language/sv-SE.txt +++ b/data/language/sv-SE.txt @@ -2260,10 +2260,6 @@ STR_3252 :Kan inte höja maxlån mer! STR_3253 :Kan inte sänka maxlån mer! STR_3254 :Kan inte höja räntan mer! STR_3255 :Kan inte sänka räntan mer! -STR_3256 :Besökare föredrar mindre intensiva åkturer -STR_3257 :Välj om besökare endast ska föredra mindre intensiva åkturer -STR_3258 :Besökare föredrar mer intensiva åkturer -STR_3259 :Välj om besökare endast ska föredra mer intensiva åkturer STR_3260 :{WINDOW_COLOUR_2}Pengar per besökare (genomsnitt): STR_3261 :{WINDOW_COLOUR_2}Besökares startglädje: STR_3262 :{WINDOW_COLOUR_2}Besökares starthunger: diff --git a/data/language/tr-TR.txt b/data/language/tr-TR.txt index 74f1ad31c7..b176d6e045 100644 --- a/data/language/tr-TR.txt +++ b/data/language/tr-TR.txt @@ -2248,10 +2248,6 @@ STR_3252 :Kredi miktarı daha fazla yükseltilemiyor! STR_3253 :Kredi miktarı daha fazla düşürülemiyor! STR_3254 :Faiz oranı daha fazla yükseltilemiyor! STR_3255 :Faiz oranı daha fazla düşürülemiyor! -STR_3256 :Müşteriler daha çok şiddet oranı düşük olan aletleri tercih etsin -STR_3257 :Bu ayar ile müşteriler daha çok şiddet oranı düşük olan aletleri tercih ediyor -STR_3258 :Müşteriler daha çok şiddet oranı yüksek olan aletleri tercih etsin -STR_3259 :Bu ayar ile müşteriler daha çok şiddet oranı yüksek olan aletleri tercih ediyor STR_3260 :{WINDOW_COLOUR_2}Müşteri başı para (yaklaşık): STR_3261 :{WINDOW_COLOUR_2}Ana müşteri mutluluğu: STR_3262 :{WINDOW_COLOUR_2}Ana müşteri açlığı: diff --git a/data/language/uk-UA.txt b/data/language/uk-UA.txt index a0a0ac0403..c34741481a 100644 --- a/data/language/uk-UA.txt +++ b/data/language/uk-UA.txt @@ -2288,10 +2288,6 @@ STR_3252 :Can’t increase maximum loan size any further! STR_3253 :Can’t reduce maximum loan size any further! STR_3254 :Can’t increase interest rate any further! STR_3255 :Can’t reduce interest rate any further! -STR_3256 :Guests prefer less intense rides -STR_3257 :Select whether guests should generally prefer less intense rides only -STR_3258 :Guests prefer more intense rides -STR_3259 :Select whether guests should generally prefer more intense rides only STR_3260 :{WINDOW_COLOUR_2}Готівка на гостя (в середньому): STR_3261 :{WINDOW_COLOUR_2}Початкове щастя гостей: STR_3262 :{WINDOW_COLOUR_2}Початковий голод гостей: diff --git a/data/language/vi-VN.txt b/data/language/vi-VN.txt index f2df92b13e..2e095f1dc9 100644 --- a/data/language/vi-VN.txt +++ b/data/language/vi-VN.txt @@ -2253,10 +2253,6 @@ STR_3252 :Can’t increase maximum loan size any further! STR_3253 :Can’t reduce maximum loan size any further! STR_3254 :Can’t increase interest rate any further! STR_3255 :Can’t reduce interest rate any further! -STR_3256 :Guests prefer less intense rides -STR_3257 :Select whether guests should generally prefer less intense rides only -STR_3258 :Guests prefer more intense rides -STR_3259 :Select whether guests should generally prefer more intense rides only STR_3260 :{WINDOW_COLOUR_2}Cash per guest (average): STR_3261 :{WINDOW_COLOUR_2}Guests initial happiness: STR_3262 :{WINDOW_COLOUR_2}Guests initial hunger: diff --git a/data/language/zh-CN.txt b/data/language/zh-CN.txt index 1743dcf6c1..2b9bd35b67 100644 --- a/data/language/zh-CN.txt +++ b/data/language/zh-CN.txt @@ -2257,10 +2257,6 @@ STR_3252 :不能再增加最高贷款额! STR_3253 :不能再减少最高贷款额! STR_3254 :不能再增加贷款利率! STR_3255 :不能再减少贷款利率! -STR_3256 :游客喜欢较温和的游乐设施 -STR_3257 :选择普遍游客是否只喜欢较温和的游乐设施 -STR_3258 :游客喜欢较刺激的游乐设施 -STR_3259 :选择普遍游客是否只喜欢较刺激的游乐设施 STR_3260 :{WINDOW_COLOUR_2}游客身上现金(平均值): STR_3261 :{WINDOW_COLOUR_2}游客初始快乐度: STR_3262 :{WINDOW_COLOUR_2}游客初始饥饿度: diff --git a/data/language/zh-TW.txt b/data/language/zh-TW.txt index c945ac11cf..75b43f7c2c 100644 --- a/data/language/zh-TW.txt +++ b/data/language/zh-TW.txt @@ -2259,10 +2259,6 @@ STR_3252 :不能再增加最高貸款額! STR_3253 :不能再減少最高貸款額! STR_3254 :不能再增加貸款利率! STR_3255 :不能再減少貸款利率! -STR_3256 :遊客喜歡較溫和的遊樂設施 -STR_3257 :選擇普遍遊客是否只喜歡較溫和的遊樂設施 -STR_3258 :遊客喜歡較刺激的遊樂設施 -STR_3259 :選擇普遍遊客是否只喜歡較刺激的遊樂設施 STR_3260 :{WINDOW_COLOUR_2}遊客身上現金 (平均值): STR_3261 :{WINDOW_COLOUR_2}遊客初始快樂度: STR_3262 :{WINDOW_COLOUR_2}遊客初始飢餓度: diff --git a/data/shaders/drawrect.frag b/data/shaders/drawrect.frag index d79245c325..4034027335 100644 --- a/data/shaders/drawrect.frag +++ b/data/shaders/drawrect.frag @@ -13,14 +13,19 @@ uniform usampler2D uPaletteTex; uniform sampler2D uPeelingTex; uniform bool uPeeling; +layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord; + flat in int fFlags; flat in uint fColour; -in vec3 fTexColour; -in vec3 fTexMask; +flat in vec4 fTexColour; +flat in vec4 fTexMask; flat in vec3 fPalettes; -in vec2 fPosition; +flat in vec2 fPosition; in vec3 fPeelPos; +flat in float fZoom; +flat in int fTexColourAtlas; +flat in int fTexMaskAtlas; // clang-format on out uint oColour; @@ -36,10 +41,14 @@ void main() } } + vec2 position = (gl_FragCoord.xy - fPosition) * fZoom; + uint texel; if ((fFlags & FLAG_NO_TEXTURE) == 0) { - texel = texture(uTexture, fTexColour).r; + float colourU = (fTexColour.x + position.x) / fTexColour.z; + float colourV = (fTexColour.y + position.y) / fTexColour.w; + texel = texture(uTexture, vec3(colourU, colourV, fTexColourAtlas)).r; if (texel == 0u) { discard; @@ -93,8 +102,8 @@ void main() if ((fFlags & FLAG_CROSS_HATCH) != 0) { - int posSum = int(fPosition.x) + int(fPosition.y); - if ((posSum % 2) == 0) + int posSum = int(position.x) + int(position.y); + if ((posSum % 2) != 0) { discard; } @@ -102,7 +111,9 @@ void main() if ((fFlags & FLAG_MASK) != 0) { - uint mask = texture(uTexture, fTexMask).r; + float maskU = (fTexMask.x + position.x) / fTexMask.z; + float maskV = (fTexMask.y + position.y) / fTexMask.w; + uint mask = texture(uTexture, vec3(maskU, maskV, fTexMaskAtlas)).r; if (mask == 0u) { discard; diff --git a/data/shaders/drawrect.vert b/data/shaders/drawrect.vert index 87a3d1927f..ac4612c091 100644 --- a/data/shaders/drawrect.vert +++ b/data/shaders/drawrect.vert @@ -8,25 +8,29 @@ uniform ivec2 uScreenSize; // clang-format off in ivec4 vClip; in int vTexColourAtlas; -in vec4 vTexColourBounds; +in vec4 vTexColourCoords; in int vTexMaskAtlas; -in vec4 vTexMaskBounds; +in vec4 vTexMaskCoords; in ivec3 vPalettes; in int vFlags; in uint vColour; in ivec4 vBounds; in int vDepth; +in float vZoom; in mat4x2 vVertMat; in vec2 vVertVec; -out vec2 fPosition; +flat out vec2 fPosition; out vec3 fPeelPos; flat out int fFlags; flat out uint fColour; -out vec3 fTexColour; -out vec3 fTexMask; +flat out vec4 fTexColour; +flat out vec4 fTexMask; flat out vec3 fPalettes; +flat out float fZoom; +flat out int fTexColourAtlas; +flat out int fTexMaskAtlas; // clang-format on void main() @@ -35,10 +39,13 @@ void main() vec2 m = clamp( ((vVertMat * vec4(vClip)) - (vVertMat * vec4(vBounds))) / vec2(vBounds.zw - vBounds.xy) + vVertVec, 0.0, 1.0); vec2 pos = mix(vec2(vBounds.xy), vec2(vBounds.zw), m); - fTexColour = vec3(mix(vTexColourBounds.xy, vTexColourBounds.zw, m), vTexColourAtlas); - fTexMask = vec3(mix(vTexMaskBounds.xy, vTexMaskBounds.zw, m), vTexMaskAtlas); + fTexColour = vTexColourCoords; + fTexMask = vTexMaskCoords; - fPosition = pos; + fPosition = vBounds.xy; + fZoom = vZoom; + fTexColourAtlas = vTexColourAtlas; + fTexMaskAtlas = vTexMaskAtlas; // Transform screen coordinates to texture coordinates float depth = 1.0 - (float(vDepth) + 1.0) * DEPTH_INCREMENT; diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 2d68a81492..ae7be68167 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,3 +1,51 @@ +0.4.21 (in development) +------------------------------------------------------------------------ +- Feature: [#22646] New scenario files now contain a minimap image, shown in the scenario selection window. +- Feature: [#23774] Climates can now be customised using objects. +- Feature: [#23876] New park save files now contain a preview image, shown in the load/save window. +- Improved: [#24078] Handrails on Wooden Roller Coaster station sprites with no platforms have been removed. +- Improved: [objects#379] Add additional colour schemes to Mine Train. +- Change: [#23932] The land rights window now checks “Land Owned” by default. +- Change: [#23936] The ‘guests prefer less/more intense rides’ settings have been turned into a dropdown. +- Change: [#24059] The ‘select other ride’ button is now available in the track designs manager. +- Change: [#24067] [Plugin] Registered menu items are now listed alphabetically. +- Change: [#24070] Footpath selection menus now show object names on hover using a tooltip. +- Change: [#24101] Frozen peeps are no longer removed when using the 'remove all guests' cheat. +- Fix: [#4225] Ride Construction window offers non-existent banked sloped to level curve (original bug). +- Fix: [#5281] Missing supports on miniature railways built backwards. +- Fix: [#7222] Transparent pixels in sloped path tunnels (original bug). +- Fix: [#10379] Banners outside the park can be renamed and modified (original bug). +- Fix: [#10582] Low clearance tunnels below water are drawn incorrectly (original bug). +- Fix: [#17524, #23710] Station bases are drawn on many ride types when the “No entrance, no platform station” style is selected. +- Fix: [#18169] CJK, Arabic and Vietnamese display all text as ‘???’ on Android. +- Fix: [#18309] Flying and Multi Dimension trains glitch when changing between inverted and uninverted track when uncap fps is on. +- Fix: [#19506] Queue paths can be placed on level crossings by replacing an existing regular path. +- Fix: [#21803] The park fence is drawn differently in OpenGL compared to software rendering when zoomed out. +- Fix: [#21824] Some sprites are drawn incorrectly when zoomed out in OpenGL rendering. +- Fix: [#21908] Ride mode warnings when hovering track designs. +- Fix: [#22820] OpenGL does not draw masked sprites correctly. +- Fix: [#22961] Clicking on the construction preview places duplicate flat rides and stalls. +- Fix: [#23359] Scripting: Add car.moveToTrack, an easier API than setting car.trackLocation directly. +- Fix: [#23443] New GOG version of RCT2 is not extracted correctly. +- Fix: [#23484] Stray coloured pixels on castle-themed stations and Roman-themed entrances/exits (original bug). +- Fix: [#23486] Object selection minimum requirements can be bypassed with close window hotkey. +- Fix: [#23743] Parks with guest goals over 32767 do not appear in the scenario list. +- Fix: [#23844] Sound effects keep playing when loading another save. +- Fix: [#23881] Compiling on Raspbian/arm-linux-gnueabihf fails. +- Fix: [#23891] Inverted Hairpin Coaster track can draw over things above it (original bug). +- Fix: [#23892] Gentle banked Wooden Roller Coaster track glitches as trains pass (original bug). +- Fix: [#23897] Reverse Freefall Coaster slope up to vertical track piece does not draw a vertical tunnel. +- Fix: [#23910] Heartline Twister Coaster track can draw over things above it (original bug). +- Fix: [#23939] Incorrect assertion when trying to load heightmap. +- Fix: [#23941] Underflow in “Repay loan and achieve a certain park value” objective when using Japanese. +- Fix: [#23949] Walls draw over sloped rear water edges and those edge sprites are misaligned (original bug). +- Fix: [#23960] Corner path fences can draw over adjacent sloped land (original bug). +- Fix: [#23961] Lamps and queue line tvs draw incorrectly on paths with fences. +- Fix: [#23983] Ordering files by size does not work and occasionally crashes the game. +- Fix: [#24009] [Plugin] The object manager API does not identify recently introduced object types. +- Fix: [#24028] Giga and LSM Launched Coaster booster sprites have pixels that draw over transparent pixels. +- Fix: [#24077] Track Designer crashes when clicking the park fence. + 0.4.20 (2025-02-25) ------------------------------------------------------------------------ - Feature: [#22905] Add diagonal downward-inclined brakes to hybrid coaster and single rail coaster. @@ -81,7 +129,7 @@ - Fix: [#22742, #22793] In game console does not handle format tokens properly. - Fix: [#23135] Map generator tree placement has noticable patterns. - Fix: [#23286] Currency formatted incorrectly in the in game console. -- Fix: [#23348] Console set commands don't print output properly. +- Fix: [#23348] Console set commands don’t print output properly. - Fix: [#23376] Peeps with balloons, hats and umbrellas may leave artifacts on screen. - Fix: [#23496] Newly spawned vehicles are invisible when spawned while the game is paused. - Fix: [#23509] Map generator window reverts to flatland after selecting a heightmap image. @@ -103,7 +151,7 @@ - Fix: [#20070, #22972] Missing and mismatched flat and sloped footpaths on several scenarios. - Fix: [#22726] ‘Force park rating’ cheat is not saved with the park. - Fix: [#23064] Stand-Up Roller Coaster unbanked to banked track pieces are misaligned. -- Fix: [#23066] Stand-Up Roller Coaster has many supports that don't join up to the track. +- Fix: [#23066] Stand-Up Roller Coaster has many supports that don’t join up to the track. - Fix: [#23206] Multiplayer desyncs when FPS is uncapped. - Fix: [#23238] Updating a guest’s favourite ride works differently from vanilla RCT2. - Fix: [objects#355] Fix colour preset settings of the Stand-Up Roller Coaster trains. @@ -138,7 +186,7 @@ - Feature: [#775] Add 2x and 4x zoom levels to software renderer (previously limited to OpenGL). - Feature: [#15642] Track design placement can now use construction modifier keys (ctrl/shift). - Feature: [#20539] [Plugin] Add API for getting a ride’s statistics. -- Feature: [#21521] [Plugin] Add hook 'park.guest.softcap.calculate' called before calculating the soft guest cap. +- Feature: [#21521] [Plugin] Add hook “park.guest.softcap.calculate” called before calculating the soft guest cap. - Feature: [#22383] Add downward-inclined brakes to hybrid coaster and single rail coaster. - Feature: [#22694] Park graphs have tooltips and can be resized like finance graphs. - Feature: [#22758] The table of ‘real’ peep names can now be changed using Peep Names objects. @@ -235,7 +283,7 @@ - Change: [#22309] The scenario editor now supports loading landscapes from .sea save files. - Fix: [#17390] Glitchy animations for the ride type tabs in the object selection window. - Fix: [#19210] The load/save window executes the loading code twice, resulting in a slowdown. -- Fix: [#21175] Terraform tool hotkeys don't work when toolbars are hidden. +- Fix: [#21175] Terraform tool hotkeys don’t work when toolbars are hidden. - Fix: [#22056] Potential crash upon exiting the game. - Fix: [#22101] Wrong tunnel shapes on Log Flume and Giga, Hybrid, Single-Rail and Alpine Coasters. - Fix: [#22208] Cursor may fail to register hits in some cases (original bug). diff --git a/distribution/linux/ld_script_i386.xc b/distribution/linux/ld_script_i386.xc deleted file mode 100644 index 4573a92d03..0000000000 --- a/distribution/linux/ld_script_i386.xc +++ /dev/null @@ -1,214 +0,0 @@ -/* This script is based on elf_i386.xc with modifications for OpenRCT2 */ -/* Script for -z combreloc: combine and sort reloc sections */ -/* Copyright (C) 2014 Free Software Foundation, Inc. - Copying and distribution of this script, with or without modification, - are permitted in any medium without royalty provided the copyright - notice and this notice are preserved. */ -OUTPUT_FORMAT("elf32-i386", "elf32-i386", - "elf32-i386") -OUTPUT_ARCH(i386) -ENTRY(_start) -SEARCH_DIR("/usr/i386-unknown-linux-gnu/lib32"); SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib32"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/usr/lib32"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/usr/local/lib32"); SEARCH_DIR("/usr/i386-unknown-linux-gnu/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/lib32"); -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x010000)); . = SEGMENT_START("text-segment", 0x010000) + SIZEOF_HEADERS; - - .interp : { *(.interp) } - .note.gnu.build-id : { *(.note.gnu.build-id) } - .hash : { *(.hash) } - .gnu.hash : { *(.gnu.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rel.dyn : - { - *(.rel.init) - *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) - *(.rel.fini) - *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) - *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*) - *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) - *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) - *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) - *(.rel.ctors) - *(.rel.dtors) - *(.rel.got) - *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) - *(.rel.ifunc) - } - .rel.plt : - { - *(.rel.plt) - PROVIDE_HIDDEN (__rel_iplt_start = .); - *(.rel.iplt) - PROVIDE_HIDDEN (__rel_iplt_end = .); - } - .init : - { - KEEP (*(SORT_NONE(.init))) - } - .plt : { *(.plt) *(.iplt) } - .rct2_text 0x401000 : { *(.rct2_text) } - .rct2_data : { *(.rct2_data) } - .text : - { - *(.text.unlikely .text.*_unlikely .text.unlikely.*) - *(.text.exit .text.exit.*) - *(.text.startup .text.startup.*) - *(.text.hot .text.hot.*) - *(.text .stub .text.* .gnu.linkonce.t.*) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - } - .fini : - { - KEEP (*(SORT_NONE(.fini))) - } - PROVIDE (__etext = .); - PROVIDE (_etext = .); - PROVIDE (etext = .); - .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } - .rodata1 : { *(.rodata1) } - .eh_frame_hdr : { *(.eh_frame_hdr) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) } - .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table - .gcc_except_table.*) } - /* These sections are generated by the Sun/Oracle C++ compiler. */ - .exception_ranges : ONLY_IF_RO { *(.exception_ranges - .exception_ranges*) } - /* Adjust the address for the data segment. We want to adjust up to - the same address within the page on the next page up. */ - . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); - /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) } - .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } - .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } - /* Thread Local Storage sections */ - .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } - .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } - .preinit_array : - { - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - } - .init_array : - { - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) - PROVIDE_HIDDEN (__init_array_end = .); - } - .fini_array : - { - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) - PROVIDE_HIDDEN (__fini_array_end = .); - } - .ctors : - { - /* gcc uses crtbegin.o to find the start of - the constructors, so we make sure it is - first. Because this is a wildcard, it - doesn't matter if the user does not - actually link against crtbegin.o; the - linker won't look for a file to match a - wildcard. The wildcard also means that it - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin.o(.ctors)) - KEEP (*crtbegin?.o(.ctors)) - /* We don't want to include the .ctor section from - the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - } - .dtors : - { - KEEP (*crtbegin.o(.dtors)) - KEEP (*crtbegin?.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - } - .jcr : { KEEP (*(.jcr)) } - .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) } - .dynamic : { *(.dynamic) } - .got : { *(.got) *(.igot) } - . = DATA_SEGMENT_RELRO_END (SIZEOF (.got.plt) >= 12 ? 12 : 0, .); - .got.plt : { *(.got.plt) *(.igot.plt) } - .data : - { - *(.data .data.* .gnu.linkonce.d.*) - SORT(CONSTRUCTORS) - } - .data1 : { *(.data1) } - _edata = .; PROVIDE (edata = .); - . = .; - __bss_start = .; - .bss : - { - *(.dynbss) - *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) - /* Align here to ensure that the .bss section occupies space up to - _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. - FIXME: Why do we need it? When there is no .bss section, we don't - pad the .data section. */ - . = ALIGN(. != 0 ? 32 / 8 : 1); - } - . = ALIGN(32 / 8); - . = SEGMENT_START("ldata-segment", .); - . = ALIGN(32 / 8); - _end = .; PROVIDE (end = .); - . = DATA_SEGMENT_END (.); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - /* DWARF 3 */ - .debug_pubtypes 0 : { *(.debug_pubtypes) } - .debug_ranges 0 : { *(.debug_ranges) } - /* DWARF Extension. */ - .debug_macro 0 : { *(.debug_macro) } - .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } - -} diff --git a/distribution/linux/ld_script_x86_64.xc b/distribution/linux/ld_script_x86_64.xc deleted file mode 100644 index 5a80ecadc1..0000000000 --- a/distribution/linux/ld_script_x86_64.xc +++ /dev/null @@ -1,233 +0,0 @@ -/* This script is based on elf_x86_64.xc with modifications for OpenRCT2 */ -/* Script for -z combreloc: combine and sort reloc sections */ -/* Copyright (C) 2014-2015 Free Software Foundation, Inc. - Copying and distribution of this script, with or without modification, - are permitted in any medium without royalty provided the copyright - notice and this notice are preserved. */ -OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", - "elf64-x86-64") -OUTPUT_ARCH(i386:x86-64) -ENTRY(_start) -SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64"); SEARCH_DIR("/usr/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib"); -SECTIONS -{ - /* Read-only sections, merged into text segment: */ - PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x7000000)); . = SEGMENT_START("text-segment", 0x7000000) + SIZEOF_HEADERS; - .interp : { *(.interp) } - .note.gnu.build-id : { *(.note.gnu.build-id) } - .hash : { *(.hash) } - .gnu.hash : { *(.gnu.hash) } - .dynsym : { *(.dynsym) } - .dynstr : { *(.dynstr) } - .gnu.version : { *(.gnu.version) } - .gnu.version_d : { *(.gnu.version_d) } - .gnu.version_r : { *(.gnu.version_r) } - .rela.dyn : - { - *(.rela.init) - *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) - *(.rela.fini) - *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) - *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) - *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) - *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) - *(.rela.ctors) - *(.rela.dtors) - *(.rela.got) - *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) - *(.rela.ldata .rela.ldata.* .rela.gnu.linkonce.l.*) - *(.rela.lbss .rela.lbss.* .rela.gnu.linkonce.lb.*) - *(.rela.lrodata .rela.lrodata.* .rela.gnu.linkonce.lr.*) - *(.rela.ifunc) - } - .rela.plt : - { - *(.rela.plt) - PROVIDE_HIDDEN (__rela_iplt_start = .); - *(.rela.iplt) - PROVIDE_HIDDEN (__rela_iplt_end = .); - } - .init : - { - KEEP (*(SORT_NONE(.init))) - } - .plt : { *(.plt) *(.iplt) } -.plt.got : { *(.plt.got) } -.plt.bnd : { *(.plt.bnd) } -.rct2_text 0x401000 : { *(.rct2_text) } -.rct2_data : { *(.rct2_data) } - .text : - { - *(.text.unlikely .text.*_unlikely .text.unlikely.*) - *(.text.exit .text.exit.*) - *(.text.startup .text.startup.*) - *(.text.hot .text.hot.*) - *(.text .stub .text.* .gnu.linkonce.t.*) - /* .gnu.warning sections are handled specially by elf32.em. */ - *(.gnu.warning) - } - .fini : - { - KEEP (*(SORT_NONE(.fini))) - } - PROVIDE (__etext = .); - PROVIDE (_etext = .); - PROVIDE (etext = .); - .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } - .rodata1 : { *(.rodata1) } - .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) } - .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) } - .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table - .gcc_except_table.*) } - .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) } - /* These sections are generated by the Sun/Oracle C++ compiler. */ - .exception_ranges : ONLY_IF_RO { *(.exception_ranges - .exception_ranges*) } - /* Adjust the address for the data segment. We want to adjust up to - the same address within the page on the next page up. */ - . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); - /* Exception handling */ - .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) } - .gnu_extab : ONLY_IF_RW { *(.gnu_extab) } - .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } - .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } - /* Thread Local Storage sections */ - .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } - .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } - .preinit_array : - { - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP (*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - } - .init_array : - { - PROVIDE_HIDDEN (__init_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) - KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) - PROVIDE_HIDDEN (__init_array_end = .); - } - .fini_array : - { - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) - KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) - PROVIDE_HIDDEN (__fini_array_end = .); - } - .ctors : - { - /* gcc uses crtbegin.o to find the start of - the constructors, so we make sure it is - first. Because this is a wildcard, it - doesn't matter if the user does not - actually link against crtbegin.o; the - linker won't look for a file to match a - wildcard. The wildcard also means that it - doesn't matter which directory crtbegin.o - is in. */ - KEEP (*crtbegin.o(.ctors)) - KEEP (*crtbegin?.o(.ctors)) - /* We don't want to include the .ctor section from - the crtend.o file until after the sorted ctors. - The .ctor section from the crtend file contains the - end of ctors marker and it must be last */ - KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) - KEEP (*(SORT(.ctors.*))) - KEEP (*(.ctors)) - } - .dtors : - { - KEEP (*crtbegin.o(.dtors)) - KEEP (*crtbegin?.o(.dtors)) - KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) - KEEP (*(SORT(.dtors.*))) - KEEP (*(.dtors)) - } - .jcr : { KEEP (*(.jcr)) } - .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) } - .dynamic : { *(.dynamic) } - .got : { *(.got) *(.igot) } - . = DATA_SEGMENT_RELRO_END (SIZEOF (.got.plt) >= 24 ? 24 : 0, .); - .got.plt : { *(.got.plt) *(.igot.plt) } - .data : - { - *(.data .data.* .gnu.linkonce.d.*) - SORT(CONSTRUCTORS) - } - .data1 : { *(.data1) } - _edata = .; PROVIDE (edata = .); - . = .; - __bss_start = .; - .bss : - { - *(.dynbss) - *(.bss .bss.* .gnu.linkonce.b.*) - *(COMMON) - /* Align here to ensure that the .bss section occupies space up to - _end. Align after .bss to ensure correct alignment even if the - .bss section disappears because there are no input sections. - FIXME: Why do we need it? When there is no .bss section, we don't - pad the .data section. */ - . = ALIGN(. != 0 ? 64 / 8 : 1); - } - .lbss : - { - *(.dynlbss) - *(.lbss .lbss.* .gnu.linkonce.lb.*) - *(LARGE_COMMON) - } - . = ALIGN(64 / 8); - . = SEGMENT_START("ldata-segment", .); - .lrodata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) : - { - *(.lrodata .lrodata.* .gnu.linkonce.lr.*) - } - .ldata ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) : - { - *(.ldata .ldata.* .gnu.linkonce.l.*) - . = ALIGN(. != 0 ? 64 / 8 : 1); - } - . = ALIGN(64 / 8); - _end = .; PROVIDE (end = .); - . = DATA_SEGMENT_END (.); - /* Stabs debugging sections. */ - .stab 0 : { *(.stab) } - .stabstr 0 : { *(.stabstr) } - .stab.excl 0 : { *(.stab.excl) } - .stab.exclstr 0 : { *(.stab.exclstr) } - .stab.index 0 : { *(.stab.index) } - .stab.indexstr 0 : { *(.stab.indexstr) } - .comment 0 : { *(.comment) } - /* DWARF debug sections. - Symbols in the DWARF debugging sections are relative to the beginning - of the section so we begin them at 0. */ - /* DWARF 1 */ - .debug 0 : { *(.debug) } - .line 0 : { *(.line) } - /* GNU DWARF 1 extensions */ - .debug_srcinfo 0 : { *(.debug_srcinfo) } - .debug_sfnames 0 : { *(.debug_sfnames) } - /* DWARF 1.1 and DWARF 2 */ - .debug_aranges 0 : { *(.debug_aranges) } - .debug_pubnames 0 : { *(.debug_pubnames) } - /* DWARF 2 */ - .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } - .debug_abbrev 0 : { *(.debug_abbrev) } - .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) } - .debug_frame 0 : { *(.debug_frame) } - .debug_str 0 : { *(.debug_str) } - .debug_loc 0 : { *(.debug_loc) } - .debug_macinfo 0 : { *(.debug_macinfo) } - /* SGI/MIPS DWARF 2 extensions */ - .debug_weaknames 0 : { *(.debug_weaknames) } - .debug_funcnames 0 : { *(.debug_funcnames) } - .debug_typenames 0 : { *(.debug_typenames) } - .debug_varnames 0 : { *(.debug_varnames) } - /* DWARF 3 */ - .debug_pubtypes 0 : { *(.debug_pubtypes) } - .debug_ranges 0 : { *(.debug_ranges) } - /* DWARF Extension. */ - .debug_macro 0 : { *(.debug_macro) } - .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } - /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) } -} diff --git a/distribution/openrct2.d.ts b/distribution/openrct2.d.ts index e9e4241336..d99848edb6 100644 --- a/distribution/openrct2.d.ts +++ b/distribution/openrct2.d.ts @@ -120,8 +120,8 @@ declare global { /** * A track piece coordinate and type within the game. */ - interface CarTrackLocation extends CoordsXYZD { - trackType: number; + interface CarTrackLocation extends Readonly { + readonly trackType: number; } /** @@ -331,7 +331,6 @@ declare global { queryAction(action: "bannersetstyle", args: BannerSetStyleArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "cheatset", args: CheatSetArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "clearscenery", args: ClearSceneryArgs, callback?: (result: GameActionResult) => void): void; - queryAction(action: "climateset", args: ClimateSetArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "footpathadditionplace", args: FootpathAdditionPlaceArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "footpathadditionremove", args: FootpathAdditionRemoveArgs, callback?: (result: GameActionResult) => void): void; queryAction(action: "footpathplace", args: FootpathPlaceArgs, callback?: (result: GameActionResult) => void): void; @@ -423,7 +422,6 @@ declare global { executeAction(action: "bannersetstyle", args: BannerSetStyleArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "cheatset", args: CheatSetArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "clearscenery", args: ClearSceneryArgs, callback?: (result: GameActionResult) => void): void; - executeAction(action: "climateset", args: ClimateSetArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "footpathadditionplace", args: FootpathAdditionPlaceArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "footpathadditionremove", args: FootpathAdditionRemoveArgs, callback?: (result: GameActionResult) => void): void; executeAction(action: "footpathplace", args: FootpathPlaceArgs, callback?: (result: GameActionResult) => void): void; @@ -620,12 +618,17 @@ declare global { "scenery_group" | "park_entrance" | "water" | + "scenario_text" | "terrain_surface" | "terrain_edge" | "station" | "music" | "footpath_surface" | - "footpath_railings"; + "footpath_railings" | + "audio" | + "peep_names" | + "peep_animations" | + "climate"; type HookType = "action.execute" | @@ -670,7 +673,6 @@ declare global { "bannersetstyle" | "cheatset" | "clearscenery" | - "climateset" | "footpathadditionplace" | "footpathadditionremove" | "footpathplace" | @@ -747,7 +749,8 @@ declare global { interface GameActionArgs { - flags?: number; // see GAME_COMMAND in openrct2/Game.h + /** @see `GameCommand` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/Game.h} */ + flags?: number; } interface BalloonPressArgs extends GameActionArgs { @@ -785,22 +788,38 @@ declare global { interface BannerSetStyleArgs extends GameActionArgs { id: number; - type: number; // 0: primary colour, 1: secondary colour: 2: no entry - parameter: number; // primary colour | secondary colour | 0: disable, 1: enable + /** + * `0`: Primary colour + * `1`: Secondary colour + * `2`: No entry + */ + type: number; + /** + * If {@link BannerSetStyleArgs.type} === 0 (primary), or === 1 (secondary): + * - `0`: Disable + * - `1`: Enable + */ + parameter: number; } interface CheatSetArgs extends GameActionArgs { - type: number; // see CheatType in openrct2/Cheats.h - param1: number; // see openrct2/actions/CheatSetAction.cpp - param2: number; // see openrct2/actions/CheatSetAction.cpp + /** @see {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/Cheats.h} */ + type: number; + /** @see {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/actions/CheatSetAction.h} */ + param1: number; + /** @see {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/actions/CheatSetAction.h} */ + param2: number; } interface ClearSceneryArgs extends GameActionArgs { - itemsToClear: number; // Bit mask. 1: small scenery and walls, 2: large scenery, 4: footpaths. - } - - interface ClimateSetArgs extends GameActionArgs { - climate: number; // 0: cool and wet, 1: warm, 2: hot and dry, 3: cold + /** + * Bitmask. + * + * - `1`: `(001)`: Small scenery and walls + * - `2`: `(010)`: Large scenery + * - `4`: `(100)`: Footpaths + */ + itemsToClear: number; } interface FootpathAdditionPlaceArgs extends GameActionArgs { @@ -820,22 +839,35 @@ declare global { x: number; y: number; z: number; - direction: number; // direction or 0xFF - object: number; // surface object + /** Direction or `0xFF` */ + direction: number; + /** Surface object */ + object: number; railingsObject: number; - slope: number; // 0: flat, 4,5,6,7: slope direction + 4 + /** + * - `0`: Flat + * - `4`, `5`, `6`, `7`: Slope direction + 4 + */ + slope: number; constructFlags: number; } - // see openrct2/actions/FootpathPlaceFromTrackAction + /** + * @see {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/actions/FootpathPlaceAction.h} + */ interface FootpathLayoutPlaceArgs extends GameActionArgs { x: number; y: number; z: number; - edges: number; // bit mask + /** Bitmask */ + edges: number; object: number; railingsObject: number; - slope: number; // 0: flat, 4,5,6,7: slope direction + 4 + /** + * - `0`: Flat + * - `4`, `5`, `6`, `7`: Slope direction + 4 + */ + slope: number; constructFlags: number; } @@ -849,10 +881,12 @@ declare global { speed: number; } - // recommendation: use Peep.setFlag instead of the GuestSetFlag action interface GuestSetFlagsArgs extends GameActionArgs { peep: number; - guestFlags: number; // see PEEP_FLAGS in openrct2/entity/Peep.h + /** + * @see `PEEP_FLAGS` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/entity/Peep.h} + */ + guestFlags: number; } interface GuestSetNameArgs extends GameActionArgs { @@ -865,11 +899,17 @@ declare global { y1: number; x2: number; y2: number; - setting: number; // 0: buy land, 1: buy construction rights + /** + * - `0`: Buy land + * - `1`: Buy construction rights + */ + setting: number; } - // x, y specify the centre. Only used for GameActionResult and 3D audio position. - // x1, y1, x2, y2 specify a map range + /** + * x, y specify the centre. Only used for {@link GameActionResult} and 3D audio position. + * x1, y1, x2, y2 specify a map range + */ interface LandLowerArgs extends GameActionArgs { x: number; y: number; @@ -877,11 +917,14 @@ declare global { y1: number; x2: number; y2: number; - selectionType: number; // see MAP_SELECT_TYPE in openrct2/world/Map.h + /** @see `MAP_SELECT_TYPE` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/world/Map.h} */ + selectionType: number; } - // x, y specify the centre. Only used for GameActionResult and 3D audio position. - // x1, y1, x2, y2 specify a map range + /** + * x, y specify the centre. Only used for {@link GameActionResult} and 3D audio position. + * x1, y1, x2, y2 specify a map range + */ interface LandRaiseArgs extends GameActionArgs { x: number; y: number; @@ -889,14 +932,16 @@ declare global { y1: number; x2: number; y2: number; - selectionType: number; // see MAP_SELECT_TYPE in openrct2/world/Map.h + /** @see `MAP_SELECT_TYPE` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/world/Map.h} */ + selectionType: number; } interface LandSetHeightArgs extends GameActionArgs { x: number; y: number; height: number; - style: number; // see openrct2/world/tile_element/Slope.h + /** @see {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/actions/LandSetHeightAction.h} */ + style: number; } interface LandSetRightsArgs extends GameActionArgs { @@ -904,12 +949,26 @@ declare global { y1: number; x2: number; y2: number; - setting: number; // 0: unown land, 1: unown construction rights, 2: set for sale, 3: set construction rights for sale, 4: set ownership - ownership: number; // only used if setting = 4 (set ownership). See OWNERSHIP in openrct2/world/Surface.h + /** + * - `0`: Unown land + * - `1`: Unown construction rights + * - `2`: Set for sale + * - `3`: Set construction rights for sale + * - `4`: Set ownership + */ + setting: number; + /** + * Only used if {@link LandSetRightsArgs.setting} === 4 (set ownership) + * + * @see {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/world/tile_element/SurfaceElement.h} + */ + ownership: number; } - // x, y specify the centre. Only used for GameActionResult and 3D audio position. - // x1, y1, x2, y2 specify a map range + /** + * x, y specify the centre. Only used for {@link GameActionResult} and 3D audio position. + * x1, y1, x2, y2 specify a map range + */ interface LandSmoothArgs extends GameActionArgs { x: number; y: number; @@ -917,7 +976,10 @@ declare global { y1: number; x2: number; y2: number; - selectionType: number; // see MAP_SELECT_TYPE in openrct2/world/Map.h + /** + * @see `MAP_SELECT_TYPE` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/world/Map.h} + */ + selectionType: number; isLowering: boolean; } @@ -952,8 +1014,18 @@ declare global { } interface LoadOrQuitArgs extends GameActionArgs { - mode: number; // 0: open save prompt, 1: close save prompt - savePromptMode: number; // 0: save before load, 1: save before quit. Only used if mode = 0 (open save prompt). + /** + * - `0`: Open save prompt + * - `1`: Close save prompt + */ + mode: number; + /** + * - `0`: Save before load + * - `1`: Save before quit + * + * Only used if {@link LoadOrQuitArgs.mode} === 0 (open save prompt) + */ + savePromptMode: number; } interface MapChangeSizeArgs extends GameActionArgs { @@ -977,16 +1049,46 @@ declare global { z: number; direction: number; ride: number; - mode: number; // 0: build, 1: move, 2: fill + /** + * - `0`: Build + * - `1`: Move + * - `2`: Fill + */ + mode: number; isInitialPlacement: boolean; } interface NetworkModifyGroupArgs extends GameActionArgs { - type: number; // 0: add group, 1: remove group, 2: set permissions, 3: set name, 4: set default - groupId: number; // ignored if type = 0 (add group) - name: string; // only used if type = 3 (set name) - permissionIndex: number; // only used if type = 2 (set permissions). See NetworkPermission in openrct2/network/NetworkAction.h - permissionState: number; // only used if type = 2 (set permissions). 0: toggle, 1: set all, 2: clear all + /** + * - `0`: Add group + * - `1`: Remove group + * - `2`: Set permissions + * - `3`: Set name + * - `4`: Set default + */ + type: number; + /** + * Ignored if {@link NetworkModifyGroupArgs.type} === 0 (add group) + */ + groupId: number; + /** + * Only used if {@link NetworkModifyGroupArgs.type} === 3 (set name) + */ + name: string; + /** + * Only used if {@link NetworkModifyGroupArgs.type} === 2 (set permissions) + * + * @see `NetworkPermission` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/network/NetworkAction.h} + */ + permissionIndex: number; + /** + * - `0`: Toggle + * - `1`: Set all + * - `2`: Clear all + * + * Only used if {@link NetworkModifyGroupArgs.type} === 2 (set permissions) + */ + permissionState: number; } interface ParkEntrancePlaceArgs extends GameActionArgs { @@ -1004,8 +1106,15 @@ declare global { } interface ParkMarketingArgs extends GameActionArgs { - type: number; // see ADVERTISING_CAMPAIGN in openrct2/management/Marketing.h - item: number; // ride id or shop item. See ShopItem in openrct2/ride/ShopItem.h + /** + * @see `ADVERTISTING_CAMPAIGN` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/management/Marketing.h} + */ + type: number; + /** + * Ride ID or Shop Item + * @see `ShopItem` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/ride/ShopItem.h} + */ + item: number; numweeks: number; } @@ -1028,25 +1137,63 @@ declare global { } interface ParkSetParameterArgs extends GameActionArgs { - parameter: number; // 0: close park, 1: open park, 2: set same price in park - value: number; // only used if parameter = 2 (set same price in park). Bit mask. See ShopItem in openrct2/ride/ShopItem.h + /** + * - `0`: Close park + * - `1`: Open park + * - `2`: Set same price in park + */ + parameter: number; + /** + * Only used if {@link ParkSetParameterArgs.parameter} === 2 (set same price in park). Bitmask. + * + * @see `ShopItem` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/ride/ShopItem.h} + */ + value: number; } interface ParkSetResearchFundingArgs extends GameActionArgs { - priorities: number; // bit mask. See ResearchCategory in openrct2/management/Research.h - fundingAmount: number; // 0: none, 1: minimal, 2: normal, 3: maximum + /** + * Bitmask. + * + * @see `ResearchCategory` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/management/Research.h} + */ + priorities: number; + /** + * - `0`: None + * - `1`: Minimal + * - `2`: Normal + * - `3`: Maximum + */ + fundingAmount: number; } interface PauseToggleArgs extends GameActionArgs { } interface PeepPickupArgs extends GameActionArgs { - type: number; // 0: pickup, 1: cancel, 2: place + /** + * - `0`: Pickup + * - `1`: Cancel + * - `3`: Place + */ + type: number; id: number; - x: number; // unused if type = 0. If type = 1 (cancel), this needs to be the peep's x position BEFORE pickup - y: number; // only used if type = 2 (place) - z: number; // only used if type = 2 (place) - playerId: number; // 0 in single player + /** + * Unused if {@link PeepPickupArgs.type} === 0. + * + * If {@link PeepPickupArgs.type} === 1 (cancel), this needs to be the peep's x position BEFORE pickup. + */ + x: number; + /** + * Only used if {@link PeepPickupArgs.type} === 2 (place) + */ + y: number; + /** + * Only used if {@link PeepPickupArgs.type} === 2 (place) + */ + z: number; + /** `0` in single player */ + playerId: number; } interface PeepSpawnPlaceArgs extends GameActionArgs { @@ -1075,7 +1222,11 @@ declare global { interface RideDemolishArgs extends GameActionArgs { ride: number; - modifyType: number; // 0: demolish, 1: renew + /** + * - `0`: Demolish + * - `1`: Renew + */ + modifyType: number; } interface RideEntranceExitPlaceArgs extends GameActionArgs { @@ -1097,20 +1248,39 @@ declare global { interface RideFreezeRatingArgs extends GameActionArgs { ride: number; - type: number; // 0: excitement, 1: intensity, 2: nausea + /** + * - `0`: Excitement + * - `1`: Intensity + * - `2`: Nausea + */ + type: number; value: number; } interface RideSetAppearanceArgs extends GameActionArgs { ride: number; - type: number; // see RideSetAppearanceType in openrct2/actions/RideSetAppearanceAction.h - // value: - // - if type is one of the track or vehicle colours: colour - // - if type is VehicleColourScheme: 0: all same, 1: per train, 2: per car - // - if type is EntranceStyle: entrance style - // - if type is SellingItemColourIsRandom: 0: disabled, 1: enabled + /** + * @see RideSetAppearanceType in + * {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/actions/RideSetAppearanceAction.h} + */ + type: number; + /** + * If {@link RideSetAppearanceArgs.type} is: + * - One of the track or vehicle colours: Colour + * - VehicleColourScheme: + * - `0`: All same + * - `1`: Per train + * - `2`: Per car + * - EntranceStyle: Entrance style + * - SellingItemColourIsRandom: + * - `0`: Disabled + * - `1`: Enabled + */ value: number; - index: number; // colour scheme index, only used if type is one of the track or vehicle colours + /** + * Color scheme index, only used if {@link RideSetAppearanceArgs.type} is one of the track or vehicle colours + */ + index: number; } interface RideSetColourSchemeArgs extends GameActionArgs { @@ -1135,24 +1305,47 @@ declare global { interface RideSetSettingArgs extends GameActionArgs { ride: number; - setting: number; // see RideSetSetting in openrct2/actions/RideSetSettingAction.h + /** + * @see `RideSetSetting` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/actions/RideSetSettingAction.h} + */ + setting: number; value: number; } interface RideSetStatusArgs extends GameActionArgs { ride: number; - status: number; // 0: closed, 1: open, 2: testing, 3: simulating + /** + * - `0`: Closed + * - `1`: Open + * - `2`: Testing + * - `3`: Simulating + */ + status: number; } interface RideSetVehicleArgs extends GameActionArgs { ride: number; - type: number; // 0: number of trains, 1: number of cars per train, 2: ride entry - value: number; // number value or sub type - colour: number; // only used if type is ride entry + /** + * - `0`: Number of trains + * - `1`: Number of cars per train + * - `2`: Ride entry + */ + type: number; + /** + * Number value or subtype of {@link RideSetVehicleArgs.type} + */ + value: number; + /** + * Only used if {@link RideSetVehicleArgs.type} === 2 (ride entry) + */ + colour: number; } interface ScenarioSetSettingArgs extends GameActionArgs { - setting: number; // see ScenarioSetSetting in openrct2/actions/ScenarioSetSettingAction.h + /** + * @see ScenarioSetSetting in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/actions/ScenarioSetSettingAction.h} + */ + setting: number; value: number; } @@ -1205,19 +1398,46 @@ declare global { interface StaffHireArgs extends GameActionArgs { autoPosition: boolean; - staffType: number; // 0: handyman, 1: mechanic, 2: security, 3: entertainer - costumeIndex: number; // peep animation object id to use as costume - staffOrders: number; // bit mask. See STAFF_ORDERS in openrct2/entity/Staff.h + /** + * - `0`: Handyman + * - `1`: Mechanic + * - `2`: Security + * - `3`: Entertainer + */ + staffType: number; + /** Peep animation object ID to use as costume */ + costumeIndex: number; + /** + * Bitmask. Only applies when {@link StaffHireArgs.staffType} === 0 (Handyman), or === 1 (Mechanic). + * + * Handyman: + * - `1`: `(0001)`: Sweeping + * - `2`: `(0010)`: Watering flowers + * - `4`: `(0100)`: Empty bins + * - `8`: `(1000)`: Mowing + * + * Mechanic: + * - `1`: `(0001)`: Inspect rides + * - `2`: `(0010)`: Fix rides + */ + staffOrders: number; } interface StaffSetColourArgs extends GameActionArgs { - staffType: number; // 0: handyman, 1: mechanic, 2: security, 3: entertainer + /** + * - `0`: Handyman + * - `1`: Mechanic + * - `2`: Security + * - `3`: Entertainer + */ + staffType: number; colour: number; } interface StaffSetCostumeArgs extends GameActionArgs { id: number; - costume: number; // see EntertainerCostume in openrct2/entity/Staff.h + /** @see `EntertainerCostume` in {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/entity/Staff.h} */ + costume: number; } interface StaffSetNameArgs extends GameActionArgs { @@ -1227,7 +1447,20 @@ declare global { interface StaffSetOrdersArgs extends GameActionArgs { id: number; - staffOrders: number; // bit mask. See STAFF_ORDERS in openrct2/entity/Staff.h + /** + * Bitmask. Only applies when {@link StaffHireArgs.staffType} === 0 (Handyman), or === 1 (Mechanic). + * + * Handyman: + * - `1`: `(0001)`: Sweeping + * - `2`: `(0010)`: Watering flowers + * - `4`: `(0100)`: Empty bins + * - `8`: `(1000)`: Mowing + * + * Mechanic: + * - `1`: `(0001)`: Inspect rides + * - `2`: `(0010)`: Fix rides + */ + staffOrders: number; } interface StaffSetPatrolAreaArgs extends GameActionArgs { @@ -1236,7 +1469,12 @@ declare global { y1: number; x2: number; y2: number; - mode: number; // 0: set, 1: unset, 2: clear all + /** + * - `0`: Set + * - `1`: Unset + * - `2`: Clear all + */ + mode: number; } interface SurfaceSetStyleArgs extends GameActionArgs { @@ -1248,16 +1486,28 @@ declare global { edgeStyle: number; } - // does not support TileModifyType::AnyPaste + /** + * @todo Does not support `TileModifyType::AnyPaste` + */ interface TileModifyArgs extends GameActionArgs { x: number; y: number; - setting: number; // see TileModifyType in openrct2/actions/TileModifyAction.h + /** + * @see `TileModifyType` in + * {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/actions/TileModifyAction.h} + */ + setting: number; value1: number; - value2: number; // see openrct2/actions/TileModifyAction.cpp + /** + * @see TileModifyType in + * {@link https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/actions/TileModifyAction.cpp} + */ + value2: number; } - // currently unsupported + /** + * @todo Currently unsupported + */ interface TrackDesignArgs extends GameActionArgs { x: number; y: number; @@ -1302,7 +1552,8 @@ declare global { y: number; z: number; object: number; - edge: number; // = direction + /** Direction */ + edge: number; primaryColour: number; secondaryColour: number; tertiaryColour: number; @@ -1514,7 +1765,12 @@ declare global { clearanceZ: number; occupiedQuadrants: number; isGhost: boolean; - isHidden: boolean; /** Take caution when changing this field, it may invalidate TileElements you have stored in your script. */ + /** + * Take caution when changing this field, it may invalidate TileElements you have stored in your script. + * + * @todo Need to validate if this comment still accurately describes behavior in latest OpenRCT2 + * */ + isHidden: boolean; } interface SurfaceElement extends BaseTileElement { @@ -1535,9 +1791,12 @@ declare global { interface FootpathElement extends BaseTileElement { type: "footpath"; - object: number | null; /** Legacy footpaths, still in use. */ - surfaceObject: number | null; /** NSF footpaths */ - railingsObject: number | null; /** NSF footpaths */ + /** Legacy footpaths, still in use. */ + object: number | null; + /** NSF footpaths */ + surfaceObject: number | null; + /** NSF footpaths */ + railingsObject: number | null; edges: number; corners: number; @@ -1782,8 +2041,8 @@ declare global { } /** - * Represents the definition of a loaded object that has one or more associated images. - */ + * Represents the definition of a loaded object that has one or more associated images. + */ interface LoadedImageObject extends LoadedObject { /** * Id of the objects base image. This is also known as the preview image. @@ -2298,9 +2557,9 @@ declare global { readonly endY: number; /** - * The relative starting direction. Usually 0, but will be 4 - * for diagonal segments. - */ + * The relative starting direction. Usually 0, but will be 4 + * for diagonal segments. + */ readonly beginDirection: Direction8; /** @@ -2671,7 +2930,7 @@ declare global { /** * The location and direction of where the car is on the track. */ - trackLocation: CarTrackLocation; + readonly trackLocation: CarTrackLocation; /** * The current g-forces of this car. @@ -2711,6 +2970,12 @@ declare global { * on the direction its moving in. */ travelBy(distance: number): void; + + /** + * Moves the vehicle to the track piece specified in the parameters. + * Coordinates are tile coords. + */ + moveToTrack(x: number, y: number, elemIndex: number): void; } type VehicleStatus = @@ -5362,7 +5627,6 @@ declare global { getObject(type: "footpath_addition", index: number): FootpathAdditionObject; getObject(type: "banner", index: number): BannerObject; getObject(type: "scenery_group", index: number): SceneryGroupObject; - getObject(type: "music", index: number): LoadedObject; /** * Gets all the currently loaded objects for a given object type. @@ -5376,7 +5640,6 @@ declare global { getAllObjects(type: "footpath_addition"): FootpathAdditionObject[]; getAllObjects(type: "banner"): BannerObject[]; getAllObjects(type: "scenery_group"): SceneryGroupObject[]; - getAllObjects(type: "music"): LoadedObject[]; } /** diff --git a/openrct2.proj b/openrct2.proj index 179c9a9f12..aff65a7162 100644 --- a/openrct2.proj +++ b/openrct2.proj @@ -45,8 +45,8 @@ 9984c1e317dcfb3aaf8e17f1db2ebb0f771e2373 https://github.com/OpenRCT2/title-sequences/releases/download/v0.4.14/title-sequences.zip 6c04781b959b468e1f65ec2d2f21f5aaa5e5724d - https://github.com/OpenRCT2/objects/releases/download/v1.5.1/objects.zip - e922b9fd779e7752176f1d0d8766c2ee6ad1e41b + https://github.com/OpenRCT2/objects/releases/download/v1.6.1/objects.zip + 749a9df9ed728676ef7c3b87c8a6b813069476d3 https://github.com/OpenRCT2/OpenSoundEffects/releases/download/v1.0.5/opensound.zip b1b1f1b241d2cbff63a1889c4dc5a09bdf769bfb https://github.com/OpenRCT2/OpenMusic/releases/download/v1.6/openmusic.zip diff --git a/resources/g2/logo_mono_dithered.png b/resources/g2/logo_mono_dithered.png new file mode 100644 index 0000000000..9767c5652e Binary files /dev/null and b/resources/g2/logo_mono_dithered.png differ diff --git a/resources/g2/sprites.json b/resources/g2/sprites.json index d1e343f862..2631c7ea90 100644 --- a/resources/g2/sprites.json +++ b/resources/g2/sprites.json @@ -363,6 +363,9 @@ "path": "icons/weather_blizzard.png", "x": 1 }, + { + "path": "logo_mono_dithered.png" + }, { "path": "loader/loader_hybrid_supports.png", "y": 10 @@ -9517,6 +9520,146 @@ "y": -2, "palette": "keep" }, + { + "path": "track/wooden/left_bank_front_swne.png", + "x": -2, + "y": -7 + }, + { + "path": "track/wooden/left_bank_front_nwse.png", + "x": -31, + "y": -7 + }, + { + "path": "track/wooden/left_bank_rails_front_swne.png", + "x": -3, + "y": -7 + }, + { + "path": "track/wooden/left_bank_rails_front_nwse.png", + "x": -31, + "y": -7 + }, + { + "path": "track/wooden/24225_front.png", + "x": 9, + "y": -15 + }, + { + "path": "track/wooden/24232_front.png", + "x": -30, + "y": -15 + }, + { + "path": "track/wooden/24249_front.png", + "x": -4, + "y": -24 + }, + { + "path": "track/wooden/24256_front.png", + "x": -30, + "y": -24 + }, + { + "path": "track/wooden/24261_front.png", + "x": 9, + "y": -23 + }, + { + "path": "track/wooden/24262_front.png", + "x": -32, + "y": -7 + }, + { + "path": "track/wooden/24267_front.png", + "x": -3, + "y": -8 + }, + { + "path": "track/wooden/24268_front.png", + "x": -30, + "y": -23 + }, + { + "path": "track/wooden/24277_front.png", + "x": -2, + "y": -16 + }, + { + "path": "track/wooden/24284_front.png", + "x": -32, + "y": -16 + }, + { + "path": "track/wooden/24285_front.png", + "x": -2, + "y": -16 + }, + { + "path": "track/wooden/24292_front.png", + "x": -31, + "y": -16 + }, + { + "path": "track/wooden/25091_front.png", + "x": 0, + "y": -15 + }, + { + "path": "track/wooden/25098_front.png", + "x": -30, + "y": -15 + }, + { + "path": "track/wooden/25115_front.png", + "x": -4, + "y": -24 + }, + { + "path": "track/wooden/25122_front.png", + "x": -30, + "y": -24 + }, + { + "path": "track/wooden/25127_front.png", + "x": -1, + "y": -23 + }, + { + "path": "track/wooden/25128_front.png", + "x": -32, + "y": -7 + }, + { + "path": "track/wooden/25133_front.png", + "x": -4, + "y": -8 + }, + { + "path": "track/wooden/25134_front.png", + "x": -30, + "y": -23 + }, + { + "path": "track/wooden/25143_front.png", + "x": -2, + "y": -16 + }, + { + "path": "track/wooden/25150_front.png", + "x": -32, + "y": -16 + }, + { + "path": "track/wooden/25151_front.png", + "x": -2, + "y": -16 + }, + { + "path": "track/wooden/25158_front.png", + "x": -31, + "y": -16 + }, { "path": "track/wooden/booster_1.png", "x": -34, @@ -9583,6 +9726,36 @@ "x": -30, "y": -8 }, + { + "path": "track/wooden/station_no_platform_sw_ne.png", + "x": -34, + "y": -8 + }, + { + "path": "track/wooden/station_no_platform_nw_se.png", + "x": -30, + "y": -8 + }, + { + "path": "track/wooden/station_no_platform_block_brake_open_sw_ne.png", + "x": -34, + "y": -8 + }, + { + "path": "track/wooden/station_no_platform_block_brake_open_nw_se.png", + "x": -30, + "y": -8 + }, + { + "path": "track/wooden/station_no_platform_block_brake_closed_sw_ne.png", + "x": -34, + "y": -8 + }, + { + "path": "track/wooden/station_no_platform_block_brake_closed_nw_se.png", + "x": -30, + "y": -8 + }, { "path": "track/wooden/classic_wooden_preview_track.png", "x": 1, diff --git a/resources/g2/track/lattice_triangle/booster_alt_1.png b/resources/g2/track/lattice_triangle/booster_alt_1.png index ef82684579..c6007e645d 100644 Binary files a/resources/g2/track/lattice_triangle/booster_alt_1.png and b/resources/g2/track/lattice_triangle/booster_alt_1.png differ diff --git a/resources/g2/track/lattice_triangle/booster_alt_3.png b/resources/g2/track/lattice_triangle/booster_alt_3.png index 68232970b1..405cda7bbb 100644 Binary files a/resources/g2/track/lattice_triangle/booster_alt_3.png and b/resources/g2/track/lattice_triangle/booster_alt_3.png differ diff --git a/resources/g2/track/lattice_triangle/diagonal_booster_0.png b/resources/g2/track/lattice_triangle/diagonal_booster_0.png index b3260656d3..1b7f9d83b6 100644 Binary files a/resources/g2/track/lattice_triangle/diagonal_booster_0.png and b/resources/g2/track/lattice_triangle/diagonal_booster_0.png differ diff --git a/resources/g2/track/lattice_triangle/diagonal_booster_1.png b/resources/g2/track/lattice_triangle/diagonal_booster_1.png index cb2f306260..552f3aaba9 100644 Binary files a/resources/g2/track/lattice_triangle/diagonal_booster_1.png and b/resources/g2/track/lattice_triangle/diagonal_booster_1.png differ diff --git a/resources/g2/track/lattice_triangle/diagonal_booster_alt_0.png b/resources/g2/track/lattice_triangle/diagonal_booster_alt_0.png index 259e83f917..d8b1fdae0b 100644 Binary files a/resources/g2/track/lattice_triangle/diagonal_booster_alt_0.png and b/resources/g2/track/lattice_triangle/diagonal_booster_alt_0.png differ diff --git a/resources/g2/track/lattice_triangle/diagonal_booster_alt_1.png b/resources/g2/track/lattice_triangle/diagonal_booster_alt_1.png index 98715fb7e8..cc91827c36 100644 Binary files a/resources/g2/track/lattice_triangle/diagonal_booster_alt_1.png and b/resources/g2/track/lattice_triangle/diagonal_booster_alt_1.png differ diff --git a/resources/g2/track/lattice_triangle/diagonal_booster_alt_2.png b/resources/g2/track/lattice_triangle/diagonal_booster_alt_2.png index 879a700f1b..0fd65a4400 100644 Binary files a/resources/g2/track/lattice_triangle/diagonal_booster_alt_2.png and b/resources/g2/track/lattice_triangle/diagonal_booster_alt_2.png differ diff --git a/resources/g2/track/lattice_triangle/diagonal_booster_alt_3.png b/resources/g2/track/lattice_triangle/diagonal_booster_alt_3.png index 7b160e3e18..b7617d6da9 100644 Binary files a/resources/g2/track/lattice_triangle/diagonal_booster_alt_3.png and b/resources/g2/track/lattice_triangle/diagonal_booster_alt_3.png differ diff --git a/resources/g2/track/lattice_triangle/liftbooster_alt_1.png b/resources/g2/track/lattice_triangle/liftbooster_alt_1.png index 53fcd60e5d..8bfb57d74d 100644 Binary files a/resources/g2/track/lattice_triangle/liftbooster_alt_1.png and b/resources/g2/track/lattice_triangle/liftbooster_alt_1.png differ diff --git a/resources/g2/track/lattice_triangle/liftbooster_alt_3.png b/resources/g2/track/lattice_triangle/liftbooster_alt_3.png index 70f4056169..66891b72d3 100644 Binary files a/resources/g2/track/lattice_triangle/liftbooster_alt_3.png and b/resources/g2/track/lattice_triangle/liftbooster_alt_3.png differ diff --git a/resources/g2/track/wooden/24225_front.png b/resources/g2/track/wooden/24225_front.png new file mode 100644 index 0000000000..9ed13b20ba Binary files /dev/null and b/resources/g2/track/wooden/24225_front.png differ diff --git a/resources/g2/track/wooden/24232_front.png b/resources/g2/track/wooden/24232_front.png new file mode 100644 index 0000000000..9ef7175228 Binary files /dev/null and b/resources/g2/track/wooden/24232_front.png differ diff --git a/resources/g2/track/wooden/24249_front.png b/resources/g2/track/wooden/24249_front.png new file mode 100644 index 0000000000..92f2bfcb97 Binary files /dev/null and b/resources/g2/track/wooden/24249_front.png differ diff --git a/resources/g2/track/wooden/24256_front.png b/resources/g2/track/wooden/24256_front.png new file mode 100644 index 0000000000..114948959a Binary files /dev/null and b/resources/g2/track/wooden/24256_front.png differ diff --git a/resources/g2/track/wooden/24261_front.png b/resources/g2/track/wooden/24261_front.png new file mode 100644 index 0000000000..6f011228d4 Binary files /dev/null and b/resources/g2/track/wooden/24261_front.png differ diff --git a/resources/g2/track/wooden/24262_front.png b/resources/g2/track/wooden/24262_front.png new file mode 100644 index 0000000000..d44fea02ea Binary files /dev/null and b/resources/g2/track/wooden/24262_front.png differ diff --git a/resources/g2/track/wooden/24267_front.png b/resources/g2/track/wooden/24267_front.png new file mode 100644 index 0000000000..b3b41c7e68 Binary files /dev/null and b/resources/g2/track/wooden/24267_front.png differ diff --git a/resources/g2/track/wooden/24268_front.png b/resources/g2/track/wooden/24268_front.png new file mode 100644 index 0000000000..cfd7a88b79 Binary files /dev/null and b/resources/g2/track/wooden/24268_front.png differ diff --git a/resources/g2/track/wooden/24277_front.png b/resources/g2/track/wooden/24277_front.png new file mode 100644 index 0000000000..c375bce9e9 Binary files /dev/null and b/resources/g2/track/wooden/24277_front.png differ diff --git a/resources/g2/track/wooden/24284_front.png b/resources/g2/track/wooden/24284_front.png new file mode 100644 index 0000000000..317b0c7075 Binary files /dev/null and b/resources/g2/track/wooden/24284_front.png differ diff --git a/resources/g2/track/wooden/24285_front.png b/resources/g2/track/wooden/24285_front.png new file mode 100644 index 0000000000..d304361ce4 Binary files /dev/null and b/resources/g2/track/wooden/24285_front.png differ diff --git a/resources/g2/track/wooden/24292_front.png b/resources/g2/track/wooden/24292_front.png new file mode 100644 index 0000000000..9b36bdea22 Binary files /dev/null and b/resources/g2/track/wooden/24292_front.png differ diff --git a/resources/g2/track/wooden/25091_front.png b/resources/g2/track/wooden/25091_front.png new file mode 100644 index 0000000000..1b5a2e0c93 Binary files /dev/null and b/resources/g2/track/wooden/25091_front.png differ diff --git a/resources/g2/track/wooden/25098_front.png b/resources/g2/track/wooden/25098_front.png new file mode 100644 index 0000000000..91e3e90186 Binary files /dev/null and b/resources/g2/track/wooden/25098_front.png differ diff --git a/resources/g2/track/wooden/25115_front.png b/resources/g2/track/wooden/25115_front.png new file mode 100644 index 0000000000..8f8abcfcaf Binary files /dev/null and b/resources/g2/track/wooden/25115_front.png differ diff --git a/resources/g2/track/wooden/25122_front.png b/resources/g2/track/wooden/25122_front.png new file mode 100644 index 0000000000..08ab6fa2fe Binary files /dev/null and b/resources/g2/track/wooden/25122_front.png differ diff --git a/resources/g2/track/wooden/25127_front.png b/resources/g2/track/wooden/25127_front.png new file mode 100644 index 0000000000..0f8ab4df1e Binary files /dev/null and b/resources/g2/track/wooden/25127_front.png differ diff --git a/resources/g2/track/wooden/25128_front.png b/resources/g2/track/wooden/25128_front.png new file mode 100644 index 0000000000..436675b480 Binary files /dev/null and b/resources/g2/track/wooden/25128_front.png differ diff --git a/resources/g2/track/wooden/25133_front.png b/resources/g2/track/wooden/25133_front.png new file mode 100644 index 0000000000..74e72072a4 Binary files /dev/null and b/resources/g2/track/wooden/25133_front.png differ diff --git a/resources/g2/track/wooden/25134_front.png b/resources/g2/track/wooden/25134_front.png new file mode 100644 index 0000000000..c19cb4e8da Binary files /dev/null and b/resources/g2/track/wooden/25134_front.png differ diff --git a/resources/g2/track/wooden/25143_front.png b/resources/g2/track/wooden/25143_front.png new file mode 100644 index 0000000000..f3a99a75d8 Binary files /dev/null and b/resources/g2/track/wooden/25143_front.png differ diff --git a/resources/g2/track/wooden/25150_front.png b/resources/g2/track/wooden/25150_front.png new file mode 100644 index 0000000000..9f7d311e37 Binary files /dev/null and b/resources/g2/track/wooden/25150_front.png differ diff --git a/resources/g2/track/wooden/25151_front.png b/resources/g2/track/wooden/25151_front.png new file mode 100644 index 0000000000..2e08ccfe20 Binary files /dev/null and b/resources/g2/track/wooden/25151_front.png differ diff --git a/resources/g2/track/wooden/25158_front.png b/resources/g2/track/wooden/25158_front.png new file mode 100644 index 0000000000..88bed8504e Binary files /dev/null and b/resources/g2/track/wooden/25158_front.png differ diff --git a/resources/g2/track/wooden/left_bank_front_nwse.png b/resources/g2/track/wooden/left_bank_front_nwse.png new file mode 100644 index 0000000000..30178dfc66 Binary files /dev/null and b/resources/g2/track/wooden/left_bank_front_nwse.png differ diff --git a/resources/g2/track/wooden/left_bank_front_swne.png b/resources/g2/track/wooden/left_bank_front_swne.png new file mode 100644 index 0000000000..bf305eadc0 Binary files /dev/null and b/resources/g2/track/wooden/left_bank_front_swne.png differ diff --git a/resources/g2/track/wooden/left_bank_rails_front_nwse.png b/resources/g2/track/wooden/left_bank_rails_front_nwse.png new file mode 100644 index 0000000000..210408c86c Binary files /dev/null and b/resources/g2/track/wooden/left_bank_rails_front_nwse.png differ diff --git a/resources/g2/track/wooden/left_bank_rails_front_swne.png b/resources/g2/track/wooden/left_bank_rails_front_swne.png new file mode 100644 index 0000000000..d9d7231ed6 Binary files /dev/null and b/resources/g2/track/wooden/left_bank_rails_front_swne.png differ diff --git a/resources/g2/track/wooden/station_no_platform_block_brake_closed_nw_se.png b/resources/g2/track/wooden/station_no_platform_block_brake_closed_nw_se.png new file mode 100644 index 0000000000..ee3e26d20a Binary files /dev/null and b/resources/g2/track/wooden/station_no_platform_block_brake_closed_nw_se.png differ diff --git a/resources/g2/track/wooden/station_no_platform_block_brake_closed_sw_ne.png b/resources/g2/track/wooden/station_no_platform_block_brake_closed_sw_ne.png new file mode 100644 index 0000000000..51fd52f6f0 Binary files /dev/null and b/resources/g2/track/wooden/station_no_platform_block_brake_closed_sw_ne.png differ diff --git a/resources/g2/track/wooden/station_no_platform_block_brake_open_nw_se.png b/resources/g2/track/wooden/station_no_platform_block_brake_open_nw_se.png new file mode 100644 index 0000000000..3339985da9 Binary files /dev/null and b/resources/g2/track/wooden/station_no_platform_block_brake_open_nw_se.png differ diff --git a/resources/g2/track/wooden/station_no_platform_block_brake_open_sw_ne.png b/resources/g2/track/wooden/station_no_platform_block_brake_open_sw_ne.png new file mode 100644 index 0000000000..a0af6aa105 Binary files /dev/null and b/resources/g2/track/wooden/station_no_platform_block_brake_open_sw_ne.png differ diff --git a/resources/g2/track/wooden/station_no_platform_nw_se.png b/resources/g2/track/wooden/station_no_platform_nw_se.png new file mode 100644 index 0000000000..b179c74b95 Binary files /dev/null and b/resources/g2/track/wooden/station_no_platform_nw_se.png differ diff --git a/resources/g2/track/wooden/station_no_platform_sw_ne.png b/resources/g2/track/wooden/station_no_platform_sw_ne.png new file mode 100644 index 0000000000..bf5f6edccd Binary files /dev/null and b/resources/g2/track/wooden/station_no_platform_sw_ne.png differ diff --git a/src/openrct2-android/app/src/main/CMakeLists.txt b/src/openrct2-android/app/src/main/CMakeLists.txt index 00b5d751e4..40c3f2c0e2 100644 --- a/src/openrct2-android/app/src/main/CMakeLists.txt +++ b/src/openrct2-android/app/src/main/CMakeLists.txt @@ -190,11 +190,11 @@ add_dependencies(bz2 libs) include_directories(SYSTEM "${CMAKE_BINARY_DIR}/libs/include") -include_directories(SYSTEM "${CMAKE_BINARY_DIR}/libs/include/freetype2") +include_directories(SYSTEM "${CMAKE_BINARY_DIR}/libs/include/freetype") include_directories(SYSTEM "${CMAKE_BINARY_DIR}/libs/include/SDL2") # now build app's shared lib -add_definitions(-DDISABLE_DISCORD_RPC -DDISABLE_OPENGL -DGL_GLEXT_PROTOTYPES -D__STDC_LIMIT_MACROS -DNO_TTF -DSDL_MAIN_HANDLED) +add_definitions(-DDISABLE_DISCORD_RPC -DDISABLE_OPENGL -DGL_GLEXT_PROTOTYPES -D__STDC_LIMIT_MACROS -DSDL_MAIN_HANDLED) # Enable scripting add_definitions(-DENABLE_SCRIPTING) @@ -250,7 +250,7 @@ file(GLOB_RECURSE OPENRCT2_CLI_SOURCES "${ORCT2_ROOT}/src/openrct2-cli/*.hpp") add_library(openrct2 SHARED ${LIBOPENRCT2_SOURCES}) -target_link_libraries(openrct2 android stdc++ log dl SDL2 png z icu icuuc icudata crypto ssl) +target_link_libraries(openrct2 android stdc++ log dl SDL2 png z icu icuuc icudata crypto ssl freetype) add_library(openrct2-ui SHARED ${OPENRCT2_GUI_SOURCES}) target_link_libraries(openrct2-ui openrct2 android stdc++ GLESv1_CM GLESv2 SDL2main speexdsp brotlicommon brotlidec bz2 freetype ogg vorbis vorbisfile FLAC) diff --git a/src/openrct2-ui/UiContext.Linux.cpp b/src/openrct2-ui/UiContext.Linux.cpp index 5bae0b072b..b56236a011 100644 --- a/src/openrct2-ui/UiContext.Linux.cpp +++ b/src/openrct2-ui/UiContext.Linux.cpp @@ -33,11 +33,11 @@ namespace OpenRCT2::Ui { - enum class DIALOG_TYPE + enum class DialogType { - NONE, - KDIALOG, - ZENITY, + none, + kdialog, + zenity, }; class LinuxContext final : public IPlatformUiContext @@ -101,18 +101,18 @@ namespace OpenRCT2::Ui LOG_VERBOSE(message.c_str()); std::string executablePath; - DIALOG_TYPE dtype = GetDialogApp(&executablePath); + DialogType dtype = GetDialogApp(&executablePath); switch (dtype) { - case DIALOG_TYPE::KDIALOG: + case DialogType::kdialog: { std::string cmd = String::stdFormat( "%s --title \"OpenRCT2\" --msgbox \"%s\"", executablePath.c_str(), message.c_str()); Platform::Execute(cmd); break; } - case DIALOG_TYPE::ZENITY: + case DialogType::zenity: { std::string cmd = String::stdFormat( "%s --title=\"OpenRCT2\" --info --text=\"%s\"", executablePath.c_str(), message.c_str()); @@ -146,10 +146,10 @@ namespace OpenRCT2::Ui std::string result; std::string executablePath; u8string directory = EscapePathForShell(desc.InitialDirectory + '/'); - DIALOG_TYPE dtype = GetDialogApp(&executablePath); + DialogType dtype = GetDialogApp(&executablePath); switch (dtype) { - case DIALOG_TYPE::KDIALOG: + case DialogType::kdialog: { std::string action = (desc.Type == FileDialogType::Open) ? "--getopenfilename" : "--getsavefilename"; std::string filter = GetKDialogFilterString(desc.Filters); @@ -163,7 +163,7 @@ namespace OpenRCT2::Ui } break; } - case DIALOG_TYPE::ZENITY: + case DialogType::zenity: { std::string action = "--file-selection"; std::string flags; @@ -217,7 +217,7 @@ namespace OpenRCT2::Ui ShowMessageBox(window, msg); return ShowFileDialog(window, desc); } - if (desc.Type == FileDialogType::Save && access(result.c_str(), F_OK) != -1 && dtype == DIALOG_TYPE::KDIALOG) + if (desc.Type == FileDialogType::Save && access(result.c_str(), F_OK) != -1 && dtype == DialogType::kdialog) { std::string cmd = String::stdFormat("%s --yesno \"Overwrite %s?\"", executablePath.c_str(), result.c_str()); if (Platform::Execute(cmd) != 0) @@ -233,10 +233,10 @@ namespace OpenRCT2::Ui { std::string result; std::string executablePath; - DIALOG_TYPE dtype = GetDialogApp(&executablePath); + DialogType dtype = GetDialogApp(&executablePath); switch (dtype) { - case DIALOG_TYPE::KDIALOG: + case DialogType::kdialog: { std::string output; std::string cmd = String::stdFormat( @@ -247,7 +247,7 @@ namespace OpenRCT2::Ui } break; } - case DIALOG_TYPE::ZENITY: + case DialogType::zenity: { std::string output; std::string cmd = String::stdFormat( @@ -270,7 +270,7 @@ namespace OpenRCT2::Ui if (!_hasFilePicker.has_value()) { std::string dummy; - _hasFilePicker = (GetDialogApp(&dummy) != DIALOG_TYPE::NONE); + _hasFilePicker = (GetDialogApp(&dummy) != DialogType::none); } return _hasFilePicker.value(); @@ -279,15 +279,15 @@ namespace OpenRCT2::Ui bool HasMenuSupport() override { std::string executablePath; - DIALOG_TYPE dtype = GetDialogApp(&executablePath); - return dtype != DIALOG_TYPE::NONE; + DialogType dtype = GetDialogApp(&executablePath); + return dtype != DialogType::none; } int32_t ShowMenuDialog( const std::vector& options, const std::string& title, const std::string& text) override { std::string executablePath; - DIALOG_TYPE dtype = GetDialogApp(&executablePath); + DialogType dtype = GetDialogApp(&executablePath); size_t longest_string = 0; for (const auto& option : options) @@ -304,7 +304,7 @@ namespace OpenRCT2::Ui switch (dtype) { - case DIALOG_TYPE::ZENITY: + case DialogType::zenity: { auto sb = StringBuilder(); sb.Append(String::stdFormat("zenity --list --column '' --width=%d --height=%d", width, height)); @@ -318,7 +318,7 @@ namespace OpenRCT2::Ui Platform::Execute(sb.GetBuffer(), &buff); return std::find(options.begin(), options.end(), buff) - options.begin(); } - case DIALOG_TYPE::KDIALOG: + case DialogType::kdialog: { auto sb = StringBuilder(); sb.Append(String::stdFormat("kdialog --geometry %dx%d --title '%s' --menu ", width, height, title.c_str())); @@ -342,7 +342,7 @@ namespace OpenRCT2::Ui } private: - static DIALOG_TYPE GetDialogApp(std::string* executablePath) + static DialogType GetDialogApp(std::string* executablePath) { // Prefer zenity as it offers more required features, e.g., overwrite // confirmation and selecting only existing files. @@ -351,13 +351,13 @@ namespace OpenRCT2::Ui // OpenRCT2 will fall back to an SDL pop-up if the user has neither. if (Platform::FindApp("zenity", executablePath)) { - return DIALOG_TYPE::ZENITY; + return DialogType::zenity; } if (Platform::FindApp("kdialog", executablePath)) { - return DIALOG_TYPE::KDIALOG; + return DialogType::kdialog; } - return DIALOG_TYPE::NONE; + return DialogType::none; } static std::string GetKDialogFilterString(const std::vector filters) diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index 394a14e83d..c7e1f25d34 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -180,7 +180,7 @@ public: return _scaleQuality; } - void SetFullscreenMode(FULLSCREEN_MODE mode) override + void SetFullscreenMode(FullscreenMode mode) override { static constexpr int32_t kSDLFullscreenFlags[] = { 0, @@ -190,7 +190,7 @@ public: uint32_t windowFlags = kSDLFullscreenFlags[EnumValue(mode)]; // HACK Changing window size when in fullscreen usually has no effect - if (mode == FULLSCREEN_MODE::FULLSCREEN) + if (mode == FullscreenMode::fullscreen) { SDL_SetWindowFullscreen(_window, 0); @@ -200,7 +200,7 @@ public: Config::Get().general.FullscreenWidth, Config::Get().general.FullscreenHeight); SDL_SetWindowSize(_window, resolution.Width, resolution.Height); } - else if (mode == FULLSCREEN_MODE::WINDOWED) + else if (mode == FullscreenMode::windowed) { SDL_SetWindowSize(_window, Config::Get().general.WindowWidth, Config::Get().general.WindowHeight); } @@ -820,7 +820,7 @@ private: UpdateFullscreenResolutions(); - SetFullscreenMode(static_cast(Config::Get().general.FullscreenMode)); + SetFullscreenMode(static_cast(Config::Get().general.FullscreenMode)); TriggerResize(); } diff --git a/src/openrct2-ui/UiStringIds.h b/src/openrct2-ui/UiStringIds.h index ef63bcabff..b760e3766a 100644 --- a/src/openrct2-ui/UiStringIds.h +++ b/src/openrct2-ui/UiStringIds.h @@ -574,11 +574,6 @@ namespace OpenRCT2 STR_CANT_REDUCE_INTEREST_RATE = 3255, STR_CANT_REDUCE_MAX_LOAN = 3253, STR_CASH_PER_GUEST_LABEL = 3260, - STR_CLIMATE_COOL_AND_WET = 3290, - STR_CLIMATE_WARM = STR_CLIMATE_COOL_AND_WET + 1, - STR_CLIMATE_HOT_AND_DRY = STR_CLIMATE_COOL_AND_WET + 2, - STR_CLIMATE_COLD = STR_CLIMATE_COOL_AND_WET + 3, - STR_CLIMATE_LABEL = 3289, STR_ENTRY_PRICE_LABEL = 3281, STR_FORBID_HIGH_CONSTRUCTION = 3271, STR_FORBID_HIGH_CONSTRUCTION_TIP = 3272, @@ -589,13 +584,15 @@ namespace OpenRCT2 STR_FORBID_TREE_REMOVAL = 3267, STR_FORBID_TREE_REMOVAL_TIP = 3268, STR_FREE_PARK_ENTER = 3279, - STR_GUESTS_PREFER_LESS_INTENSE_RIDES = 3256, - STR_GUESTS_PREFER_LESS_INTENSE_RIDES_TIP = 3257, - STR_GUESTS_PREFER_MORE_INTENSE_RIDES = 3258, - STR_GUESTS_PREFER_MORE_INTENSE_RIDES_TIP = 3259, STR_GUEST_INIT_HAPPINESS = 3261, STR_GUEST_INIT_HUNGER = 3262, STR_GUEST_INIT_THIRST = 3263, + STR_GUESTS_PREFER_INTENSITY_BALANCED = 6747, + STR_GUESTS_PREFER_INTENSITY_LABEL = 6745, + STR_GUESTS_PREFER_INTENSITY_LESS_INTENSE_RIDES = 6748, + STR_GUESTS_PREFER_INTENSITY_MORE_INTENSE_RIDES = 6749, + STR_GUESTS_PREFER_INTENSITY_NONE = 6746, + STR_GUESTS_PREFER_INTENSITY_TIP = 6750, STR_HARD_GUEST_GENERATION = 3275, STR_HARD_GUEST_GENERATION_TIP = 3276, STR_HARD_PARK_RATING = 3273, @@ -834,6 +831,7 @@ namespace OpenRCT2 STR_FILEBROWSER_CUSTOMISE_DATE = 6715, STR_FILEBROWSER_CUSTOMISE_FILENAME = 6714, STR_FILEBROWSER_CUSTOMISE_SIZE = 6716, + STR_FILEBROWSER_CUSTOMISE_PREVIEW = 6736, STR_FILEBROWSER_FILE_SIZE_VALUE = 6713, STR_FILEBROWSER_FOLDER_NAME_PROMPT = 5986, STR_FILEBROWSER_OVERWRITE_PROMPT = 2708, @@ -853,6 +851,7 @@ namespace OpenRCT2 STR_LANDSCAPE_SAVE_FAILED = 1049, STR_LOADSAVE_DEFAULT_TIP = 5892, STR_NAME_COLUMN = 5373, + STR_NO_PREVIEW_AVAILABLE = 6737, STR_OPENRCT2_HEIGHTMAP_FILE = 6055, STR_OPENRCT2_LANDSCAPE_FILE = 1045, STR_OPENRCT2_SAVED_GAME = 1043, @@ -861,6 +860,11 @@ namespace OpenRCT2 STR_PARENT_FOLDER_TIP = 6735, STR_RIGHTGUILLEMET = 6059, STR_SCENARIO_SAVE_FAILED = 1048, + STR_SUMMARY_CASH = 6740, + STR_SUMMARY_DATE = 6739, + STR_SUMMARY_NUM_GUESTS = 6742, + STR_SUMMARY_NUM_RIDES = 6741, + STR_SUMMARY_PARK_RATING = 6738, STR_TRACK_SAVE_FAILED = 5896, STR_UNABLE_TO_CREATE_FOLDER = 5987, diff --git a/src/openrct2-ui/WindowManager.cpp b/src/openrct2-ui/WindowManager.cpp index f476eba83b..db892c5860 100644 --- a/src/openrct2-ui/WindowManager.cpp +++ b/src/openrct2-ui/WindowManager.cpp @@ -257,14 +257,15 @@ public: intent->GetSIntExtra(INTENT_EXTRA_RIDE_ID)); case WindowClass::Loadsave: { - uint32_t type = intent->GetUIntExtra(INTENT_EXTRA_LOADSAVE_TYPE); + auto action = intent->GetEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION); + auto type = intent->GetEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE); std::string defaultPath = intent->GetStringExtra(INTENT_EXTRA_PATH); LoadSaveCallback callback = reinterpret_cast( intent->GetCloseCallbackExtra(INTENT_EXTRA_CALLBACK)); TrackDesign* trackDesign = static_cast(intent->GetPointerExtra(INTENT_EXTRA_TRACK_DESIGN)); auto* w = FileBrowser::OpenPreferred( - type, defaultPath, - [callback](int32_t result, std::string_view path) { + action, type, defaultPath, + [callback](ModalResult result, std::string_view path) { if (callback != nullptr) { callback(result, std::string(path).c_str()); @@ -585,6 +586,10 @@ public: { switch (windowClass) { + case WindowClass::EditorObjectSelection: + EditorObjectSelectionClose(); + break; + case WindowClass::NetworkStatus: WindowNetworkStatusClose(); break; @@ -687,7 +692,7 @@ public: { if (loc.x < 0) return false; - if (loc.y <= kTopToolbarHeight && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (loc.y <= kTopToolbarHeight && gLegacyScene != LegacyScene::titleSequence) return false; if (loc.x + width > ContextGetWidth()) return false; @@ -708,7 +713,7 @@ public: unk = screenWidth + (unk * 2); if (loc.x > unk) return false; - if (loc.y <= kTopToolbarHeight && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (loc.y <= kTopToolbarHeight && gLegacyScene != LegacyScene::titleSequence) return false; unk = screenHeight - (height / 4); if (loc.y > unk) @@ -726,7 +731,7 @@ public: else if (screenPos.x + width > screenWidth) screenPos.x = screenWidth - width; - auto toolbarAllowance = (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) ? 0 : (kTopToolbarHeight + 1); + auto toolbarAllowance = gLegacyScene == LegacyScene::titleSequence ? 0 : (kTopToolbarHeight + 1); if (height - toolbarAllowance > screenHeight || screenPos.y < toolbarAllowance) screenPos.y = toolbarAllowance; else if (screenPos.y + height - toolbarAllowance > screenHeight) @@ -930,6 +935,12 @@ public: */ void Close(WindowBase& w) override { + if (!w.CanClose()) + { + // Something's preventing this window from closing -- bail out early + return; + } + w.OnClose(); // Remove viewport @@ -1025,9 +1036,9 @@ public: { CloseByClass(WindowClass::Dropdown); - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) { - if (GetGameState().EditorStep != EditorStep::LandscapeEditor) + if (getGameState().editorStep != EditorStep::LandscapeEditor) return; } diff --git a/src/openrct2-ui/audio/AudioMixer.cpp b/src/openrct2-ui/audio/AudioMixer.cpp index a9a99b7665..e7e72fa33e 100644 --- a/src/openrct2-ui/audio/AudioMixer.cpp +++ b/src/openrct2-ui/audio/AudioMixer.cpp @@ -306,7 +306,7 @@ int32_t AudioMixer::ApplyVolume(const IAudioChannel* channel, void* buffer, size volumeAdjust *= _adjustSoundVolume; // Cap sound volume on title screen so music is more audible - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) { volumeAdjust = std::min(volumeAdjust, 0.75f); } diff --git a/src/openrct2-ui/drawing/BitmapReader.cpp b/src/openrct2-ui/drawing/BitmapReader.cpp index 6389a0d39f..17b168b4d4 100644 --- a/src/openrct2-ui/drawing/BitmapReader.cpp +++ b/src/openrct2-ui/drawing/BitmapReader.cpp @@ -32,7 +32,7 @@ namespace OpenRCT2::Ui // TODO Bitmaps aren't very complicated to read so we should probably just write our // own implementation in libopenrct2 and spare the AOT implementation registration. - static Image ReadBitmap(std::istream& istream, IMAGE_FORMAT format) + static Image ReadBitmap(std::istream& istream, ImageFormat format) { auto buffer = ReadToVector(istream); auto sdlStream = SDL_RWFromConstMem(buffer.data(), static_cast(buffer.size())); @@ -101,6 +101,6 @@ namespace OpenRCT2::Ui void RegisterBitmapReader() { - Imaging::SetReader(IMAGE_FORMAT::BITMAP, ReadBitmap); + Imaging::SetReader(ImageFormat::bitmap, ReadBitmap); } } // namespace OpenRCT2::Ui diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h b/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h index be094f3fbe..cdd4071a8c 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h +++ b/src/openrct2-ui/drawing/engines/opengl/DrawCommands.h @@ -112,6 +112,7 @@ namespace OpenRCT2::Ui GLuint colour; ivec4 bounds; GLint depth; + GLfloat zoom; enum { diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp index 331a3004ea..c329957b8d 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.cpp @@ -64,12 +64,12 @@ DrawRectShader::DrawRectShader() vTexColourAtlas, 1, GL_INT, sizeof(DrawRectCommand), reinterpret_cast(offsetof(DrawRectCommand, texColourAtlas))); glVertexAttribPointer( - vTexColourBounds, 4, GL_FLOAT, GL_FALSE, sizeof(DrawRectCommand), + vTexColourCoords, 4, GL_FLOAT, GL_FALSE, sizeof(DrawRectCommand), reinterpret_cast(offsetof(DrawRectCommand, texColourBounds))); glVertexAttribIPointer( vTexMaskAtlas, 1, GL_INT, sizeof(DrawRectCommand), reinterpret_cast(offsetof(DrawRectCommand, texMaskAtlas))); glVertexAttribPointer( - vTexMaskBounds, 4, GL_FLOAT, GL_FALSE, sizeof(DrawRectCommand), + vTexMaskCoords, 4, GL_FLOAT, GL_FALSE, sizeof(DrawRectCommand), reinterpret_cast(offsetof(DrawRectCommand, texMaskBounds))); glVertexAttribIPointer( vPalettes, 3, GL_INT, sizeof(DrawRectCommand), reinterpret_cast(offsetof(DrawRectCommand, palettes))); @@ -81,6 +81,8 @@ DrawRectShader::DrawRectShader() vBounds, 4, GL_INT, sizeof(DrawRectCommand), reinterpret_cast(offsetof(DrawRectCommand, bounds))); glVertexAttribIPointer( vDepth, 1, GL_INT, sizeof(DrawRectCommand), reinterpret_cast(offsetof(DrawRectCommand, depth))); + glVertexAttribPointer( + vZoom, 1, GL_FLOAT, GL_FALSE, sizeof(DrawRectCommand), reinterpret_cast(offsetof(DrawRectCommand, zoom))); glEnableVertexAttribArray(vVertMat + 0); glEnableVertexAttribArray(vVertMat + 1); @@ -90,25 +92,27 @@ DrawRectShader::DrawRectShader() glEnableVertexAttribArray(vClip); glEnableVertexAttribArray(vTexColourAtlas); - glEnableVertexAttribArray(vTexColourBounds); + glEnableVertexAttribArray(vTexColourCoords); glEnableVertexAttribArray(vTexMaskAtlas); - glEnableVertexAttribArray(vTexMaskBounds); + glEnableVertexAttribArray(vTexMaskCoords); glEnableVertexAttribArray(vPalettes); glEnableVertexAttribArray(vFlags); glEnableVertexAttribArray(vColour); glEnableVertexAttribArray(vBounds); glEnableVertexAttribArray(vDepth); + glEnableVertexAttribArray(vZoom); glVertexAttribDivisor(vClip, 1); glVertexAttribDivisor(vTexColourAtlas, 1); - glVertexAttribDivisor(vTexColourBounds, 1); + glVertexAttribDivisor(vTexColourCoords, 1); glVertexAttribDivisor(vTexMaskAtlas, 1); - glVertexAttribDivisor(vTexMaskBounds, 1); + glVertexAttribDivisor(vTexMaskCoords, 1); glVertexAttribDivisor(vPalettes, 1); glVertexAttribDivisor(vFlags, 1); glVertexAttribDivisor(vColour, 1); glVertexAttribDivisor(vBounds, 1); glVertexAttribDivisor(vDepth, 1); + glVertexAttribDivisor(vZoom, 1); Use(); glUniform1i(uTexture, 0); @@ -136,14 +140,15 @@ void DrawRectShader::GetLocations() vClip = GetAttributeLocation("vClip"); vTexColourAtlas = GetAttributeLocation("vTexColourAtlas"); - vTexColourBounds = GetAttributeLocation("vTexColourBounds"); + vTexColourCoords = GetAttributeLocation("vTexColourCoords"); vTexMaskAtlas = GetAttributeLocation("vTexMaskAtlas"); - vTexMaskBounds = GetAttributeLocation("vTexMaskBounds"); + vTexMaskCoords = GetAttributeLocation("vTexMaskCoords"); vPalettes = GetAttributeLocation("vPalettes"); vFlags = GetAttributeLocation("vFlags"); vColour = GetAttributeLocation("vColour"); vBounds = GetAttributeLocation("vBounds"); vDepth = GetAttributeLocation("vDepth"); + vZoom = GetAttributeLocation("vZoom"); vVertMat = GetAttributeLocation("vVertMat"); vVertVec = GetAttributeLocation("vVertVec"); diff --git a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h index aedfb14ede..bfb7057931 100644 --- a/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h +++ b/src/openrct2-ui/drawing/engines/opengl/DrawRectShader.h @@ -31,14 +31,15 @@ namespace OpenRCT2::Ui GLuint vClip; GLuint vTexColourAtlas; - GLuint vTexColourBounds; + GLuint vTexColourCoords; GLuint vTexMaskAtlas; - GLuint vTexMaskBounds; + GLuint vTexMaskCoords; GLuint vPalettes; GLuint vFlags; GLuint vColour; GLuint vBounds; GLuint vDepth; + GLuint vZoom; GLuint _vbo; GLuint _vboInstances; diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp index cef31e690a..ccf534dbf4 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLDrawingEngine.cpp @@ -358,9 +358,9 @@ public: return &_bitsDPI; } - DRAWING_ENGINE_FLAGS GetFlags() override + DrawingEngineFlags GetFlags() override { - return DEF_NONE; + return {}; } void InvalidateImage(uint32_t image) override @@ -534,6 +534,7 @@ void OpenGLDrawingContext::FillRect( command.bounds = { left, top, right + 1, bottom + 1 }; command.flags = DrawRectCommand::FLAG_NO_TEXTURE; command.depth = _drawCount++; + command.zoom = 1.0f; if (colour & 0x1000000) { @@ -569,6 +570,7 @@ void OpenGLDrawingContext::FilterRect( command.bounds = { left, top, right + 1, bottom + 1 }; command.flags = DrawRectCommand::FLAG_NO_TEXTURE; command.depth = _drawCount++; + command.zoom = 1.0f; } // Compute the bit code for a point p relative to the clip rectangle defined by topLeft and bottomRight @@ -676,7 +678,13 @@ void OpenGLDrawingContext::DrawLine(DrawPixelInfo& dpi, uint32_t colour, const S command.depth = _drawCount++; } -void OpenGLDrawingContext::DrawSprite(DrawPixelInfo& dpi, const ImageId imageId, int32_t x, int32_t y) +static auto EuclideanRemainder(const auto a, const auto b) +{ + const auto r = a % b; + return r >= 0 ? r : r + b; +}; + +void OpenGLDrawingContext::DrawSprite(DrawPixelInfo& dpi, const ImageId imageId, const int32_t x, const int32_t y) { auto g1Element = GfxGetG1Element(imageId); if (g1Element == nullptr) @@ -705,48 +713,33 @@ void OpenGLDrawingContext::DrawSprite(DrawPixelInfo& dpi, const ImageId imageId, } } + auto texture = _textureCache->GetOrLoadImageTexture(imageId); + int32_t left = x + g1Element->x_offset; int32_t top = y + g1Element->y_offset; - int32_t zoom_mask; - if (dpi.zoom_level >= ZoomLevel{ 0 }) - zoom_mask = dpi.zoom_level.ApplyTo(0xFFFFFFFF); - else - zoom_mask = 0xFFFFFFFF; - if (dpi.zoom_level != ZoomLevel{ 0 } && (g1Element->flags & G1_FLAG_RLE_COMPRESSION)) + int32_t xModifier = 0; + int32_t yModifier = 0; + int32_t widthModifier = 0; + + if (dpi.zoom_level > ZoomLevel{ 0 }) { - top -= ~zoom_mask; + const int32_t interval = dpi.zoom_level.ApplyTo(1); + + xModifier = EuclideanRemainder(left, interval); + xModifier = xModifier ? interval - xModifier : 0; + yModifier = EuclideanRemainder(top, interval); + widthModifier = EuclideanRemainder(left + g1Element->width, interval); + widthModifier = widthModifier ? interval - widthModifier : 0; + + texture.coords.x += xModifier; + texture.coords.y += (interval - 1) - yModifier; } - if (!(g1Element->flags & G1_FLAG_RLE_COMPRESSION)) - { - top &= zoom_mask; - left += ~zoom_mask; - } - - left &= zoom_mask; - - int32_t right = left + g1Element->width; - int32_t bottom = top + g1Element->height; - - if (dpi.zoom_level != ZoomLevel{ 0 } && (g1Element->flags & G1_FLAG_RLE_COMPRESSION)) - { - bottom += top & ~zoom_mask; - } - - if (left > right) - { - std::swap(left, right); - } - if (top > bottom) - { - std::swap(top, bottom); - } - - left = dpi.zoom_level.ApplyInversedTo(left); + left = dpi.zoom_level.ApplyInversedTo(left + xModifier); top = dpi.zoom_level.ApplyInversedTo(top); - right = dpi.zoom_level.ApplyInversedTo(right); - bottom = dpi.zoom_level.ApplyInversedTo(bottom); + int32_t right = left + dpi.zoom_level.ApplyInversedTo(g1Element->width + widthModifier); + int32_t bottom = top + dpi.zoom_level.ApplyInversedTo(g1Element->height + yModifier); const ScreenRect clip = CalculateClipping(dpi); left += clip.GetLeft() - dpi.x; @@ -754,7 +747,8 @@ void OpenGLDrawingContext::DrawSprite(DrawPixelInfo& dpi, const ImageId imageId, right += clip.GetLeft() - dpi.x; bottom += clip.GetTop() - dpi.y; - const auto texture = _textureCache->GetOrLoadImageTexture(imageId); + const float zoom = dpi.zoom_level >= ZoomLevel{ 0 } ? static_cast(dpi.zoom_level.ApplyTo(1)) + : 1.0f / static_cast(dpi.zoom_level.ApplyInversedTo(1)); int paletteCount; ivec3 palettes{}; @@ -794,14 +788,15 @@ void OpenGLDrawingContext::DrawSprite(DrawPixelInfo& dpi, const ImageId imageId, command.clip = { clip.GetLeft(), clip.GetTop(), clip.GetRight(), clip.GetBottom() }; command.texColourAtlas = texture.index; - command.texColourBounds = texture.normalizedBounds; + command.texColourBounds = texture.coords; command.texMaskAtlas = texture.index; - command.texMaskBounds = texture.normalizedBounds; + command.texMaskBounds = texture.coords; command.palettes = palettes; command.colour = palettes.x - (special ? 1 : 0); command.bounds = { left, top, right, bottom }; command.flags = special ? 0 : DrawRectCommand::FLAG_NO_TEXTURE | DrawRectCommand::FLAG_MASK; command.depth = _drawCount++; + command.zoom = zoom; } else { @@ -809,14 +804,15 @@ void OpenGLDrawingContext::DrawSprite(DrawPixelInfo& dpi, const ImageId imageId, command.clip = { clip.GetLeft(), clip.GetTop(), clip.GetRight(), clip.GetBottom() }; command.texColourAtlas = texture.index; - command.texColourBounds = texture.normalizedBounds; + command.texColourBounds = texture.coords; command.texMaskAtlas = 0; - command.texMaskBounds = { 0.0f, 0.0f, 0.0f, 0.0f }; + command.texMaskBounds = { 0.0f, 0.0f, texture.coords.z, texture.coords.w }; command.palettes = palettes; command.colour = 0; command.bounds = { left, top, right, bottom }; command.flags = paletteCount; command.depth = _drawCount++; + command.zoom = zoom; } } @@ -863,18 +859,22 @@ void OpenGLDrawingContext::DrawSpriteRawMasked( right += clip.GetLeft() - dpi.x; bottom += clip.GetTop() - dpi.y; + const float zoom = dpi.zoom_level >= ZoomLevel{ 0 } ? static_cast(dpi.zoom_level.ApplyTo(1)) + : 1.0f / static_cast(dpi.zoom_level.ApplyInversedTo(1)); + DrawRectCommand& command = _commandBuffers.rects.allocate(); command.clip = { clip.GetLeft(), clip.GetTop(), clip.GetRight(), clip.GetBottom() }; command.texColourAtlas = textureColour.index; - command.texColourBounds = textureColour.normalizedBounds; + command.texColourBounds = textureColour.coords; command.texMaskAtlas = textureMask.index; - command.texMaskBounds = textureMask.normalizedBounds; + command.texMaskBounds = textureMask.coords; command.palettes = { 0, 0, 0 }; command.flags = DrawRectCommand::FLAG_MASK; command.colour = 0; command.bounds = { left, top, right, bottom }; command.depth = _drawCount++; + command.zoom = zoom; } void OpenGLDrawingContext::DrawSpriteSolid(DrawPixelInfo& dpi, const ImageId image, int32_t x, int32_t y, uint8_t colour) @@ -918,12 +918,13 @@ void OpenGLDrawingContext::DrawSpriteSolid(DrawPixelInfo& dpi, const ImageId ima command.texColourAtlas = 0; command.texColourBounds = { 0.0f, 0.0f, 0.0f, 0.0f }; command.texMaskAtlas = texture.index; - command.texMaskBounds = texture.normalizedBounds; + command.texMaskBounds = texture.coords; command.palettes = { 0, 0, 0 }; command.flags = DrawRectCommand::FLAG_NO_TEXTURE | DrawRectCommand::FLAG_MASK; command.colour = colour & 0xFF; command.bounds = { left, top, right, bottom }; command.depth = _drawCount++; + command.zoom = 1.0f; } void OpenGLDrawingContext::DrawGlyph(DrawPixelInfo& dpi, const ImageId image, int32_t x, int32_t y, const PaletteMap& palette) @@ -961,11 +962,14 @@ void OpenGLDrawingContext::DrawGlyph(DrawPixelInfo& dpi, const ImageId image, in right += clip.GetLeft() - dpi.x; bottom += clip.GetTop() - dpi.y; + const float zoom = dpi.zoom_level >= ZoomLevel{ 0 } ? static_cast(dpi.zoom_level.ApplyTo(1)) + : 1.0f / static_cast(dpi.zoom_level.ApplyInversedTo(1)); + DrawRectCommand& command = _commandBuffers.rects.allocate(); command.clip = { clip.GetLeft(), clip.GetTop(), clip.GetRight(), clip.GetBottom() }; command.texColourAtlas = texture.index; - command.texColourBounds = texture.normalizedBounds; + command.texColourBounds = texture.coords; command.texMaskAtlas = 0; command.texMaskBounds = { 0.0f, 0.0f, 0.0f, 0.0f }; command.palettes = { 0, 0, 0 }; @@ -973,6 +977,7 @@ void OpenGLDrawingContext::DrawGlyph(DrawPixelInfo& dpi, const ImageId image, in command.colour = 0; command.bounds = { left, top, right, bottom }; command.depth = _drawCount++; + command.zoom = zoom; } void OpenGLDrawingContext::DrawTTFBitmap( @@ -1027,7 +1032,7 @@ void OpenGLDrawingContext::DrawTTFBitmap( DrawRectCommand& command = _commandBuffers.rects.allocate(); command.clip = { clip.GetLeft(), clip.GetTop(), clip.GetRight(), clip.GetBottom() }; command.texColourAtlas = texture.index; - command.texColourBounds = texture.normalizedBounds; + command.texColourBounds = texture.coords; command.texMaskAtlas = 0; command.texMaskBounds = { 0.0f, 0.0f, 0.0f, 0.0f }; command.palettes = { 0, 0, 0 }; @@ -1035,6 +1040,7 @@ void OpenGLDrawingContext::DrawTTFBitmap( command.colour = info->palette[3]; command.bounds = b; command.depth = _drawCount++; + command.zoom = 1.0f; } } if (info->flags & TEXT_DRAW_FLAG_INSET) @@ -1042,7 +1048,7 @@ void OpenGLDrawingContext::DrawTTFBitmap( DrawRectCommand& command = _commandBuffers.rects.allocate(); command.clip = { clip.GetLeft(), clip.GetTop(), clip.GetRight(), clip.GetBottom() }; command.texColourAtlas = texture.index; - command.texColourBounds = texture.normalizedBounds; + command.texColourBounds = texture.coords; command.texMaskAtlas = 0; command.texMaskBounds = { 0.0f, 0.0f, 0.0f, 0.0f }; command.palettes = { 0, 0, 0 }; @@ -1050,12 +1056,13 @@ void OpenGLDrawingContext::DrawTTFBitmap( command.colour = info->palette[3]; command.bounds = { left + 1, top + 1, right + 1, bottom + 1 }; command.depth = _drawCount++; + command.zoom = 1.0f; } auto& cmdBuf = hintingThreshold > 0 ? _commandBuffers.transparent : _commandBuffers.rects; DrawRectCommand& command = cmdBuf.allocate(); command.clip = { clip.GetLeft(), clip.GetTop(), clip.GetRight(), clip.GetBottom() }; command.texColourAtlas = texture.index; - command.texColourBounds = texture.normalizedBounds; + command.texColourBounds = texture.coords; command.texMaskAtlas = 0; command.texMaskBounds = { 0.0f, 0.0f, 0.0f, 0.0f }; command.palettes = { 0, 0, 0 }; @@ -1063,6 +1070,7 @@ void OpenGLDrawingContext::DrawTTFBitmap( command.colour = info->palette[1]; command.bounds = { left, top, right, bottom }; command.depth = _drawCount++; + command.zoom = 1.0f; #endif // NO_TTF } diff --git a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp index 88001df572..fcd5ba2888 100644 --- a/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/OpenGLShaderProgram.cpp @@ -59,7 +59,7 @@ GLuint OpenGLShader::GetShaderId() std::string OpenGLShader::GetPath(const std::string& name) { auto env = GetContext()->GetPlatformEnvironment(); - auto shadersPath = env->GetDirectoryPath(DIRBASE::OPENRCT2, DIRID::SHADER); + auto shadersPath = env->GetDirectoryPath(DirBase::openrct2, DirId::shaders); auto path = Path::Combine(shadersPath, name); if (_type == GL_VERTEX_SHADER) { @@ -74,7 +74,7 @@ std::string OpenGLShader::GetPath(const std::string& name) std::string OpenGLShader::ReadSourceCode(const std::string& path) { - auto fs = FileStream(path, FILE_MODE_OPEN); + auto fs = FileStream(path, FileMode::open); uint64_t fileLength = fs.GetLength(); if (fileLength > kMaxSourceSize) diff --git a/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp b/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp index 9d65a71149..ccd34f655d 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/TextureCache.cpp @@ -83,7 +83,7 @@ BasicTextureInfo TextureCache::GetOrLoadImageTexture(const ImageId imageId) const auto& info = _textureCache[index]; return { info.index, - info.normalizedBounds, + info.coords, }; } } @@ -123,7 +123,7 @@ BasicTextureInfo TextureCache::GetOrLoadGlyphTexture(const ImageId imageId, cons const auto& info = kvp->second; return { info.index, - info.normalizedBounds, + info.coords, }; } } @@ -151,7 +151,7 @@ BasicTextureInfo TextureCache::GetOrLoadBitmapTexture(ImageIndex image, const vo const auto& info = _textureCache[index]; return { info.index, - info.normalizedBounds, + info.coords, }; } } diff --git a/src/openrct2-ui/drawing/engines/opengl/TextureCache.h b/src/openrct2-ui/drawing/engines/opengl/TextureCache.h index 8b4830b123..c4a104c905 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TextureCache.h +++ b/src/openrct2-ui/drawing/engines/opengl/TextureCache.h @@ -63,7 +63,7 @@ namespace OpenRCT2::Ui struct BasicTextureInfo { GLuint index; - vec4 normalizedBounds; + vec4 coords; }; // Location of an image (texture atlas index, slot and normalized coordinates) @@ -124,7 +124,12 @@ namespace OpenRCT2::Ui info.index = _index; info.slot = slot; info.bounds = bounds; - info.normalizedBounds = NormalizeCoordinates(bounds); + info.coords = vec4{ + static_cast(bounds.x), + static_cast(bounds.y), + static_cast(_atlasWidth), + static_cast(_atlasHeight), + }; return info; } @@ -176,16 +181,6 @@ namespace OpenRCT2::Ui _imageSize * row + actualHeight, }; } - - [[nodiscard]] vec4 NormalizeCoordinates(const ivec4& coords) const - { - return vec4{ - coords.x / static_cast(_atlasWidth), - coords.y / static_cast(_atlasHeight), - coords.z / static_cast(_atlasWidth), - coords.w / static_cast(_atlasHeight), - }; - } }; class TextureCache final diff --git a/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp b/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp index 57ac757506..09a070bfd3 100644 --- a/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp +++ b/src/openrct2-ui/drawing/engines/opengl/TransparencyDepth.cpp @@ -13,8 +13,8 @@ #include #include - #include - #include + #include + #include namespace OpenRCT2::Ui { @@ -23,11 +23,18 @@ namespace OpenRCT2::Ui */ struct XData { - int32_t xposition; + int16_t xposition; + int16_t top; + int16_t bottom; bool begin; - int32_t top, bottom; }; - using SweepLine = std::vector; + + #ifdef _DEBUG + // Debug builds use a lot of stack so we have to keep it small. + using SweepLine = sfl::small_vector; + #else + using SweepLine = sfl::small_vector; + #endif /* * Creates a list of vertical bounding box edges, stored as xdata and sorted @@ -41,10 +48,10 @@ namespace OpenRCT2::Ui for (const DrawRectCommand& command : transparent) { - int32_t left = std::min(std::max(command.bounds.x, command.clip.x), command.clip.z); - int32_t top = std::min(std::max(command.bounds.y, command.clip.y), command.clip.w); - int32_t right = std::min(std::max(command.bounds.z, command.clip.x), command.clip.z); - int32_t bottom = std::min(std::max(command.bounds.w, command.clip.y), command.clip.w); + int16_t left = std::min(std::max(command.bounds.x, command.clip.x), command.clip.z); + int16_t top = std::min(std::max(command.bounds.y, command.clip.y), command.clip.w); + int16_t right = std::min(std::max(command.bounds.z, command.clip.x), command.clip.z); + int16_t bottom = std::min(std::max(command.bounds.w, command.clip.y), command.clip.w); assert(left <= right); assert(top <= bottom); @@ -53,8 +60,8 @@ namespace OpenRCT2::Ui if (top == bottom) continue; - x_sweep.push_back({ left, true, top, bottom }); - x_sweep.push_back({ right, false, top, bottom }); + x_sweep.push_back({ left, top, bottom, true }); + x_sweep.push_back({ right, top, bottom, false }); } std::sort(x_sweep.begin(), x_sweep.end(), [](const XData& a, const XData& b) -> bool { @@ -77,9 +84,10 @@ namespace OpenRCT2::Ui */ struct YData { - int32_t count, depth; + int32_t count; + int32_t depth; }; - using IntervalTree = std::map; + using IntervalTree = sfl::small_map; /* * Inserts the interval's top endpoint into the interval tree. If the endpoint @@ -87,7 +95,7 @@ namespace OpenRCT2::Ui */ static inline IntervalTree::iterator InsertTopEndpoint(IntervalTree& y_intersect, int32_t top) { - auto top_in = y_intersect.insert({ top, { 1, 0 } }); + auto top_in = y_intersect.emplace(top, YData{ 1, 0 }); IntervalTree::iterator top_it = top_in.first; if (top_in.second) { @@ -111,7 +119,7 @@ namespace OpenRCT2::Ui */ static inline IntervalTree::iterator InsertBottomEndpoint(IntervalTree& y_intersect, int32_t bottom) { - auto bottom_in = y_intersect.insert({ bottom, { 1, 1 } }); + auto bottom_in = y_intersect.emplace(bottom, YData{ 1, 1 }); IntervalTree::iterator bottom_it = bottom_in.first; if (bottom_in.second) { diff --git a/src/openrct2-ui/input/InputManager.cpp b/src/openrct2-ui/input/InputManager.cpp index ce73541c38..ea3bd81305 100644 --- a/src/openrct2-ui/input/InputManager.cpp +++ b/src/openrct2-ui/input/InputManager.cpp @@ -112,7 +112,7 @@ void InputManager::Process() void InputManager::HandleViewScrolling() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; auto& console = GetInGameConsole(); diff --git a/src/openrct2-ui/input/MouseInput.cpp b/src/openrct2-ui/input/MouseInput.cpp index fea008c3b6..a7c462e02f 100644 --- a/src/openrct2-ui/input/MouseInput.cpp +++ b/src/openrct2-ui/input/MouseInput.cpp @@ -32,11 +32,9 @@ #include #include #include -#include #include #include #include -#include #include #include @@ -124,7 +122,7 @@ namespace OpenRCT2 GameHandleInputMouse(screenCoords, state); } - if (_inputFlags & INPUT_FLAG_5) + if (gInputFlags.has(InputFlag::unk5)) { GameHandleInputMouse(screenCoords, state); } @@ -321,7 +319,8 @@ namespace OpenRCT2 switch (widget->type) { case WindowWidgetType::Viewport: - if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TITLE_DEMO))) + if (!(gLegacyScene == LegacyScene::trackDesignsManager + || gLegacyScene == LegacyScene::titleSequence)) { InputViewportDragBegin(*w); } @@ -393,11 +392,11 @@ namespace OpenRCT2 break; } - if (!InputTestFlag(INPUT_FLAG_4)) + if (!gInputFlags.has(InputFlag::unk4)) break; if (w->classification != _dragWidget.window_classification || w->number != _dragWidget.window_number - || !(_inputFlags & INPUT_FLAG_TOOL_ACTIVE)) + || !(gInputFlags.has(InputFlag::toolActive))) { break; } @@ -414,7 +413,7 @@ namespace OpenRCT2 _inputState = InputState::Reset; if (_dragWidget.window_number == w->number) { - if ((_inputFlags & INPUT_FLAG_TOOL_ACTIVE)) + if (gInputFlags.has(InputFlag::toolActive)) { w = windowMgr->FindByNumber( gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); @@ -423,7 +422,7 @@ namespace OpenRCT2 w->OnToolUp(gCurrentToolWidget.widget_index, screenCoords); } } - else if (!(_inputFlags & INPUT_FLAG_4)) + else if (!gInputFlags.has(InputFlag::unk4)) { ViewportInteractionLeftClick(screenCoords); } @@ -523,7 +522,7 @@ namespace OpenRCT2 int32_t targetWidth = _originalWindowWidth + differentialCoords.x - w.width; int32_t targetHeight = _originalWindowHeight + differentialCoords.y - w.height; - WindowResize(w, targetWidth, targetHeight); + WindowResizeByDelta(w, targetWidth, targetHeight); } } @@ -553,7 +552,7 @@ namespace OpenRCT2 } WindowUnfollowSprite(w); - // gInputFlags |= INPUT_FLAG_5; + // gInputFlags.set(InputFlag::unk5); } static void InputViewportDragContinue() @@ -1085,12 +1084,12 @@ namespace OpenRCT2 gInputDragLast = screenCoords; _dragWidget.window_classification = windowClass; _dragWidget.window_number = windowNumber; - if (_inputFlags & INPUT_FLAG_TOOL_ACTIVE) + if (gInputFlags.has(InputFlag::toolActive)) { w = windowMgr->FindByNumber(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); if (w != nullptr) { - InputSetFlag(INPUT_FLAG_4, true); + gInputFlags.set(InputFlag::unk4); w->OnToolDown(gCurrentToolWidget.widget_index, screenCoords); } } @@ -1107,6 +1106,7 @@ namespace OpenRCT2 case WindowWidgetType::Groupbox: case WindowWidgetType::ProgressBar: case WindowWidgetType::Placeholder: + case WindowWidgetType::HorizontalSeparator: // Non-interactive widget type break; case WindowWidgetType::ImgBtn: @@ -1130,7 +1130,7 @@ namespace OpenRCT2 gPressedWidget.window_classification = windowClass; gPressedWidget.window_number = windowNumber; gPressedWidget.widget_index = widgetIndex; - _inputFlags |= INPUT_FLAG_WIDGET_PRESSED; + gInputFlags.set(InputFlag::widgetPressed); _inputState = InputState::WidgetPressed; _clickRepeatTicks = gCurrentRealTimeTicks; @@ -1163,7 +1163,7 @@ namespace OpenRCT2 switch (window->widgets[widgetId].type) { case WindowWidgetType::Viewport: - if (!(_inputFlags & INPUT_FLAG_TOOL_ACTIVE)) + if (!gInputFlags.has(InputFlag::toolActive)) { if (ViewportInteractionLeftOver(screenCoords)) { @@ -1177,10 +1177,7 @@ namespace OpenRCT2 case WindowWidgetType::Frame: case WindowWidgetType::Resize: - if (!(window->flags & WF_RESIZABLE)) - break; - - if (window->min_width == window->max_width && window->min_height == window->max_height) + if (!window->canBeResized()) break; if (screenCoords.x < window->windowPos.x + window->width - 0x13) @@ -1228,7 +1225,7 @@ namespace OpenRCT2 */ void ProcessMouseTool(const ScreenCoordsXY& screenCoords) { - if (_inputFlags & INPUT_FLAG_TOOL_ACTIVE) + if (gInputFlags.has(InputFlag::toolActive)) { auto* windowMgr = GetWindowManager(); WindowBase* w = windowMgr->FindByNumber(gCurrentToolWidget.window_classification, gCurrentToolWidget.window_number); @@ -1240,65 +1237,6 @@ namespace OpenRCT2 } } - const std::map kColourToTip = { - { COLOUR_BLACK, STR_COLOUR_BLACK_TIP }, - { COLOUR_GREY, STR_COLOUR_GREY_TIP }, - { COLOUR_WHITE, STR_COLOUR_WHITE_TIP }, - { COLOUR_DARK_PURPLE, STR_COLOUR_DARK_PURPLE_TIP }, - { COLOUR_LIGHT_PURPLE, STR_COLOUR_LIGHT_PURPLE_TIP }, - { COLOUR_BRIGHT_PURPLE, STR_COLOUR_BRIGHT_PURPLE_TIP }, - { COLOUR_DARK_BLUE, STR_COLOUR_DARK_BLUE_TIP }, - { COLOUR_LIGHT_BLUE, STR_COLOUR_LIGHT_BLUE_TIP }, - { COLOUR_ICY_BLUE, STR_COLOUR_ICY_BLUE_TIP }, - { COLOUR_TEAL, STR_COLOUR_TEAL_TIP }, - { COLOUR_AQUAMARINE, STR_COLOUR_AQUAMARINE_TIP }, - { COLOUR_SATURATED_GREEN, STR_COLOUR_SATURATED_GREEN_TIP }, - { COLOUR_DARK_GREEN, STR_COLOUR_DARK_GREEN_TIP }, - { COLOUR_MOSS_GREEN, STR_COLOUR_MOSS_GREEN_TIP }, - { COLOUR_BRIGHT_GREEN, STR_COLOUR_BRIGHT_GREEN_TIP }, - { COLOUR_OLIVE_GREEN, STR_COLOUR_OLIVE_GREEN_TIP }, - { COLOUR_DARK_OLIVE_GREEN, STR_COLOUR_DARK_OLIVE_GREEN_TIP }, - { COLOUR_BRIGHT_YELLOW, STR_COLOUR_BRIGHT_YELLOW_TIP }, - { COLOUR_YELLOW, STR_COLOUR_YELLOW_TIP }, - { COLOUR_DARK_YELLOW, STR_COLOUR_DARK_YELLOW_TIP }, - { COLOUR_LIGHT_ORANGE, STR_COLOUR_LIGHT_ORANGE_TIP }, - { COLOUR_DARK_ORANGE, STR_COLOUR_DARK_ORANGE_TIP }, - { COLOUR_LIGHT_BROWN, STR_COLOUR_LIGHT_BROWN_TIP }, - { COLOUR_SATURATED_BROWN, STR_COLOUR_SATURATED_BROWN_TIP }, - { COLOUR_DARK_BROWN, STR_COLOUR_DARK_BROWN_TIP }, - { COLOUR_SALMON_PINK, STR_COLOUR_SALMON_PINK_TIP }, - { COLOUR_BORDEAUX_RED, STR_COLOUR_BORDEAUX_RED_TIP }, - { COLOUR_SATURATED_RED, STR_COLOUR_SATURATED_RED_TIP }, - { COLOUR_BRIGHT_RED, STR_COLOUR_BRIGHT_RED_TIP }, - { COLOUR_DARK_PINK, STR_COLOUR_DARK_PINK_TIP }, - { COLOUR_BRIGHT_PINK, STR_COLOUR_BRIGHT_PINK_TIP }, - { COLOUR_LIGHT_PINK, STR_COLOUR_LIGHT_PINK_TIP }, - { COLOUR_DARK_OLIVE_DARK, STR_COLOUR_DARK_OLIVE_DARK_TIP }, - { COLOUR_DARK_OLIVE_LIGHT, STR_COLOUR_DARK_OLIVE_LIGHT_TIP }, - { COLOUR_SATURATED_BROWN_LIGHT, STR_COLOUR_SATURATED_BROWN_LIGHT_TIP }, - { COLOUR_BORDEAUX_RED_DARK, STR_COLOUR_BORDEAUX_RED_DARK_TIP }, - { COLOUR_BORDEAUX_RED_LIGHT, STR_COLOUR_BORDEAUX_RED_LIGHT_TIP }, - { COLOUR_GRASS_GREEN_DARK, STR_COLOUR_GRASS_GREEN_DARK_TIP }, - { COLOUR_GRASS_GREEN_LIGHT, STR_COLOUR_GRASS_GREEN_LIGHT_TIP }, - { COLOUR_OLIVE_DARK, STR_COLOUR_OLIVE_DARK_TIP }, - { COLOUR_OLIVE_LIGHT, STR_COLOUR_OLIVE_LIGHT_TIP }, - { COLOUR_SATURATED_GREEN_LIGHT, STR_COLOUR_SATURATED_GREEN_LIGHT_TIP }, - { COLOUR_TAN_DARK, STR_COLOUR_TAN_DARK_TIP }, - { COLOUR_TAN_LIGHT, STR_COLOUR_TAN_LIGHT_TIP }, - { COLOUR_DULL_PURPLE_LIGHT, STR_COLOUR_DULL_PURPLE_LIGHT_TIP }, - { COLOUR_DULL_GREEN_DARK, STR_COLOUR_DULL_GREEN_DARK_TIP }, - { COLOUR_DULL_GREEN_LIGHT, STR_COLOUR_DULL_GREEN_LIGHT_TIP }, - { COLOUR_SATURATED_PURPLE_DARK, STR_COLOUR_SATURATED_PURPLE_DARK_TIP }, - { COLOUR_SATURATED_PURPLE_LIGHT, STR_COLOUR_SATURATED_PURPLE_LIGHT_TIP }, - { COLOUR_ORANGE_LIGHT, STR_COLOUR_ORANGE_LIGHT_TIP }, - { COLOUR_AQUA_DARK, STR_COLOUR_AQUA_DARK_TIP }, - { COLOUR_MAGENTA_LIGHT, STR_COLOUR_MAGENTA_LIGHT_TIP }, - { COLOUR_DULL_BROWN_DARK, STR_COLOUR_DULL_BROWN_DARK_TIP }, - { COLOUR_DULL_BROWN_LIGHT, STR_COLOUR_DULL_BROWN_LIGHT_TIP }, - { COLOUR_INVISIBLE, STR_COLOUR_INVISIBLE_TIP }, - { COLOUR_VOID, STR_COLOUR_VOID_TIP }, - }; - /** * * rct2: 0x006E8DA7 @@ -1330,13 +1268,13 @@ namespace OpenRCT2 { gLastCloseModifier.window.number = w->number; gLastCloseModifier.window.classification = w->classification; - gLastCloseModifier.modifier = CloseWindowModifier::Shift; + gLastCloseModifier.modifier = CloseWindowModifier::shift; } else if (im.IsModifierKeyPressed(ModifierKey::ctrl)) { gLastCloseModifier.window.number = w->number; gLastCloseModifier.window.classification = w->classification; - gLastCloseModifier.modifier = CloseWindowModifier::Control; + gLastCloseModifier.modifier = CloseWindowModifier::control; } } } @@ -1376,7 +1314,7 @@ namespace OpenRCT2 } } - if (_inputFlags & INPUT_FLAG_WIDGET_PRESSED) + if (gInputFlags.has(InputFlag::widgetPressed)) { if (_inputState == InputState::DropdownActive) { @@ -1386,7 +1324,7 @@ namespace OpenRCT2 return; } - _inputFlags |= INPUT_FLAG_WIDGET_PRESSED; + gInputFlags.set(InputFlag::widgetPressed); windowMgr->InvalidateWidgetByNumber(cursor_w_class, cursor_w_number, widgetIndex); return; case MouseState::LeftRelease: @@ -1418,11 +1356,11 @@ namespace OpenRCT2 else { dropdown_index = -1; - if (_inputFlags & INPUT_FLAG_DROPDOWN_STAY_OPEN) + if (gInputFlags.has(InputFlag::dropdownStayOpen)) { - if (!(_inputFlags & INPUT_FLAG_DROPDOWN_MOUSE_UP)) + if (!gInputFlags.has(InputFlag::dropdownMouseUp)) { - _inputFlags |= INPUT_FLAG_DROPDOWN_MOUSE_UP; + gInputFlags.set(InputFlag::dropdownMouseUp); return; } } @@ -1439,9 +1377,9 @@ namespace OpenRCT2 else { cursor_w = windowMgr->FindByNumber(cursor_w_class, cursor_w_number); - if (_inputFlags & INPUT_FLAG_WIDGET_PRESSED) + if (gInputFlags.has(InputFlag::widgetPressed)) { - _inputFlags &= ~INPUT_FLAG_WIDGET_PRESSED; + gInputFlags.unset(InputFlag::widgetPressed); windowMgr->InvalidateWidgetByNumber(cursor_w_class, cursor_w_number, cursor_widgetIndex); } @@ -1501,14 +1439,14 @@ namespace OpenRCT2 if (_inputState != InputState::DropdownActive) { // Hold down widget and drag outside of area?? - if (_inputFlags & INPUT_FLAG_WIDGET_PRESSED) + if (gInputFlags.has(InputFlag::widgetPressed)) { - _inputFlags &= ~INPUT_FLAG_WIDGET_PRESSED; + gInputFlags.unset(InputFlag::widgetPressed); windowMgr->InvalidateWidgetByNumber(cursor_w_class, cursor_w_number, cursor_widgetIndex); } return; } - else if (gDropdownIsColour) + else if (gDropdownHasTooltips) { // This is ordinarily covered in InputWidgetOver but the dropdown with colours is a special case. InputUpdateTooltip(w, widgetIndex, screenCoords); @@ -1529,13 +1467,12 @@ namespace OpenRCT2 return; } - if (gDropdownIsColour && gDropdownLastColourHover != dropdown_index) + if (gDropdownHasTooltips && gDropdownLastTooltipHover != dropdown_index) { - gDropdownLastColourHover = dropdown_index; + gDropdownLastTooltipHover = dropdown_index; WindowTooltipClose(); - WindowTooltipShow( - OpenRCT2String{ kColourToTip.at(ColourDropDownIndexToColour(dropdown_index)), {} }, screenCoords); + WindowTooltipShow(OpenRCT2String{ gDropdownTooltips[dropdown_index], {} }, screenCoords); } if (dropdown_index < Dropdown::kItemsMaxSize && Dropdown::IsDisabled(dropdown_index)) @@ -1553,7 +1490,7 @@ namespace OpenRCT2 } else { - gDropdownLastColourHover = -1; + gDropdownLastTooltipHover = -1; WindowTooltipClose(); } } @@ -1659,7 +1596,8 @@ namespace OpenRCT2 mainWindow = WindowGetMain(); if (mainWindow == nullptr) return; - if ((mainWindow->flags & WF_NO_SCROLLING) || (gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TITLE_DEMO))) + if ((mainWindow->flags & WF_NO_SCROLLING) + || (gLegacyScene == LegacyScene::trackDesignsManager || gLegacyScene == LegacyScene::titleSequence)) return; if (mainWindow->viewport == nullptr) return; @@ -1743,12 +1681,12 @@ namespace OpenRCT2 } mainWindow->savedViewPos.x += dx; - _inputFlags |= INPUT_FLAG_VIEWPORT_SCROLLING; + gInputFlags.set(InputFlag::viewportScrolling); } if (scrollScreenCoords.y != 0) { mainWindow->savedViewPos.y += dy; - _inputFlags |= INPUT_FLAG_VIEWPORT_SCROLLING; + gInputFlags.set(InputFlag::viewportScrolling); } } } // namespace OpenRCT2 diff --git a/src/openrct2-ui/input/ShortcutManager.cpp b/src/openrct2-ui/input/ShortcutManager.cpp index 5d0e236c38..eaeff43e32 100644 --- a/src/openrct2-ui/input/ShortcutManager.cpp +++ b/src/openrct2-ui/input/ShortcutManager.cpp @@ -196,7 +196,7 @@ void ShortcutManager::LoadUserBindings() { try { - auto path = fs::u8path(_env->GetFilePath(PATHID::CONFIG_SHORTCUTS)); + auto path = fs::u8path(_env->GetFilePath(PathId::configShortcuts)); if (fs::exists(path)) { LoadUserBindings(path); @@ -206,7 +206,7 @@ void ShortcutManager::LoadUserBindings() try { Console::WriteLine("Importing legacy shortcuts..."); - auto legacyPath = fs::u8path(_env->GetFilePath(PATHID::CONFIG_SHORTCUTS_LEGACY)); + auto legacyPath = fs::u8path(_env->GetFilePath(PathId::configShortcutsLegacy)); if (fs::exists(legacyPath)) { LoadLegacyBindings(legacyPath); @@ -258,7 +258,7 @@ void ShortcutManager::LoadLegacyBindings(const fs::path& path) constexpr int32_t kSupportedFileVersion = 1; constexpr int32_t kMaxLegacyShortcuts = 85; - auto fs = FileStream(path, FILE_MODE_OPEN); + auto fs = FileStream(path, FileMode::open); auto version = fs.ReadValue(); if (version == kSupportedFileVersion) { @@ -317,7 +317,7 @@ void ShortcutManager::SaveUserBindings() { try { - auto path = fs::u8path(_env->GetFilePath(PATHID::CONFIG_SHORTCUTS)); + auto path = fs::u8path(_env->GetFilePath(PathId::configShortcuts)); SaveUserBindings(path); } catch (const std::exception& e) diff --git a/src/openrct2-ui/input/Shortcuts.cpp b/src/openrct2-ui/input/Shortcuts.cpp index 39a79f40d6..0b40dd0c9c 100644 --- a/src/openrct2-ui/input/Shortcuts.cpp +++ b/src/openrct2-ui/input/Shortcuts.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +55,7 @@ using namespace OpenRCT2::Ui::Windows; static void OpenWindow(WindowClass wc) { - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (gLegacyScene != LegacyScene::titleSequence) { ContextOpenWindow(wc); } @@ -64,7 +63,7 @@ static void OpenWindow(WindowClass wc) static void RotateCamera(int32_t direction) { - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (gLegacyScene != LegacyScene::titleSequence) { ViewportRotateAll(direction); } @@ -72,7 +71,7 @@ static void RotateCamera(int32_t direction) static void ToggleViewFlag(int32_t viewportFlag) { - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (gLegacyScene != LegacyScene::titleSequence) { auto window = WindowGetMain(); if (window != nullptr) @@ -85,7 +84,7 @@ static void ToggleViewFlag(int32_t viewportFlag) static void ShortcutRotateConstructionObject() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; auto* windowMgr = GetWindowManager(); @@ -153,7 +152,7 @@ static void ShortcutRemoveTopBottomToolbarToggle() { auto* windowMgr = GetWindowManager(); - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) { if (windowMgr->FindByClass(WindowClass::TitleLogo) != nullptr) { @@ -178,7 +177,7 @@ static void ShortcutRemoveTopBottomToolbarToggle() } else { - if (gScreenFlags == 0) + if (gLegacyScene == LegacyScene::playing) { ContextOpenWindow(WindowClass::TopToolbar); ContextOpenWindow(WindowClass::BottomToolbar); @@ -195,13 +194,13 @@ static void ShortcutRemoveTopBottomToolbarToggle() static void ShortcutAdjustLand() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR && GetGameState().EditorStep != EditorStep::LandscapeEditor) + if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor) return; - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (isInTrackDesignerOrManager()) return; ToggleLandWindow(); @@ -209,13 +208,13 @@ static void ShortcutAdjustLand() static void ShortcutAdjustWater() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR && GetGameState().EditorStep != EditorStep::LandscapeEditor) + if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor) return; - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (isInTrackDesignerOrManager()) return; ToggleWaterWindow(); @@ -223,13 +222,13 @@ static void ShortcutAdjustWater() static void ShortcutBuildScenery() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR && GetGameState().EditorStep != EditorStep::LandscapeEditor) + if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor) return; - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (isInTrackDesignerOrManager()) return; ToggleSceneryWindow(); @@ -237,13 +236,13 @@ static void ShortcutBuildScenery() static void ShortcutBuildPaths() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR && GetGameState().EditorStep != EditorStep::LandscapeEditor) + if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor) return; - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (isInTrackDesignerOrManager()) return; ToggleFootpathWindow(); @@ -251,12 +250,12 @@ static void ShortcutBuildPaths() static void ShortcutBuildNewRide() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)) + if (gLegacyScene != LegacyScene::scenarioEditor) { - if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) + if (!(isInTrackDesignerOrManager())) { ContextOpenWindow(WindowClass::ConstructRide); } @@ -265,20 +264,20 @@ static void ShortcutBuildNewRide() static void ShortcutShowFinancialInformation() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) - if (!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(isInTrackDesignerOrManager())) + if (!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) ContextOpenWindow(WindowClass::Finances); } static void ShortcutShowResearchInformation() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!isInEditorMode()) { ContextOpenWindowView(WV_RIDE_RESEARCH); } @@ -286,10 +285,10 @@ static void ShortcutShowResearchInformation() static void ShortcutShowRidesList() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!isInEditorMode()) { ContextOpenWindow(WindowClass::RideList); } @@ -297,10 +296,10 @@ static void ShortcutShowRidesList() static void ShortcutShowParkInformation() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!isInEditorMode()) { ContextOpenWindow(WindowClass::ParkInformation); } @@ -308,10 +307,10 @@ static void ShortcutShowParkInformation() static void ShortcutShowGuestList() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!isInEditorMode()) { ContextOpenWindow(WindowClass::GuestList); } @@ -319,10 +318,10 @@ static void ShortcutShowGuestList() static void ShortcutShowStaffList() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!isInEditorMode()) { ContextOpenWindow(WindowClass::StaffList); } @@ -330,26 +329,26 @@ static void ShortcutShowStaffList() static void ShortcutShowRecentMessages() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!isInEditorMode()) ContextOpenWindow(WindowClass::RecentNews); } static void ShortcutShowMap() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().EditorStep == EditorStep::LandscapeEditor) - if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) + if (gLegacyScene != LegacyScene::scenarioEditor || getGameState().editorStep == EditorStep::LandscapeEditor) + if (!(isInTrackDesignerOrManager())) ContextOpenWindow(WindowClass::Map); } static void ShortcutReduceGameSpeed() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; if (NetworkGetMode() == NETWORK_MODE_NONE) @@ -358,7 +357,7 @@ static void ShortcutReduceGameSpeed() static void ShortcutIncreaseGameSpeed() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; if (NetworkGetMode() == NETWORK_MODE_NONE) @@ -367,7 +366,7 @@ static void ShortcutIncreaseGameSpeed() static void ShortcutOpenCheatWindow() { - if (gScreenFlags != SCREEN_FLAGS_PLAYING) + if (gLegacyScene != LegacyScene::playing) return; // Check if window is already open @@ -388,7 +387,7 @@ static void ShortcutOpenKeyboardShortcutsWindow() static void ShortcutOpenTransparencyWindow() { - if (gScreenFlags != SCREEN_FLAGS_PLAYING) + if (gLegacyScene != LegacyScene::playing) return; ContextOpenWindow(WindowClass::Transparency); @@ -396,13 +395,13 @@ static void ShortcutOpenTransparencyWindow() static void ShortcutClearScenery() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR && GetGameState().EditorStep != EditorStep::LandscapeEditor) + if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor) return; - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (isInTrackDesignerOrManager()) return; ToggleClearSceneryWindow(); @@ -411,23 +410,24 @@ static void ShortcutClearScenery() static void ShortcutQuickSaveGame() { // Do a quick save in playing mode and a regular save in Scenario Editor mode. In other cases, don't do anything. - if (gScreenFlags == SCREEN_FLAGS_PLAYING) + if (gLegacyScene == LegacyScene::playing) { ToolCancel(); SaveGame(); } - else if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + else if (gLegacyScene == LegacyScene::scenarioEditor) { auto intent = Intent(WindowClass::Loadsave); - intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE); - intent.PutExtra(INTENT_EXTRA_PATH, GetGameState().ScenarioName); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::landscape); + intent.PutExtra(INTENT_EXTRA_PATH, getGameState().scenarioName); ContextOpenIntent(&intent); } } static void ShortcutLoadGame() { - if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) + if (!(isInTrackDesignerOrManager())) { auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt); GameActions::Execute(&loadOrQuitAction); @@ -436,8 +436,9 @@ static void ShortcutLoadGame() static void ShortcutOpenSceneryPicker() { - if ((gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) - || (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR && GetGameState().EditorStep != EditorStep::LandscapeEditor)) + if ((gLegacyScene == LegacyScene::titleSequence || gLegacyScene == LegacyScene::trackDesigner + || gLegacyScene == LegacyScene::trackDesignsManager) + || (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor)) return; auto* windowMgr = GetWindowManager(); @@ -609,7 +610,7 @@ static void ShortcutDecreaseElementHeight() static void ShortcutToggleClearanceChecks() { auto cheatSetAction = CheatSetAction( - CheatType::DisableClearanceChecks, GetGameState().Cheats.disableClearanceChecks ? 0 : 1); + CheatType::DisableClearanceChecks, getGameState().cheats.disableClearanceChecks ? 0 : 1); GameActions::Execute(&cheatSetAction); } @@ -629,7 +630,7 @@ static void ShortcutToggleConsole() static void ShortcutConstructionTurnLeft() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; auto* windowMgr = GetWindowManager(); @@ -646,7 +647,7 @@ static void ShortcutConstructionTurnLeft() static void ShortcutConstructionTurnRight() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; auto* windowMgr = GetWindowManager(); @@ -663,7 +664,7 @@ static void ShortcutConstructionTurnRight() static void ShortcutConstructionSlopeUp() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; auto* windowMgr = GetWindowManager(); @@ -680,7 +681,7 @@ static void ShortcutConstructionSlopeUp() static void ShortcutConstructionBuildCurrent() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; auto* windowMgr = GetWindowManager(); @@ -697,7 +698,7 @@ static void ShortcutConstructionBuildCurrent() static void ShortcutConstructionSlopeDown() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; auto* windowMgr = GetWindowManager(); @@ -714,7 +715,7 @@ static void ShortcutConstructionSlopeDown() static void ShortcutConstructionDemolishCurrent() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; auto* windowMgr = GetWindowManager(); @@ -731,7 +732,7 @@ static void ShortcutConstructionDemolishCurrent() static void ShortcutToggleTransparentWater() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; Config::Get().general.TransparentWater ^= 1; @@ -753,18 +754,18 @@ void ShortcutManager::RegisterDefaultShortcuts() }); RegisterShortcut(ShortcutId::kInterfaceCloseAll, STR_SHORTCUT_CLOSE_ALL_FLOATING_WINDOWS, "SHIFT+BACKSPACE", []() { auto* windowMgr = GetWindowManager(); - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR)) + if (gLegacyScene != LegacyScene::scenarioEditor) { windowMgr->CloseAll(); } - else if (GetGameState().EditorStep == EditorStep::LandscapeEditor) + else if (getGameState().editorStep == EditorStep::LandscapeEditor) { windowMgr->CloseTop(); } }); RegisterShortcut(ShortcutId::kInterfaceRotateConstruction, STR_SHORTCUT_ROTATE_CONSTRUCTION_OBJECT, "Z", ShortcutRotateConstructionObject); RegisterShortcut(ShortcutId::kInterfaceCancelConstruction, STR_SHORTCUT_CANCEL_CONSTRUCTION_MODE, "ESCAPE", []() { - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (gLegacyScene != LegacyScene::titleSequence) { auto* windowMgr = GetWindowManager(); auto window = windowMgr->FindByClass(WindowClass::Error); @@ -772,14 +773,14 @@ void ShortcutManager::RegisterDefaultShortcuts() { windowMgr->Close(*window); } - else if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) + else if (gInputFlags.has(InputFlag::toolActive)) { ToolCancel(); } } }); RegisterShortcut(ShortcutId::kInterfacePause, STR_SHORTCUT_PAUSE_GAME, "PAUSE", []() { - if (!(gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER))) + if (gLegacyScene != LegacyScene::titleSequence && gLegacyScene != LegacyScene::scenarioEditor && gLegacyScene != LegacyScene::trackDesignsManager) { auto pauseToggleAction = PauseToggleAction(); GameActions::Execute(&pauseToggleAction); @@ -797,7 +798,7 @@ void ShortcutManager::RegisterDefaultShortcuts() RegisterShortcut( ShortcutId::kInterfaceDisableClearance, STR_SHORTCUT_TOGGLE_CLEARANCE_CHECKS, ShortcutToggleClearanceChecks); RegisterShortcut(ShortcutId::kInterfaceMultiplayerChat, STR_SHORTCUT_SEND_MESSAGE, "C", []() { - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && ChatAvailable()) + if (gLegacyScene != LegacyScene::titleSequence && ChatAvailable()) { ChatToggle(); } @@ -895,13 +896,13 @@ void ShortcutManager::RegisterDefaultShortcuts() // Debug RegisterShortcut(ShortcutId::kDebugToggleConsole, STR_CONSOLE, "`", ShortcutToggleConsole); RegisterShortcut(ShortcutId::kDebugAdvanceTick, STR_SHORTCUT_ADVANCE_TO_NEXT_TICK, []() { - if (!(gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER))) + if (gLegacyScene != LegacyScene::titleSequence && gLegacyScene != LegacyScene::scenarioEditor && gLegacyScene != LegacyScene::trackDesignsManager) { gDoSingleUpdate = true; } }); RegisterShortcut(ShortcutId::kDebugTogglePaintDebugWindow, STR_SHORTCUT_DEBUG_PAINT_TOGGLE, []() { - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (gLegacyScene != LegacyScene::titleSequence) { auto* windowMgr = GetWindowManager(); auto window = windowMgr->FindByClass(WindowClass::DebugPaint); diff --git a/src/openrct2-ui/interface/Dropdown.h b/src/openrct2-ui/interface/Dropdown.h index ad494ecb5e..1ed45bf110 100644 --- a/src/openrct2-ui/interface/Dropdown.h +++ b/src/openrct2-ui/interface/Dropdown.h @@ -9,6 +9,7 @@ #pragma once +#include #include #include #include @@ -28,9 +29,10 @@ namespace OpenRCT2::Dropdown namespace OpenRCT2::Ui::Windows { extern int32_t gDropdownNumItems; - extern Dropdown::Item gDropdownItems[Dropdown::kItemsMaxSize]; - extern bool gDropdownIsColour; - extern int32_t gDropdownLastColourHover; + extern std::array gDropdownItems; + extern std::array gDropdownTooltips; + extern bool gDropdownHasTooltips; + extern int32_t gDropdownLastTooltipHover; extern int32_t gDropdownHighlightedIndex; extern int32_t gDropdownDefaultIndex; diff --git a/src/openrct2-ui/interface/FileBrowser.cpp b/src/openrct2-ui/interface/FileBrowser.cpp index b092a3dbc2..0a0727f82a 100644 --- a/src/openrct2-ui/interface/FileBrowser.cpp +++ b/src/openrct2-ui/interface/FileBrowser.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -33,7 +32,8 @@ namespace OpenRCT2::Ui::FileBrowser { static LoadSaveCallback _loadSaveCallback; - WindowBase* OpenPreferred(int32_t type, u8string defaultPath, LoadSaveCallback callback, TrackDesign* trackDesign) + WindowBase* OpenPreferred( + LoadSaveAction action, LoadSaveType type, u8string defaultPath, LoadSaveCallback callback, TrackDesign* trackDesign) { RegisterCallback(callback); @@ -43,19 +43,19 @@ namespace OpenRCT2::Ui::FileBrowser // Open system file picker? if (config.UseNativeBrowseDialog && hasFilePicker) { - const bool isSave = (type & 0x01) == LOADSAVETYPE_SAVE; + const bool isSave = (action == LoadSaveAction::save); const auto defaultDirectory = GetDir(type); const u8string path = OpenSystemFileBrowser(isSave, type, defaultDirectory, defaultPath); if (!path.empty()) { - Select(path.c_str(), type, trackDesign); + Select(path.c_str(), action, type, trackDesign); } return nullptr; } // Use built-in load/save window - return Windows::LoadsaveOpen(type, defaultPath, callback, trackDesign); + return Windows::LoadsaveOpen(action, type, defaultPath, callback, trackDesign); } bool ListItemSort(LoadSaveListItem& a, LoadSaveListItem& b) @@ -74,9 +74,9 @@ namespace OpenRCT2::Ui::FileBrowser case FileBrowserSort::DateAscending: return difftime(a.dateModified, b.dateModified) < 0; case FileBrowserSort::SizeDescending: - return a.fileSizeBytes - b.fileSizeBytes; + return a.fileSizeBytes > b.fileSizeBytes; case FileBrowserSort::SizeAscending: - return b.fileSizeBytes - a.fileSizeBytes; + return a.fileSizeBytes < b.fileSizeBytes; } return String::logicalCmp(a.name.c_str(), b.name.c_str()) < 0; } @@ -97,20 +97,20 @@ namespace OpenRCT2::Ui::FileBrowser return Platform::IsFilenameValid(filename); } - u8string GetLastDirectoryByType(int32_t type) + u8string GetLastDirectoryByType(LoadSaveType type) { - switch (type & 0x0E) + switch (type) { - case LOADSAVETYPE_GAME: + case LoadSaveType::park: return Config::Get().general.LastSaveGameDirectory; - case LOADSAVETYPE_LANDSCAPE: + case LoadSaveType::landscape: return Config::Get().general.LastSaveLandscapeDirectory; - case LOADSAVETYPE_SCENARIO: + case LoadSaveType::scenario: return Config::Get().general.LastSaveScenarioDirectory; - case LOADSAVETYPE_TRACK: + case LoadSaveType::track: return Config::Get().general.LastSaveTrackDirectory; default: @@ -118,56 +118,56 @@ namespace OpenRCT2::Ui::FileBrowser } } - u8string GetInitialDirectoryByType(const int32_t type) + u8string GetInitialDirectoryByType(const LoadSaveType type) { - std::optional subdir = std::nullopt; - switch (type & 0x0E) + std::optional subdir = std::nullopt; + switch (type) { - case LOADSAVETYPE_GAME: - subdir = DIRID::SAVE; + case LoadSaveType::park: + subdir = DirId::saves; break; - case LOADSAVETYPE_LANDSCAPE: - subdir = DIRID::LANDSCAPE; + case LoadSaveType::landscape: + subdir = DirId::landscapes; break; - case LOADSAVETYPE_SCENARIO: - subdir = DIRID::SCENARIO; + case LoadSaveType::scenario: + subdir = DirId::scenarios; break; - case LOADSAVETYPE_TRACK: - subdir = DIRID::TRACK; + case LoadSaveType::track: + subdir = DirId::trackDesigns; break; - case LOADSAVETYPE_HEIGHTMAP: - subdir = DIRID::HEIGHTMAP; + case LoadSaveType::heightmap: + subdir = DirId::heightmaps; break; } auto env = GetContext()->GetPlatformEnvironment(); if (subdir.has_value()) - return env->GetDirectoryPath(DIRBASE::USER, subdir.value()); + return env->GetDirectoryPath(DirBase::user, subdir.value()); else - return env->GetDirectoryPath(DIRBASE::USER); + return env->GetDirectoryPath(DirBase::user); } - const char* GetFilterPatternByType(const int32_t type, const bool isSave) + const char* GetFilterPatternByType(const LoadSaveType type, const bool isSave) { - switch (type & 0x0E) + switch (type) { - case LOADSAVETYPE_GAME: + case LoadSaveType::park: return isSave ? "*.park" : "*.park;*.sv6;*.sc6;*.sc4;*.sv4;*.sv7;*.sea"; - case LOADSAVETYPE_LANDSCAPE: + case LoadSaveType::landscape: return isSave ? "*.park" : "*.park;*.sc6;*.sv6;*.sc4;*.sv4;*.sv7;*.sea"; - case LOADSAVETYPE_SCENARIO: + case LoadSaveType::scenario: return isSave ? "*.park" : "*.park;*.sc6;*.sc4"; - case LOADSAVETYPE_TRACK: + case LoadSaveType::track: return isSave ? "*.td6" : "*.td6;*.td4"; - case LOADSAVETYPE_HEIGHTMAP: + case LoadSaveType::heightmap: return "*.bmp;*.png"; default: @@ -186,7 +186,7 @@ namespace OpenRCT2::Ui::FileBrowser return u8string{ pattern }; } - u8string GetDir(const int32_t type) + u8string GetDir(const LoadSaveType type) { u8string result = GetLastDirectoryByType(type); if (result.empty() || !Path::DirectoryExists(result)) @@ -196,12 +196,12 @@ namespace OpenRCT2::Ui::FileBrowser return result; } - void RegisterCallback(std::function callback) + void RegisterCallback(std::function callback) { _loadSaveCallback = callback; } - void InvokeCallback(int32_t result, const utf8* path) + void InvokeCallback(ModalResult result, const utf8* path) { if (_loadSaveCallback != nullptr) { @@ -209,7 +209,7 @@ namespace OpenRCT2::Ui::FileBrowser } } - void Select(const char* path, int32_t type, TrackDesign* trackDesignPtr) + void Select(const char* path, LoadSaveAction action, LoadSaveType type, TrackDesign* trackDesignPtr) { if (!IsValidPath(path)) { @@ -226,171 +226,218 @@ namespace OpenRCT2::Ui::FileBrowser windowMgr->CloseByClass(WindowClass::RideConstruction); windowMgr->CloseAllExceptClass(WindowClass::Loadsave); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - switch (type & 0x0F) + switch (action) { - case (LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME): - SetAndSaveConfigPath(Config::Get().general.LastSaveGameDirectory, pathBuffer); - if (GetContext()->LoadParkFromFile(pathBuffer)) + case LoadSaveAction::load: + { + switch (type) { - InvokeCallback(MODAL_RESULT_OK, pathBuffer); - windowMgr->CloseByClass(WindowClass::Loadsave); - GfxInvalidateScreen(); - } - else - { - auto windowManager = GetWindowManager(); - if (!windowManager->FindByClass(WindowClass::Error)) + case (LoadSaveType::park): { - // Not the best message... - ContextShowError(STR_LOAD_GAME, STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, {}); + SetAndSaveConfigPath(Config::Get().general.LastSaveGameDirectory, pathBuffer); + if (GetContext()->LoadParkFromFile(pathBuffer)) + { + InvokeCallback(ModalResult::ok, pathBuffer); + windowMgr->CloseByClass(WindowClass::Loadsave); + GfxInvalidateScreen(); + } + else + { + auto windowManager = GetWindowManager(); + if (!windowManager->FindByClass(WindowClass::Error)) + { + // Not the best message... + ContextShowError(STR_LOAD_GAME, STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, {}); + } + InvokeCallback(ModalResult::fail, pathBuffer); + } + break; } - InvokeCallback(MODAL_RESULT_FAIL, pathBuffer); - } - break; + case (LoadSaveType::landscape): + { + SetAndSaveConfigPath(Config::Get().general.LastSaveLandscapeDirectory, pathBuffer); + if (Editor::LoadLandscape(pathBuffer)) + { + gCurrentLoadedPath = pathBuffer; + GfxInvalidateScreen(); + InvokeCallback(ModalResult::ok, pathBuffer); + } + else + { + // Not the best message... + ContextShowError(STR_LOAD_LANDSCAPE, STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, {}); + InvokeCallback(ModalResult::fail, pathBuffer); + } + break; + } + case (LoadSaveType::scenario): + { + SetAndSaveConfigPath(Config::Get().general.LastSaveScenarioDirectory, pathBuffer); + int32_t parkFlagsBackup = gameState.park.Flags; + gameState.park.Flags &= ~PARK_FLAGS_SPRITES_INITIALISED; + gameState.editorStep = EditorStep::Invalid; + gameState.scenarioFileName = std::string(String::toStringView(pathBuffer, std::size(pathBuffer))); + int32_t success = ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2); + gameState.park.Flags = parkFlagsBackup; - case (LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME): - SetAndSaveConfigPath(Config::Get().general.LastSaveGameDirectory, pathBuffer); - if (ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 1 : 0)) - { - gScenarioSavePath = pathBuffer; - gCurrentLoadedPath = pathBuffer; - gIsAutosaveLoaded = false; - gFirstTimeSaving = false; + if (success) + { + windowMgr->CloseByClass(WindowClass::Loadsave); + InvokeCallback(ModalResult::ok, pathBuffer); - windowMgr->CloseByClass(WindowClass::Loadsave); - GfxInvalidateScreen(); - - InvokeCallback(MODAL_RESULT_OK, pathBuffer); - } - else - { - ContextShowError(STR_SAVE_GAME, STR_GAME_SAVE_FAILED, {}); - InvokeCallback(MODAL_RESULT_FAIL, pathBuffer); - } - break; - - case (LOADSAVETYPE_LOAD | LOADSAVETYPE_LANDSCAPE): - SetAndSaveConfigPath(Config::Get().general.LastSaveLandscapeDirectory, pathBuffer); - if (Editor::LoadLandscape(pathBuffer)) - { - gCurrentLoadedPath = pathBuffer; - GfxInvalidateScreen(); - InvokeCallback(MODAL_RESULT_OK, pathBuffer); - } - else - { - // Not the best message... - ContextShowError(STR_LOAD_LANDSCAPE, STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, {}); - InvokeCallback(MODAL_RESULT_FAIL, pathBuffer); - } - break; - - case (LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE): - SetAndSaveConfigPath(Config::Get().general.LastSaveLandscapeDirectory, pathBuffer); - gameState.ScenarioFileName = std::string(String::toStringView(pathBuffer, std::size(pathBuffer))); - if (ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2)) - { - gCurrentLoadedPath = pathBuffer; - windowMgr->CloseByClass(WindowClass::Loadsave); - GfxInvalidateScreen(); - InvokeCallback(MODAL_RESULT_OK, pathBuffer); - } - else - { - ContextShowError(STR_SAVE_LANDSCAPE, STR_LANDSCAPE_SAVE_FAILED, {}); - InvokeCallback(MODAL_RESULT_FAIL, pathBuffer); - } - break; - - case (LOADSAVETYPE_SAVE | LOADSAVETYPE_SCENARIO): - { - SetAndSaveConfigPath(Config::Get().general.LastSaveScenarioDirectory, pathBuffer); - int32_t parkFlagsBackup = gameState.Park.Flags; - gameState.Park.Flags &= ~PARK_FLAGS_SPRITES_INITIALISED; - gameState.EditorStep = EditorStep::Invalid; - gameState.ScenarioFileName = std::string(String::toStringView(pathBuffer, std::size(pathBuffer))); - int32_t success = ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2); - gameState.Park.Flags = parkFlagsBackup; - - if (success) - { - windowMgr->CloseByClass(WindowClass::Loadsave); - InvokeCallback(MODAL_RESULT_OK, pathBuffer); - - auto* context = GetContext(); - context->SetActiveScene(context->GetTitleScene()); - } - else - { - ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_SCENARIO, STR_SCENARIO_SAVE_FAILED, {}); - gameState.EditorStep = EditorStep::ObjectiveSelection; - InvokeCallback(MODAL_RESULT_FAIL, pathBuffer); + auto* context = GetContext(); + context->SetActiveScene(context->GetTitleScene()); + } + else + { + ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_SCENARIO, STR_SCENARIO_SAVE_FAILED, {}); + gameState.editorStep = EditorStep::ObjectiveSelection; + InvokeCallback(ModalResult::fail, pathBuffer); + } + break; + } + case (LoadSaveType::track): + { + SetAndSaveConfigPath(Config::Get().general.LastSaveTrackDirectory, pathBuffer); + auto intent = Intent(WindowClass::InstallTrack); + intent.PutExtra(INTENT_EXTRA_PATH, std::string{ pathBuffer }); + ContextOpenIntent(&intent); + windowMgr->CloseByClass(WindowClass::Loadsave); + InvokeCallback(ModalResult::ok, pathBuffer); + break; + } + case (LoadSaveType::heightmap): + { + windowMgr->CloseByClass(WindowClass::Loadsave); + InvokeCallback(ModalResult::ok, pathBuffer); + break; + } } break; } - - case (LOADSAVETYPE_LOAD | LOADSAVETYPE_TRACK): + case LoadSaveAction::save: { - SetAndSaveConfigPath(Config::Get().general.LastSaveTrackDirectory, pathBuffer); - auto intent = Intent(WindowClass::InstallTrack); - intent.PutExtra(INTENT_EXTRA_PATH, std::string{ pathBuffer }); - ContextOpenIntent(&intent); - windowMgr->CloseByClass(WindowClass::Loadsave); - InvokeCallback(MODAL_RESULT_OK, pathBuffer); - break; - } - - case (LOADSAVETYPE_SAVE | LOADSAVETYPE_TRACK): - { - SetAndSaveConfigPath(Config::Get().general.LastSaveTrackDirectory, pathBuffer); - - const auto withExtension = Path::WithExtension(pathBuffer, ".td6"); - String::set(pathBuffer, sizeof(pathBuffer), withExtension.c_str()); - - RCT2::T6Exporter t6Export{ *trackDesignPtr }; - - auto success = t6Export.SaveTrack(pathBuffer); - - if (success) + switch (type) { - windowMgr->CloseByClass(WindowClass::Loadsave); - Windows::WindowRideMeasurementsDesignCancel(); - InvokeCallback(MODAL_RESULT_OK, path); - } - else - { - ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_TRACK, STR_TRACK_SAVE_FAILED, {}); - InvokeCallback(MODAL_RESULT_FAIL, path); + case LoadSaveType::park: + { + SetAndSaveConfigPath(Config::Get().general.LastSaveGameDirectory, pathBuffer); + if (ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 1 : 0)) + { + gScenarioSavePath = pathBuffer; + gCurrentLoadedPath = pathBuffer; + gIsAutosaveLoaded = false; + gFirstTimeSaving = false; + + windowMgr->CloseByClass(WindowClass::Loadsave); + GfxInvalidateScreen(); + + InvokeCallback(ModalResult::ok, pathBuffer); + } + else + { + ContextShowError(STR_SAVE_GAME, STR_GAME_SAVE_FAILED, {}); + InvokeCallback(ModalResult::fail, pathBuffer); + } + break; + } + case LoadSaveType::landscape: + { + SetAndSaveConfigPath(Config::Get().general.LastSaveLandscapeDirectory, pathBuffer); + gameState.scenarioFileName = std::string(String::toStringView(pathBuffer, std::size(pathBuffer))); + if (ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2)) + { + gCurrentLoadedPath = pathBuffer; + windowMgr->CloseByClass(WindowClass::Loadsave); + GfxInvalidateScreen(); + InvokeCallback(ModalResult::ok, pathBuffer); + } + else + { + ContextShowError(STR_SAVE_LANDSCAPE, STR_LANDSCAPE_SAVE_FAILED, {}); + InvokeCallback(ModalResult::fail, pathBuffer); + } + break; + } + case LoadSaveType::scenario: + { + SetAndSaveConfigPath(Config::Get().general.LastSaveScenarioDirectory, pathBuffer); + int32_t parkFlagsBackup = gameState.park.Flags; + gameState.park.Flags &= ~PARK_FLAGS_SPRITES_INITIALISED; + gameState.editorStep = EditorStep::Invalid; + gameState.scenarioFileName = std::string(String::toStringView(pathBuffer, std::size(pathBuffer))); + int32_t success = ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2); + gameState.park.Flags = parkFlagsBackup; + + if (success) + { + windowMgr->CloseByClass(WindowClass::Loadsave); + InvokeCallback(ModalResult::ok, pathBuffer); + + auto* context = GetContext(); + context->SetActiveScene(context->GetTitleScene()); + } + else + { + ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_SCENARIO, STR_SCENARIO_SAVE_FAILED, {}); + gameState.editorStep = EditorStep::ObjectiveSelection; + InvokeCallback(ModalResult::fail, pathBuffer); + } + break; + } + case LoadSaveType::track: + { + SetAndSaveConfigPath(Config::Get().general.LastSaveTrackDirectory, pathBuffer); + + const auto withExtension = Path::WithExtension(pathBuffer, ".td6"); + String::set(pathBuffer, sizeof(pathBuffer), withExtension.c_str()); + + RCT2::T6Exporter t6Export{ *trackDesignPtr }; + + auto success = t6Export.SaveTrack(pathBuffer); + + if (success) + { + windowMgr->CloseByClass(WindowClass::Loadsave); + Windows::WindowRideMeasurementsDesignCancel(); + InvokeCallback(ModalResult::ok, path); + } + else + { + ContextShowError(STR_FILE_DIALOG_TITLE_SAVE_TRACK, STR_TRACK_SAVE_FAILED, {}); + InvokeCallback(ModalResult::fail, path); + } + break; + } + case LoadSaveType::heightmap: + { + break; + } } break; } - - case (LOADSAVETYPE_LOAD | LOADSAVETYPE_HEIGHTMAP): - windowMgr->CloseByClass(WindowClass::Loadsave); - InvokeCallback(MODAL_RESULT_OK, pathBuffer); - break; } } - StringId GetTitleStringId(int32_t type, bool isSave) + StringId GetTitleStringId(LoadSaveType type, bool isSave) { - switch (type & 0x0E) + switch (type) { - case LOADSAVETYPE_GAME: + case LoadSaveType::park: return isSave ? STR_FILE_DIALOG_TITLE_SAVE_GAME : STR_FILE_DIALOG_TITLE_LOAD_GAME; - case LOADSAVETYPE_LANDSCAPE: + case LoadSaveType::landscape: return isSave ? STR_FILE_DIALOG_TITLE_SAVE_LANDSCAPE : STR_FILE_DIALOG_TITLE_LOAD_LANDSCAPE; - case LOADSAVETYPE_SCENARIO: + case LoadSaveType::scenario: return STR_FILE_DIALOG_TITLE_SAVE_SCENARIO; - case LOADSAVETYPE_TRACK: + case LoadSaveType::track: return isSave ? STR_FILE_DIALOG_TITLE_SAVE_TRACK : STR_FILE_DIALOG_TITLE_INSTALL_NEW_TRACK_DESIGN; - case LOADSAVETYPE_HEIGHTMAP: + case LoadSaveType::heightmap: return STR_FILE_DIALOG_TITLE_LOAD_HEIGHTMAP; default: @@ -398,20 +445,20 @@ namespace OpenRCT2::Ui::FileBrowser } } - static u8string GetDefaultExtensionByType(int32_t type) + static u8string GetDefaultExtensionByType(LoadSaveType type) { - switch (type & 0x0E) + switch (type) { - case LOADSAVETYPE_GAME: + case LoadSaveType::park: return u8".park"; - case LOADSAVETYPE_LANDSCAPE: + case LoadSaveType::landscape: return u8".park"; - case LOADSAVETYPE_SCENARIO: + case LoadSaveType::scenario: return u8".park"; - case LOADSAVETYPE_TRACK: + case LoadSaveType::track: return u8".td6"; default: @@ -419,23 +466,23 @@ namespace OpenRCT2::Ui::FileBrowser } } - static Ui::FileDialogDesc::Filter GetFilterForType(int32_t type, bool isSave) + static Ui::FileDialogDesc::Filter GetFilterForType(LoadSaveType type, bool isSave) { - switch (type & 0x0E) + switch (type) { - case LOADSAVETYPE_GAME: + case LoadSaveType::park: return { LanguageGetString(STR_OPENRCT2_SAVED_GAME), GetFilterPatternByType(type, isSave) }; - case LOADSAVETYPE_LANDSCAPE: + case LoadSaveType::landscape: return { LanguageGetString(STR_OPENRCT2_LANDSCAPE_FILE), GetFilterPatternByType(type, isSave) }; - case LOADSAVETYPE_SCENARIO: + case LoadSaveType::scenario: return { LanguageGetString(STR_OPENRCT2_SCENARIO_FILE), GetFilterPatternByType(type, isSave) }; - case LOADSAVETYPE_TRACK: + case LoadSaveType::track: return { LanguageGetString(STR_OPENRCT2_TRACK_DESIGN_FILE), GetFilterPatternByType(type, isSave) }; - case LOADSAVETYPE_HEIGHTMAP: + case LoadSaveType::heightmap: return { LanguageGetString(STR_OPENRCT2_HEIGHTMAP_FILE), GetFilterPatternByType(type, isSave) }; default: @@ -444,7 +491,7 @@ namespace OpenRCT2::Ui::FileBrowser } } - u8string OpenSystemFileBrowser(bool isSave, int32_t type, u8string defaultDirectory, u8string defaultPath) + u8string OpenSystemFileBrowser(bool isSave, LoadSaveType type, u8string defaultDirectory, u8string defaultPath) { u8string path = defaultDirectory; if (isSave) @@ -456,7 +503,7 @@ namespace OpenRCT2::Ui::FileBrowser } else { - auto buffer = GetGameState().Park.Name; + auto buffer = getGameState().park.Name; if (buffer.empty()) { buffer = LanguageGetString(STR_UNNAMED_PARK); diff --git a/src/openrct2-ui/interface/FileBrowser.h b/src/openrct2-ui/interface/FileBrowser.h index baf4855785..f4754f92c1 100644 --- a/src/openrct2-ui/interface/FileBrowser.h +++ b/src/openrct2-ui/interface/FileBrowser.h @@ -10,11 +10,15 @@ #pragma once #include +#include #include #include #include #include +enum class LoadSaveAction : uint8_t; +enum class LoadSaveType : uint8_t; +enum class ModalResult : int8_t; struct TrackDesign; namespace OpenRCT2 @@ -44,20 +48,21 @@ namespace OpenRCT2::Ui::FileBrowser bool loaded{ false }; }; - using LoadSaveCallback = std::function; + using LoadSaveCallback = std::function; bool ListItemSort(LoadSaveListItem& a, LoadSaveListItem& b); void SetAndSaveConfigPath(u8string& config_str, u8string_view path); bool IsValidPath(const char* path); - u8string GetLastDirectoryByType(int32_t type); - u8string GetInitialDirectoryByType(const int32_t type); - const char* GetFilterPatternByType(const int32_t type, const bool isSave); + u8string GetLastDirectoryByType(LoadSaveType type); + u8string GetInitialDirectoryByType(const LoadSaveType type); + const char* GetFilterPatternByType(const LoadSaveType type, const bool isSave); u8string RemovePatternWildcard(u8string_view pattern); - u8string GetDir(const int32_t type); - void RegisterCallback(std::function callback); - void InvokeCallback(int32_t result, const utf8* path); - void Select(const char* path, int32_t type, TrackDesign* trackDesignPtr); - StringId GetTitleStringId(int32_t type, bool isSave); - u8string OpenSystemFileBrowser(bool isSave, int32_t type, u8string defaultDirectory, u8string defaultPath); - WindowBase* OpenPreferred(int32_t type, u8string defaultPath, LoadSaveCallback callback, TrackDesign* trackDesign); + u8string GetDir(const LoadSaveType type); + void RegisterCallback(std::function callback); + void InvokeCallback(ModalResult result, const utf8* path); + void Select(const char* path, LoadSaveAction action, LoadSaveType type, TrackDesign* trackDesignPtr); + StringId GetTitleStringId(LoadSaveType type, bool isSave); + u8string OpenSystemFileBrowser(bool isSave, LoadSaveType type, u8string defaultDirectory, u8string defaultPath); + WindowBase* OpenPreferred( + LoadSaveAction action, LoadSaveType type, u8string defaultPath, LoadSaveCallback callback, TrackDesign* trackDesign); } // namespace OpenRCT2::Ui::FileBrowser diff --git a/src/openrct2-ui/interface/LandTool.cpp b/src/openrct2-ui/interface/LandTool.cpp index d5fce04b1e..63af5d7263 100644 --- a/src/openrct2-ui/interface/LandTool.cpp +++ b/src/openrct2-ui/interface/LandTool.cpp @@ -19,7 +19,6 @@ #include #include #include -#include using namespace OpenRCT2; using namespace OpenRCT2::Ui::Windows; diff --git a/src/openrct2-ui/interface/Theme.cpp b/src/openrct2-ui/interface/Theme.cpp index 62bcf66c3f..55af08da4b 100644 --- a/src/openrct2-ui/interface/Theme.cpp +++ b/src/openrct2-ui/interface/Theme.cpp @@ -175,7 +175,7 @@ static constexpr WindowThemeDesc WindowThemeDescriptors[] = { WindowClass::Research, "WC_RESEARCH", STR_THEMES_WINDOW_RESEARCH, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, { WindowClass::Viewport, "WC_VIEWPORT", STR_THEMES_WINDOW_VIEWPORT, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, { WindowClass::Mapgen, "WC_MAPGEN", STR_THEMES_WINDOW_MAPGEN, COLOURS_3(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::Loadsave, "WC_LOADSAVE", STR_THEMES_WINDOW_LOADSAVE, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::Loadsave, "WC_LOADSAVE", STR_THEMES_WINDOW_LOADSAVE, COLOURS_3(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, { WindowClass::LoadsaveOverwritePrompt, "WC_LOADSAVE_OVERWRITE_PROMPT", STR_THEMES_WINDOW_LOADSAVE_OVERWRITE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, { WindowClass::TitleOptions, "WC_TITLE_OPTIONS", STR_THEMES_WINDOW_TITLE_MENU_OPTIONS, COLOURS_3(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN) ) }, { WindowClass::LandRights, "WC_LAND_RIGHTS", STR_THEMES_WINDOW_LAND_RIGHTS, COLOURS_3(opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, @@ -688,7 +688,7 @@ static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] = { auto context = GetContext(); auto env = context->GetPlatformEnvironment(); - return env->GetDirectoryPath(DIRBASE::USER, DIRID::THEME); + return env->GetDirectoryPath(DirBase::user, DirId::themes); } } // namespace ThemeManager diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index 7a00fa9115..54fffb09a6 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -44,12 +45,10 @@ #include #include #include -#include #include #include #include #include -#include #include #include #include @@ -83,11 +82,11 @@ namespace OpenRCT2::Ui { InteractionInfo info{}; // No click input for scenario editor or track manager - if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_MANAGER)) + if (gLegacyScene == LegacyScene::scenarioEditor || gLegacyScene == LegacyScene::trackDesignsManager) return info; // - if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && GetGameState().EditorStep != EditorStep::RollercoasterDesigner) + if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::RollercoasterDesigner) return info; info = GetMapCoordinatesFromPos( @@ -100,7 +99,7 @@ namespace OpenRCT2::Ui auto sprite = info.Entity; // Allows only balloons to be popped and ducks to be quacked in title screen - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) { if (info.interactionType == ViewportInteractionItem::Entity && (sprite->Is() || sprite->Is())) return info; @@ -147,8 +146,8 @@ namespace OpenRCT2::Ui break; case ViewportInteractionItem::ParkEntrance: { - auto& gameState = GetGameState(); - auto parkName = gameState.Park.Name.c_str(); + auto& gameState = getGameState(); + auto parkName = gameState.park.Name.c_str(); auto ft = Formatter(); ft.Add(STR_STRING); @@ -270,11 +269,11 @@ namespace OpenRCT2::Ui int32_t i; InteractionInfo info{}; // No click input for title screen or track manager - if (gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_MANAGER)) + if (gLegacyScene == LegacyScene::titleSequence || gLegacyScene == LegacyScene::trackDesignsManager) return info; // - if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && GetGameState().EditorStep != EditorStep::RollercoasterDesigner) + if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::RollercoasterDesigner) return info; constexpr auto flags = static_cast( @@ -287,7 +286,7 @@ namespace OpenRCT2::Ui case ViewportInteractionItem::Entity: { auto sprite = info.Entity; - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || sprite->Type != EntityType::Vehicle) + if (gLegacyScene == LegacyScene::scenarioEditor || sprite->Type != EntityType::Vehicle) { info.interactionType = ViewportInteractionItem::None; return info; @@ -300,18 +299,18 @@ namespace OpenRCT2::Ui return info; } ride = GetRide(vehicle->ride); - if (ride != nullptr && ride->status == RideStatus::Closed) + if (ride != nullptr && ride->status == RideStatus::closed) { auto ft = Formatter(); ft.Add(STR_MAP_TOOLTIP_STRINGID_CLICK_TO_MODIFY); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); SetMapTooltip(ft); } return info; } case ViewportInteractionItem::Ride: { - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) { info.interactionType = ViewportInteractionItem::None; return info; @@ -329,7 +328,7 @@ namespace OpenRCT2::Ui return info; } - if (ride->status != RideStatus::Closed) + if (ride->status != RideStatus::closed) return info; auto ft = Formatter(); @@ -340,7 +339,7 @@ namespace OpenRCT2::Ui StringId stringId; if (tileElement->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_RIDE_ENTRANCE) { - if (ride->num_stations > 1) + if (ride->numStations > 1) { stringId = STR_RIDE_STATION_X_ENTRANCE; } @@ -351,7 +350,7 @@ namespace OpenRCT2::Ui } else { - if (ride->num_stations > 1) + if (ride->numStations > 1) { stringId = STR_RIDE_STATION_X_EXIT; } @@ -365,7 +364,7 @@ namespace OpenRCT2::Ui else if (tileElement->AsTrack()->IsStation()) { StringId stringId; - if (ride->num_stations > 1) + if (ride->numStations > 1) { stringId = STR_RIDE_STATION_X; } @@ -378,19 +377,19 @@ namespace OpenRCT2::Ui else { // FIXME: Why does it *2 the value? - if (!GetGameState().Cheats.sandboxMode && !MapIsLocationOwned({ info.Loc, tileElement->GetBaseZ() * 2 })) + if (!getGameState().cheats.sandboxMode && !MapIsLocationOwned({ info.Loc, tileElement->GetBaseZ() * 2 })) { info.interactionType = ViewportInteractionItem::None; return info; } - ride->FormatNameTo(ft); + ride->formatNameTo(ft); return info; } - ride->FormatNameTo(ft); + ride->formatNameTo(ft); - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); ft.Add(GetRideComponentName(rtd.NameConvention.station).capitalised); StationIndex::UnderlyingType stationIndex; @@ -400,7 +399,7 @@ namespace OpenRCT2::Ui stationIndex = tileElement->AsTrack()->GetStationIndex().ToUnderlying(); for (i = stationIndex; i >= 0; i--) - if (ride->GetStations()[i].Start.IsNull()) + if (ride->getStations()[i].Start.IsNull()) stationIndex--; stationIndex++; ft.Add(stationIndex); @@ -466,7 +465,7 @@ namespace OpenRCT2::Ui break; } - if (!(InputTestFlag(INPUT_FLAG_6)) || !(InputTestFlag(INPUT_FLAG_TOOL_ACTIVE))) + if (!gInputFlags.has(InputFlag::unk6) || !gInputFlags.has(InputFlag::toolActive)) { auto* windowMgr = GetWindowManager(); if (windowMgr->FindByClass(WindowClass::RideConstruction) == nullptr @@ -510,7 +509,7 @@ namespace OpenRCT2::Ui return info; } case ViewportInteractionItem::ParkEntrance: - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) break; if (tileElement->GetType() != TileElementType::Entrance) diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index 3b80ae036c..bdc0442523 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -39,6 +39,7 @@ namespace OpenRCT2::Ui static void WidgetTextInset(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); static void WidgetTextBoxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); static void WidgetProgressBarDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); + static void WidgetHorizontalSeparatorDraw(DrawPixelInfo& dpi, WindowBase& w, const Widget& widget); static void WidgetGroupboxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); static void WidgetCaptionDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); static void WidgetCheckboxDraw(DrawPixelInfo& dpi, WindowBase& w, WidgetIndex widgetIndex); @@ -118,6 +119,9 @@ namespace OpenRCT2::Ui case WindowWidgetType::ProgressBar: WidgetProgressBarDraw(dpi, w, widgetIndex); break; + case WindowWidgetType::HorizontalSeparator: + WidgetHorizontalSeparatorDraw(dpi, w, *widget); + break; default: break; } @@ -145,10 +149,7 @@ namespace OpenRCT2::Ui // Draw the frame GfxFillRectInset(dpi, { leftTop, { r, b } }, colour, press); - // Check if the window can be resized - if (!(w.flags & WF_RESIZABLE)) - return; - if (w.min_width == w.max_width && w.min_height == w.max_height) + if (!w.canBeResized()) return; // Draw the resize sprite at the bottom right corner @@ -175,10 +176,7 @@ namespace OpenRCT2::Ui // Draw the panel GfxFillRectInset(dpi, { leftTop, { r, b } }, colour, 0); - // Check if the window can be resized - if (!(w.flags & WF_RESIZABLE)) - return; - if (w.min_width == w.max_width && w.min_height == w.max_height) + if (!w.canBeResized()) return; // Draw the resize sprite at the bottom right corner @@ -568,13 +566,13 @@ namespace OpenRCT2::Ui int32_t width = widget->width() - 4; if ((widget + 1)->type == WindowWidgetType::CloseBox) { - width -= kCloseButtonWidth; + width -= kCloseButtonSize; if ((widget + 2)->type == WindowWidgetType::CloseBox) - width -= kCloseButtonWidth; + width -= kCloseButtonSize; } topLeft.x += width / 2; if (Config::Get().interface.WindowButtonsOnTheLeft) - topLeft.x += kCloseButtonWidth; + topLeft.x += kCloseButtonSize; DrawTextEllipsised( dpi, topLeft, width, widget->text, Formatter::Common(), @@ -902,7 +900,7 @@ namespace OpenRCT2::Ui if (InputGetState() == InputState::WidgetPressed || InputGetState() == InputState::DropdownActive) { - if (!(InputTestFlag(INPUT_FLAG_WIDGET_PRESSED))) + if (!gInputFlags.has(InputFlag::widgetPressed)) return false; if (gPressedWidget.window_classification != w.classification) return false; @@ -1216,6 +1214,14 @@ namespace OpenRCT2::Ui } } + static void WidgetHorizontalSeparatorDraw(DrawPixelInfo& dpi, WindowBase& w, const Widget& widget) + { + ScreenCoordsXY topLeft{ w.windowPos + ScreenCoordsXY{ widget.left, widget.top } }; + ScreenCoordsXY bottomRight{ w.windowPos + ScreenCoordsXY{ widget.right, widget.bottom } }; + + GfxFillRectInset(dpi, { topLeft, bottomRight }, w.colours[1], INSET_RECT_FLAG_BORDER_INSET); + } + ImageId GetColourButtonImage(colour_t colour) { if (colour == COLOUR_INVISIBLE) diff --git a/src/openrct2-ui/interface/Window.cpp b/src/openrct2-ui/interface/Window.cpp index 1851e9be76..da278e5735 100644 --- a/src/openrct2-ui/interface/Window.cpp +++ b/src/openrct2-ui/interface/Window.cpp @@ -149,7 +149,7 @@ namespace OpenRCT2 */ static void WindowViewportWheelInput(WindowBase& w, int32_t wheel) { - if (gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TITLE_DEMO)) + if (gLegacyScene == LegacyScene::trackDesignsManager || gLegacyScene == LegacyScene::titleSequence) return; if (wheel < 0) @@ -273,7 +273,7 @@ namespace OpenRCT2 return; // Check window cursor is over - if (!(InputTestFlag(INPUT_FLAG_5))) + if (!gInputFlags.has(InputFlag::unk5)) { auto* windowMgr = GetWindowManager(); WindowBase* w = windowMgr->FindFromPoint(cursorState->position); @@ -421,11 +421,11 @@ namespace OpenRCT2 { CloseWindowModifier modifier = GetCloseModifier(); - if (modifier == CloseWindowModifier::Shift) + if (modifier == CloseWindowModifier::shift) { CloseOthers(); } - else if (modifier == CloseWindowModifier::Control) + else if (modifier == CloseWindowModifier::control) { CloseOthersOfThisClass(); } @@ -450,14 +450,14 @@ namespace OpenRCT2 CloseWindowModifier Window::GetCloseModifier() { - CloseWindowModifier lastModifier = CloseWindowModifier::None; + CloseWindowModifier lastModifier = CloseWindowModifier::none; if (gLastCloseModifier.window.number == number && gLastCloseModifier.window.classification == classification) { lastModifier = gLastCloseModifier.modifier; } - gLastCloseModifier.modifier = CloseWindowModifier::None; + gLastCloseModifier.modifier = CloseWindowModifier::none; return lastModifier; } @@ -481,11 +481,11 @@ namespace OpenRCT2 if (Config::Get().interface.WindowButtonsOnTheLeft) { widgets[2].left = 2; - widgets[2].right = 2 + kCloseButtonWidth; + widgets[2].right = 2 + kCloseButtonSize; } else { - widgets[2].left = width - 3 - kCloseButtonWidth; + widgets[2].left = width - 3 - kCloseButtonSize; widgets[2].right = width - 3; } } @@ -564,7 +564,7 @@ namespace OpenRCT2 ScreenCoordsXY WindowGetViewportSoundIconPos(WindowBase& w) { - const uint8_t buttonOffset = (Config::Get().interface.WindowButtonsOnTheLeft) ? kCloseButtonWidth + 2 : 0; + const uint8_t buttonOffset = (Config::Get().interface.WindowButtonsOnTheLeft) ? kCloseButtonSize + 2 : 0; return w.windowPos + ScreenCoordsXY{ 2 + buttonOffset, 2 }; } } // namespace OpenRCT2 @@ -678,7 +678,7 @@ namespace OpenRCT2::Ui::Windows return _currentTextBox; } - void WindowResize(WindowBase& w, int16_t dw, int16_t dh) + void WindowResizeByDelta(WindowBase& w, int16_t dw, int16_t dh) { if (dw == 0 && dh == 0) return; @@ -914,7 +914,7 @@ namespace OpenRCT2::Ui::Windows void WindowMoveAndSnap(WindowBase& w, ScreenCoordsXY newWindowCoords, int32_t snapProximity) { auto originalPos = w.windowPos; - int32_t minY = (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) ? 1 : kTopToolbarHeight + 2; + int32_t minY = gLegacyScene == LegacyScene::titleSequence ? 1 : kTopToolbarHeight + 2; newWindowCoords.y = std::clamp(newWindowCoords.y, minY, ContextGetHeight() - 34); @@ -1002,16 +1002,18 @@ namespace OpenRCT2::Ui::Windows }); } - void WindowSetResize(WindowBase& w, int16_t minWidth, int16_t minHeight, int16_t maxWidth, int16_t maxHeight) + bool WindowSetResize(WindowBase& w, const ScreenSize minSize, const ScreenSize maxSize) { - w.min_width = minWidth; - w.min_height = minHeight; - w.max_width = maxWidth; - w.max_height = maxHeight; + w.min_width = minSize.width; + w.min_height = minSize.height; + w.max_width = maxSize.width; + w.max_height = maxSize.height; // Clamp width and height to minimum and maximum - int16_t width = std::clamp(w.width, std::min(minWidth, maxWidth), std::max(minWidth, maxWidth)); - int16_t height = std::clamp(w.height, std::min(minHeight, maxHeight), std::max(minHeight, maxHeight)); + int16_t width = std::clamp( + w.width, std::min(minSize.width, maxSize.width), std::max(minSize.width, maxSize.width)); + int16_t height = std::clamp( + w.height, std::min(minSize.height, maxSize.height), std::max(minSize.height, maxSize.height)); // Resize window if size has changed if (w.width != width || w.height != height) @@ -1020,7 +1022,10 @@ namespace OpenRCT2::Ui::Windows w.width = width; w.height = height; w.Invalidate(); + return true; } + + return false; } bool WindowCanResize(const WindowBase& w) @@ -1116,13 +1121,13 @@ namespace OpenRCT2::Ui::Windows if (mainWindow == nullptr) return; - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR && GetGameState().EditorStep != EditorStep::LandscapeEditor) + if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep != EditorStep::LandscapeEditor) return; - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) return; if (zoomIn) diff --git a/src/openrct2-ui/interface/Window.h b/src/openrct2-ui/interface/Window.h index a05dc8acd7..d8c781013b 100644 --- a/src/openrct2-ui/interface/Window.h +++ b/src/openrct2-ui/interface/Window.h @@ -71,7 +71,7 @@ namespace OpenRCT2::Ui::Windows bool TextBoxCaretIsFlashed(); const WidgetIdentifier& GetCurrentTextBox(); - void WindowResize(WindowBase& w, int16_t dw, int16_t dh); + void WindowResizeByDelta(WindowBase& w, int16_t dw, int16_t dh); void WindowInitScrollWidgets(WindowBase& w); void WindowUpdateScrollWidgets(WindowBase& w); @@ -80,7 +80,7 @@ namespace OpenRCT2::Ui::Windows void WindowMoveAndSnap(WindowBase& w, ScreenCoordsXY newWindowCoords, int32_t snapProximity); void WindowRelocateWindows(int32_t width, int32_t height); - void WindowSetResize(WindowBase& w, int16_t minWidth, int16_t minHeight, int16_t maxWidth, int16_t maxHeight); + bool WindowSetResize(WindowBase& w, const ScreenSize minSize, const ScreenSize maxSize); bool WindowCanResize(const WindowBase& w); void InvalidateAllWindowsAfterInput(); diff --git a/src/openrct2-ui/ride/Construction.cpp b/src/openrct2-ui/ride/Construction.cpp index 61167826f0..6ffd81805a 100644 --- a/src/openrct2-ui/ride/Construction.cpp +++ b/src/openrct2-ui/ride/Construction.cpp @@ -230,7 +230,7 @@ namespace OpenRCT2 int32_t colour2 = RideGetUnusedPresetVehicleColour(rideEntryIndex); auto gameAction = RideCreateAction( - listItem.Type, listItem.EntryIndex, colour1, colour2, GetGameState().LastEntranceStyle); + listItem.Type, listItem.EntryIndex, colour1, colour2, getGameState().lastEntranceStyle); gameAction.SetCallback([](const GameAction* ga, const GameActions::Result* result) { if (result->Error != GameActions::Status::Ok) @@ -278,7 +278,7 @@ namespace OpenRCT2 // Additional tower bases can only be built if the ride allows for it (elevator) if (trackType == TrackElemType::TowerBase - && !currentRide.GetRideTypeDescriptor().HasFlag(RtdFlag::allowExtraTowerBases)) + && !currentRide.getRideTypeDescriptor().HasFlag(RtdFlag::allowExtraTowerBases)) entryIsDisabled = true; // Check if a previous element exists, to collate entries if possible @@ -365,7 +365,7 @@ namespace OpenRCT2 CoordsXYZD RideGetEntranceOrExitPositionFromScreenPosition(const ScreenCoordsXY& screenCoords) { CoordsXYZD entranceExitCoords{}; - gRideEntranceExitPlaceDirection = INVALID_DIRECTION; + gRideEntranceExitPlaceDirection = kInvalidDirection; // determine if the mouse is hovering over a station - that's the station to add the entrance to auto info = GetMapCoordinatesFromPos(screenCoords, EnumsToFlags(ViewportInteractionItem::Ride)); if (info.interactionType != ViewportInteractionItem::None) @@ -398,7 +398,7 @@ namespace OpenRCT2 return entranceExitCoords; } - auto stationBaseZ = ride->GetStation(gRideEntranceExitPlaceStationIndex).GetBaseZ(); + auto stationBaseZ = ride->getStation(gRideEntranceExitPlaceStationIndex).GetBaseZ(); auto coordsAtHeight = ScreenGetMapXYWithZ(screenCoords, stationBaseZ); if (!coordsAtHeight.has_value()) @@ -407,7 +407,7 @@ namespace OpenRCT2 return entranceExitCoords; } - entranceExitCoords = { coordsAtHeight->ToTileStart(), stationBaseZ, INVALID_DIRECTION }; + entranceExitCoords = { coordsAtHeight->ToTileStart(), stationBaseZ, kInvalidDirection }; if (ride->type == kRideTypeNull) { @@ -415,7 +415,7 @@ namespace OpenRCT2 return entranceExitCoords; } - auto stationStart = ride->GetStation(gRideEntranceExitPlaceStationIndex).Start; + auto stationStart = ride->getStation(gRideEntranceExitPlaceStationIndex).Start; if (stationStart.IsNull()) { entranceExitCoords.SetNull(); @@ -482,7 +482,7 @@ namespace OpenRCT2 } while (!(tileElement++)->IsLastForTile()); } } - gRideEntranceExitPlaceDirection = INVALID_DIRECTION; + gRideEntranceExitPlaceDirection = kInvalidDirection; return entranceExitCoords; } diff --git a/src/openrct2-ui/ride/VehicleSounds.cpp b/src/openrct2-ui/ride/VehicleSounds.cpp index 9d85af9713..8618ce407a 100644 --- a/src/openrct2-ui/ride/VehicleSounds.cpp +++ b/src/openrct2-ui/ride/VehicleSounds.cpp @@ -105,10 +105,10 @@ namespace OpenRCT2::Audio static bool SoundCanPlay(const Vehicle& vehicle) { - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) return false; - if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && GetGameState().EditorStep != EditorStep::RollercoasterDesigner) + if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::RollercoasterDesigner) return false; if (vehicle.sound1_id == SoundId::Null && vehicle.sound2_id == SoundId::Null) @@ -516,7 +516,7 @@ namespace OpenRCT2::Audio sound.Pan = sound_params->pan_x; sound.Channel->SetPan(DStoMixerPan(sound_params->pan_x)); } - if (!(GetGameState().CurrentTicks & 3) && sound_params->frequency != sound.Frequency) + if (!(getGameState().currentTicks & 3) && sound_params->frequency != sound.Frequency) { sound.Frequency = sound_params->frequency; if (ShouldUpdateChannelRate(id)) diff --git a/src/openrct2-ui/scripting/CustomImages.cpp b/src/openrct2-ui/scripting/CustomImages.cpp index 5cd5d65ef5..d36a1e276b 100644 --- a/src/openrct2-ui/scripting/CustomImages.cpp +++ b/src/openrct2-ui/scripting/CustomImages.cpp @@ -317,7 +317,7 @@ namespace OpenRCT2::Scripting } case PixelDataKind::Png: { - auto imageFormat = pixelData.Palette == PixelDataPaletteKind::Keep ? IMAGE_FORMAT::PNG : IMAGE_FORMAT::PNG_32; + auto imageFormat = pixelData.Palette == PixelDataPaletteKind::Keep ? ImageFormat::png : ImageFormat::png32; auto palette = pixelData.Palette == PixelDataPaletteKind::Keep ? Palette::KeepIndices : Palette::OpenRCT2; auto importMode = getImportModeFromPalette(pixelData.Palette); auto pngData = DukGetDataFromBufferLikeObject(pixelData.Data); diff --git a/src/openrct2-ui/scripting/CustomMenu.cpp b/src/openrct2-ui/scripting/CustomMenu.cpp index 207157c8f4..4e1588f3d8 100644 --- a/src/openrct2-ui/scripting/CustomMenu.cpp +++ b/src/openrct2-ui/scripting/CustomMenu.cpp @@ -18,7 +18,6 @@ #include #include #include - #include using namespace OpenRCT2; using namespace OpenRCT2::Ui; diff --git a/src/openrct2-ui/scripting/CustomWindow.cpp b/src/openrct2-ui/scripting/CustomWindow.cpp index 4993eb7df9..574c9e9e0d 100644 --- a/src/openrct2-ui/scripting/CustomWindow.cpp +++ b/src/openrct2-ui/scripting/CustomWindow.cpp @@ -492,9 +492,8 @@ namespace OpenRCT2::Ui::Windows // Having the content panel visible for transparent windows makes the borders darker than they should be // For now just hide it if there are no tabs and the window is not resizable - auto canResize = (flags & WF_RESIZABLE) != 0 && (min_width != max_width || min_height != max_height); auto numTabs = _info.Desc.Tabs.size(); - if (canResize || numTabs != 0) + if (canBeResized() || numTabs != 0) { widgets[WIDX_CONTENT_PANEL].flags &= ~WIDGET_FLAGS::IS_HIDDEN; } diff --git a/src/openrct2-ui/scripting/ScTitleSequence.hpp b/src/openrct2-ui/scripting/ScTitleSequence.hpp index ec250d9691..ec061e35df 100644 --- a/src/openrct2-ui/scripting/ScTitleSequence.hpp +++ b/src/openrct2-ui/scripting/ScTitleSequence.hpp @@ -20,7 +20,6 @@ #include #include #include - #include #include #include #include @@ -260,14 +259,14 @@ namespace OpenRCT2::Scripting objectMgr.LoadObjects(result.RequiredObjects); // TODO: Have a separate GameState and exchange once loaded. - auto& gameState = GetGameState(); + auto& gameState = getGameState(); parkImporter->Import(gameState); auto old = gLoadKeepWindowsOpen; // Unless we are already in the game, we have to re-create the windows // so that the game toolbars are created. - if (gScreenFlags == SCREEN_FLAGS_PLAYING) + if (gLegacyScene == LegacyScene::playing) { gLoadKeepWindowsOpen = true; } @@ -481,7 +480,7 @@ namespace OpenRCT2::Scripting { duk_error(ctx, DUK_ERR_ERROR, "Failed to load title sequence"); } - else if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + else if (gLegacyScene != LegacyScene::titleSequence) { gPreviewingTitleSequenceInGame = true; } diff --git a/src/openrct2-ui/scripting/ScUi.hpp b/src/openrct2-ui/scripting/ScUi.hpp index 778a961353..49611c99c2 100644 --- a/src/openrct2-ui/scripting/ScUi.hpp +++ b/src/openrct2-ui/scripting/ScUi.hpp @@ -18,9 +18,11 @@ #include "ScViewport.hpp" #include "ScWindow.hpp" + #include #include #include #include + #include #include #include #include @@ -38,15 +40,15 @@ namespace OpenRCT2::Ui::Windows namespace OpenRCT2::Scripting { - static const DukEnumMap ScenarioCategoryMap({ - { "beginner", SCENARIO_CATEGORY_BEGINNER }, - { "challenging", SCENARIO_CATEGORY_CHALLENGING }, - { "expert", SCENARIO_CATEGORY_EXPERT }, - { "real", SCENARIO_CATEGORY_REAL }, - { "other", SCENARIO_CATEGORY_OTHER }, - { "dlc", SCENARIO_CATEGORY_DLC }, - { "build_your_own", SCENARIO_CATEGORY_BUILD_YOUR_OWN }, - { "competitions", SCENARIO_CATEGORY_COMPETITIONS }, + static const DukEnumMap ScenarioCategoryMap({ + { "beginner", ScenarioCategory::beginner }, + { "challenging", ScenarioCategory::challenging }, + { "expert", ScenarioCategory::expert }, + { "real", ScenarioCategory::real }, + { "other", ScenarioCategory::other }, + { "dlc", ScenarioCategory::dlc }, + { "build_your_own", ScenarioCategory::buildYourOwn }, + { "competitions", ScenarioCategory::competitions }, }); static const DukEnumMap ScenarioSourceMap({ @@ -62,12 +64,12 @@ namespace OpenRCT2::Scripting }); template<> - inline DukValue ToDuk(duk_context* ctx, const SCENARIO_CATEGORY& value) + inline DukValue ToDuk(duk_context* ctx, const ScenarioCategory& value) { const auto& entry = ScenarioCategoryMap.find(value); if (entry != ScenarioCategoryMap.end()) return ToDuk(ctx, entry->first); - return ToDuk(ctx, ScenarioCategoryMap[SCENARIO_CATEGORY_OTHER]); + return ToDuk(ctx, ScenarioCategoryMap[ScenarioCategory::other]); } template<> @@ -151,7 +153,7 @@ namespace OpenRCT2::Scripting std::shared_ptr tool_get() const { - if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) + if (gInputFlags.has(InputFlag::toolActive)) { return std::make_shared(_scriptEngine.GetContext()); } @@ -271,23 +273,24 @@ namespace OpenRCT2::Scripting auto defaultPath = AsOrDefault(desc["defaultPath"], ""); auto callback = desc["callback"]; - int32_t loadSaveType{}; + auto loadSaveAction = LoadSaveAction::load; if (type == "load") - loadSaveType = LOADSAVETYPE_LOAD; + loadSaveAction = LoadSaveAction::load; else throw DukException(); + LoadSaveType loadSaveType; if (fileType == "game") - loadSaveType |= LOADSAVETYPE_GAME; + loadSaveType = LoadSaveType::park; else if (fileType == "heightmap") - loadSaveType |= LOADSAVETYPE_HEIGHTMAP; + loadSaveType = LoadSaveType::heightmap; else throw DukException(); LoadsaveOpen( - loadSaveType, defaultPath, - [this, plugin, callback](int32_t result, std::string_view path) { - if (result == MODAL_RESULT_OK) + loadSaveAction, loadSaveType, defaultPath, + [this, plugin, callback](ModalResult result, std::string_view path) { + if (result == ModalResult::ok) { auto dukValue = ToDuk(_scriptEngine.GetContext(), path); _scriptEngine.ExecutePluginCall(plugin, callback, { dukValue }, false); @@ -322,6 +325,7 @@ namespace OpenRCT2::Scripting auto& execInfo = _scriptEngine.GetExecInfo(); auto owner = execInfo.GetCurrentPlugin(); CustomMenuItems.emplace_back(owner, CustomToolbarMenuItemKind::Standard, text, callback); + std::ranges::sort(CustomMenuItems, [](auto&& a, auto&& b) { return a.Text < b.Text; }); } void registerToolboxMenuItem(const std::string& text, DukValue callback) @@ -331,6 +335,7 @@ namespace OpenRCT2::Scripting if (owner->GetMetadata().Type == PluginType::Intransient) { CustomMenuItems.emplace_back(owner, CustomToolbarMenuItemKind::Toolbox, text, callback); + std::ranges::sort(CustomMenuItems, [](auto&& a, auto&& b) { return a.Text < b.Text; }); } else { @@ -407,7 +412,7 @@ namespace OpenRCT2::Scripting if (entry != nullptr) { obj.Set("id", entry->ScenarioId); - obj.Set("category", ToDuk(ctx, static_cast(entry->Category))); + obj.Set("category", ToDuk(ctx, entry->Category)); obj.Set("sourceGame", ToDuk(ctx, entry->SourceGame)); obj.Set("internalName", entry->InternalName); obj.Set("name", entry->Name); diff --git a/src/openrct2-ui/scripting/ScViewport.hpp b/src/openrct2-ui/scripting/ScViewport.hpp index 6a09c53802..6ba5b930b1 100644 --- a/src/openrct2-ui/scripting/ScViewport.hpp +++ b/src/openrct2-ui/scripting/ScViewport.hpp @@ -19,7 +19,6 @@ #include #include #include - #include namespace OpenRCT2::Scripting { diff --git a/src/openrct2-ui/scripting/ScWidget.hpp b/src/openrct2-ui/scripting/ScWidget.hpp index 3e55565c92..80e8f95649 100644 --- a/src/openrct2-ui/scripting/ScWidget.hpp +++ b/src/openrct2-ui/scripting/ScWidget.hpp @@ -113,6 +113,8 @@ namespace OpenRCT2::Scripting return "placeholder"; case WindowWidgetType::ProgressBar: return "progress_bar"; + case WindowWidgetType::HorizontalSeparator: + return "horizontal_separator"; case WindowWidgetType::Custom: return "custom"; } diff --git a/src/openrct2-ui/scripting/ScWindow.hpp b/src/openrct2-ui/scripting/ScWindow.hpp index 825eacab72..2f41b5621d 100644 --- a/src/openrct2-ui/scripting/ScWindow.hpp +++ b/src/openrct2-ui/scripting/ScWindow.hpp @@ -99,11 +99,11 @@ namespace OpenRCT2::Scripting { if (WindowCanResize(*w)) { - WindowResize(*w, value - w->width, 0); + WindowResizeByDelta(*w, value - w->width, 0); } else { - WindowSetResize(*w, value, w->min_height, value, w->max_height); + WindowSetResize(*w, { value, w->min_height }, { value, w->max_height }); } } } @@ -123,11 +123,11 @@ namespace OpenRCT2::Scripting { if (WindowCanResize(*w)) { - WindowResize(*w, 0, value - w->height); + WindowResizeByDelta(*w, 0, value - w->height); } else { - WindowSetResize(*w, w->min_width, value, w->max_width, value); + WindowSetResize(*w, { w->min_width, value }, { w->max_width, value }); } } } @@ -145,7 +145,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - WindowSetResize(*w, value, w->min_height, w->max_width, w->max_height); + WindowSetResize(*w, { value, w->min_height }, { w->max_width, w->max_height }); } } int32_t maxWidth_get() const @@ -162,7 +162,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - WindowSetResize(*w, w->min_width, w->min_height, value, w->max_height); + WindowSetResize(*w, { w->min_width, w->min_height }, { value, w->max_height }); } } int32_t minHeight_get() const @@ -179,7 +179,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - WindowSetResize(*w, w->min_width, value, w->max_width, w->max_height); + WindowSetResize(*w, { w->min_width, value }, { w->max_width, w->max_height }); } } int32_t maxHeight_get() const @@ -196,7 +196,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - WindowSetResize(*w, w->min_width, w->min_height, w->max_width, value); + WindowSetResize(*w, { w->min_width, w->min_height }, { w->max_width, value }); } } bool isSticky_get() const diff --git a/src/openrct2-ui/title/TitleSequencePlayer.cpp b/src/openrct2-ui/title/TitleSequencePlayer.cpp index 81f615bdbb..e5d3b361d0 100644 --- a/src/openrct2-ui/title/TitleSequencePlayer.cpp +++ b/src/openrct2-ui/title/TitleSequencePlayer.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include @@ -316,7 +316,7 @@ namespace OpenRCT2::Title ReportProgress(0); auto parkImporter = ParkImporter::Create(path); - auto result = parkImporter->Load(path); + auto result = parkImporter->Load(path, false); ReportProgress(10); auto& objectManager = GetContext()->GetObjectManager(); @@ -324,7 +324,7 @@ namespace OpenRCT2::Title ReportProgress(90); // TODO: Have a separate GameState and exchange once loaded. - auto& gameState = GetGameState(); + auto& gameState = getGameState(); parkImporter->Import(gameState); ReportProgress(100); @@ -380,7 +380,7 @@ namespace OpenRCT2::Title ReportProgress(70); // TODO: Have a separate GameState and exchange once loaded. - auto& gameState = GetGameState(); + auto& gameState = getGameState(); parkImporter->Import(gameState); ReportProgress(100); @@ -431,14 +431,14 @@ namespace OpenRCT2::Title void PrepareParkForPlayback() { auto windowManager = Ui::GetWindowManager(); - auto& gameState = GetGameState(); - windowManager->SetMainView(gameState.SavedView, gameState.SavedViewZoom, gameState.SavedViewRotation); + auto& gameState = getGameState(); + windowManager->SetMainView(gameState.savedView, gameState.savedViewZoom, gameState.savedViewRotation); ResetEntitySpatialIndices(); ResetAllSpriteQuadrantPlacements(); auto intent = Intent(INTENT_ACTION_REFRESH_NEW_RIDES); ContextBroadcastIntent(&intent); Ui::Windows::WindowScenerySetDefaultPlacementConfiguration(); - News::InitQueue(); + News::InitQueue(gameState); LoadPalette(); gScreenAge = 0; gGamePaused = false; diff --git a/src/openrct2-ui/windows/About.cpp b/src/openrct2-ui/windows/About.cpp index 8771099438..c76396c182 100644 --- a/src/openrct2-ui/windows/About.cpp +++ b/src/openrct2-ui/windows/About.cpp @@ -28,6 +28,8 @@ namespace OpenRCT2::Ui::Windows static constexpr StringId WINDOW_TITLE = STR_ABOUT; static constexpr int32_t TABHEIGHT = 50; + static constexpr auto kPadding = 10; + enum { WINDOW_ABOUT_PAGE_OPENRCT2, @@ -85,6 +87,31 @@ namespace OpenRCT2::Ui::Windows _windowAboutRCT2Widgets, }; + // clang-format off + static const StringId _OpenRCT2InfoStrings[] = { + STR_ABOUT_OPENRCT2_DESCRIPTION_2, + STR_ABOUT_OPENRCT2_DESCRIPTION_3, + STR_ABOUT_OPENRCT2_TITLE, + STR_ABOUT_FAIRGROUND_ORGAN, + STR_ABOUT_SPECIAL_THANKS_1, + STR_ABOUT_SPECIAL_THANKS_2, + }; + // clang-format on + + static const StringId _RCT2InfoStrings[] = { + STR_COPYRIGHT_CS, + STR_DESIGNED_AND_PROGRAMMED_BY_CS, + STR_GRAPHICS_BY_SF, + STR_SOUND_AND_MUSIC_BY_AB, + STR_ADDITIONAL_SOUNDS_RECORDED_BY_DE, + STR_REPRESENTATION_BY_JL, + kStringIdEmpty, + STR_THANKS_TO, + STR_THANKS_TO_PEOPLE, + kStringIdEmpty, + STR_LICENSED_TO_INFOGRAMES_INTERACTIVE_INC, + }; + class AboutWindow final : public Window { public: @@ -150,26 +177,37 @@ namespace OpenRCT2::Ui::Windows dpi, aboutRCT2Coords, 87, STR_WINDOW_COLOUR_2_STRINGID, ft, { COLOUR_AQUAMARINE, TextAlignment::CENTRE }); } + int32_t newHeight = 0; if (page == WINDOW_ABOUT_PAGE_OPENRCT2) { - DrawOpenRCT2Info(dpi); + newHeight = DrawOpenRCT2Info(dpi) + kPadding + 1; } else if (page == WINDOW_ABOUT_PAGE_RCT2) { - DrawRCT2Info(dpi); + newHeight = DrawRCT2Info(dpi) + kPadding + 1; + } + + if (newHeight != height) + { + Invalidate(); + widgets[WIDX_PAGE_BACKGROUND].bottom = newHeight - 1; + widgets[WIDX_BACKGROUND].bottom = newHeight; + height = newHeight; } } private: - /** - * @brief Set which tab to show - */ void SetPage(int32_t p) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == p && !widgets.empty()) + return; + page = p; frame_no = 0; pressed_widgets = 0; SetWidgets(_windowAboutPageWidgets[p]); + WindowSetResize(*this, { WW, WH }, { WW, WH }); switch (p) { @@ -185,26 +223,22 @@ namespace OpenRCT2::Ui::Windows Invalidate(); } - /** - * @brief Draw OpenRCT2 info on open tab - */ - void DrawOpenRCT2Info(DrawPixelInfo& dpi) + int32_t DrawOpenRCT2Info(DrawPixelInfo& dpi) { // Draw logo on placeholder widget - ScreenCoordsXY logoCoords = windowPos - + ScreenCoordsXY(widgets[WIDX_OPENRCT2_LOGO].left, widgets[WIDX_OPENRCT2_LOGO].top); + const auto& logoWidget = widgets[WIDX_OPENRCT2_LOGO]; + auto logoCoords = windowPos + ScreenCoordsXY(logoWidget.left, logoWidget.top); GfxDrawSprite(dpi, ImageId(SPR_G2_LOGO), logoCoords); u8string versionInfo = gVersionInfoFull; auto ft = Formatter(); ft.Add(versionInfo.c_str()); - auto const& versionPlaceholder = widgets[WIDX_VERSION]; - auto versionPlaceHolderWidth = versionPlaceholder.right - versionPlaceholder.left; - auto centreX = versionPlaceholder.left + versionPlaceHolderWidth / 2; - auto centreY = (versionPlaceholder.top + versionPlaceholder.bottom - FontGetLineHeight(FontStyle::Medium)) / 2; + const auto& versionWidget = widgets[WIDX_VERSION]; + auto centreX = versionWidget.midX(); + auto centreY = versionWidget.midY() - FontGetLineHeight(FontStyle::Medium) / 2; auto centrePos = windowPos + ScreenCoordsXY(centreX, centreY); - DrawTextWrapped(dpi, centrePos, versionPlaceHolderWidth, STR_STRING, ft, { colours[1], TextAlignment::CENTRE }); + DrawTextWrapped(dpi, centrePos, versionWidget.width(), STR_STRING, ft, { colours[1], TextAlignment::CENTRE }); // Shows the update available button if (OpenRCT2::GetContext()->HasNewVersionInfo()) @@ -213,62 +247,44 @@ namespace OpenRCT2::Ui::Windows } // Draw the rest of the text - Formatter ft2{}; TextPaint tp{ colours[1], TextAlignment::CENTRE }; auto textCoords = windowPos + ScreenCoordsXY((width / 2) - 1, 240); - auto textWidth = WW - 20; + auto textWidth = WW - (kPadding * 2); + for (auto stringId : _OpenRCT2InfoStrings) + textCoords.y += DrawTextWrapped(dpi, textCoords, textWidth, stringId, {}, tp) + 5; - textCoords += ScreenCoordsXY( - 0, DrawTextWrapped(dpi, textCoords, textWidth, STR_ABOUT_OPENRCT2_DESCRIPTION_2, ft2, tp) + 5); // More info - textCoords += ScreenCoordsXY( - 0, DrawTextWrapped(dpi, textCoords, textWidth, STR_ABOUT_OPENRCT2_DESCRIPTION_3, ft2, tp) + 5); // Copyright - textCoords += ScreenCoordsXY( - 0, DrawTextWrapped(dpi, textCoords, textWidth, STR_ABOUT_OPENRCT2_TITLE, ft2, tp) + 5); // Title Theme - textCoords += ScreenCoordsXY( - 0, DrawTextWrapped(dpi, textCoords, textWidth, STR_ABOUT_FAIRGROUND_ORGAN, ft2, tp) + 5); // Fairground organ - textCoords += ScreenCoordsXY( - 0, DrawTextWrapped(dpi, textCoords, textWidth, STR_ABOUT_SPECIAL_THANKS_1, ft2, tp) + 7); // Special Thanks - textCoords += ScreenCoordsXY( - 0, DrawTextWrapped(dpi, textCoords, textWidth, STR_ABOUT_SPECIAL_THANKS_2, ft2, tp)); // Company names + return textCoords.y - windowPos.y; } - /** - * @brief Draw RCT2 info on open tab - */ - void DrawRCT2Info(DrawPixelInfo& dpi) + int32_t DrawRCT2Info(DrawPixelInfo& dpi) { - int32_t yPage = windowPos.y + widgets[WIDX_PAGE_BACKGROUND].top + 5; + auto& backgroundWidget = widgets[WIDX_PAGE_BACKGROUND]; + auto textCoords = windowPos + ScreenCoordsXY{ backgroundWidget.midX(), backgroundWidget.top + kPadding }; + auto textWidth = WW - 20; + TextPaint tp{ colours[1], TextAlignment::CENTRE }; - auto screenCoords = ScreenCoordsXY{ windowPos.x + 200, yPage + 5 }; + // Draw credits + for (auto stringId : _RCT2InfoStrings) + { + if (stringId == kStringIdEmpty) + { + textCoords.y += 16; + continue; + } - int32_t lineHeight = FontGetLineHeight(FontStyle::Medium); + textCoords.y += DrawTextWrapped(dpi, textCoords, textWidth, stringId, {}, tp); + if (stringId == STR_COPYRIGHT_CS) + textCoords.y += 74; + } - // Credits - DrawTextBasic(dpi, screenCoords, STR_COPYRIGHT_CS, {}, { TextAlignment::CENTRE }); - screenCoords.y += lineHeight + 74; - DrawTextBasic(dpi, screenCoords, STR_DESIGNED_AND_PROGRAMMED_BY_CS, {}, { TextAlignment::CENTRE }); - screenCoords.y += lineHeight; - DrawTextBasic(dpi, screenCoords, STR_GRAPHICS_BY_SF, {}, { TextAlignment::CENTRE }); - screenCoords.y += lineHeight; - DrawTextBasic(dpi, screenCoords, STR_SOUND_AND_MUSIC_BY_AB, {}, { TextAlignment::CENTRE }); - screenCoords.y += lineHeight; - DrawTextBasic(dpi, screenCoords, STR_ADDITIONAL_SOUNDS_RECORDED_BY_DE, {}, { TextAlignment::CENTRE }); - screenCoords.y += lineHeight + 3; - DrawTextBasic(dpi, screenCoords, STR_REPRESENTATION_BY_JL, {}, { TextAlignment::CENTRE }); - screenCoords.y += 2 * lineHeight + 5; - DrawTextBasic(dpi, screenCoords, STR_THANKS_TO, {}, { TextAlignment::CENTRE }); - screenCoords.y += lineHeight; - DrawTextBasic(dpi, screenCoords, STR_THANKS_TO_PEOPLE, {}, { TextAlignment::CENTRE }); - screenCoords.y += 2 * lineHeight + 5; - DrawTextBasic(dpi, screenCoords, STR_LICENSED_TO_INFOGRAMES_INTERACTIVE_INC, {}, { TextAlignment::CENTRE }); + // Draw images + auto imageCoords = windowPos + ScreenCoordsXY{ 92, backgroundWidget.top + 5 + 24 }; + GfxDrawSprite(dpi, ImageId(SPR_CREDITS_CHRIS_SAWYER_SMALL), imageCoords); - // Images - GfxDrawSprite(dpi, ImageId(SPR_CREDITS_CHRIS_SAWYER_SMALL), { windowPos.x + 92, yPage + 24 }); - - // Licence + return textCoords.y - windowPos.y; } - void OnResize() override + void OnPrepareDraw() override { ResizeFrameWithPage(); } diff --git a/src/openrct2-ui/windows/AssetPacks.cpp b/src/openrct2-ui/windows/AssetPacks.cpp index cbbc1245b9..c78c48e8e3 100644 --- a/src/openrct2-ui/windows/AssetPacks.cpp +++ b/src/openrct2-ui/windows/AssetPacks.cpp @@ -155,7 +155,7 @@ namespace OpenRCT2::Ui::Windows auto& list = widgets[WIDX_LIST]; list.left = 6; - list.top = 20 + 11 + 3; + list.top = widgets[WIDX_TITLE].height() + 8 + 11 + 3; list.right = width - 2 - 24 - 1; list.bottom = height - 6 - 11 - 3; @@ -168,7 +168,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_LOW_LABEL].left = list.left; widgets[WIDX_LOW_LABEL].right = list.right; - auto toolstripY = 20; + auto toolstripY = widgets[WIDX_TITLE].height() + 8; auto toolstripRight = width - 2; auto toolstripLeft = toolstripRight - 24; for (WidgetIndex i = WIDX_MOVE_UP; i <= WIDX_APPLY; i++) diff --git a/src/openrct2-ui/windows/Banner.cpp b/src/openrct2-ui/windows/Banner.cpp index 59c30f057d..e4979adba7 100644 --- a/src/openrct2-ui/windows/Banner.cpp +++ b/src/openrct2-ui/windows/Banner.cpp @@ -279,6 +279,9 @@ namespace OpenRCT2::Ui::Windows { return; } + + ResizeFrame(); + Widget& colourBtn = widgets[WIDX_MAIN_COLOUR]; colourBtn.type = WindowWidgetType::Empty; diff --git a/src/openrct2-ui/windows/Changelog.cpp b/src/openrct2-ui/windows/Changelog.cpp index 71a000a4a6..e21c53512d 100644 --- a/src/openrct2-ui/windows/Changelog.cpp +++ b/src/openrct2-ui/windows/Changelog.cpp @@ -61,7 +61,7 @@ namespace OpenRCT2::Ui::Windows /** * @brief Retrieves the changelog contents. */ - const std::string GetText(PATHID pathId) + const std::string GetText(PathId pathId) { auto env = GetContext()->GetPlatformEnvironment(); auto path = env->GetFilePath(pathId); @@ -99,7 +99,7 @@ namespace OpenRCT2::Ui::Windows return true; case WV_CHANGELOG: - if (!ReadFile(PATHID::CHANGELOG)) + if (!ReadFile(PathId::changelog)) { return false; } @@ -108,7 +108,7 @@ namespace OpenRCT2::Ui::Windows return true; case WV_CONTRIBUTORS: - if (!ReadFile(PATHID::CONTRIBUTORS)) + if (!ReadFile(PathId::contributors)) { return false; } @@ -122,42 +122,29 @@ namespace OpenRCT2::Ui::Windows } } + void SetResizeDimensions() + { + int32_t screenWidth = ContextGetWidth(); + int32_t screenHeight = ContextGetHeight(); + + WindowSetResize(*this, { MIN_WW, MIN_WH }, { (screenWidth * 4) / 5, (screenHeight * 4) / 5 }); + } + void OnOpen() override { SetWidgets(_windowChangelogWidgets); WindowInitScrollWidgets(*this); - min_width = MIN_WW; - min_height = MIN_WH; - max_width = MIN_WW; - max_height = MIN_WH; + SetResizeDimensions(); } void OnResize() override { - int32_t screenWidth = ContextGetWidth(); - int32_t screenHeight = ContextGetHeight(); - - max_width = (screenWidth * 4) / 5; - max_height = (screenHeight * 4) / 5; - - min_width = MIN_WW; - min_height = MIN_WH; + SetResizeDimensions(); auto download_button_width = widgets[WIDX_OPEN_URL].width(); widgets[WIDX_OPEN_URL].left = (width - download_button_width) / 2; widgets[WIDX_OPEN_URL].right = widgets[WIDX_OPEN_URL].left + download_button_width; - - if (width < min_width) - { - Invalidate(); - width = min_width; - } - if (height < min_height) - { - Invalidate(); - height = min_height; - } } void OnPrepareDraw() override @@ -259,14 +246,14 @@ namespace OpenRCT2::Ui::Windows std::string GetChangelogPath() { auto env = GetContext()->GetPlatformEnvironment(); - return env->GetFilePath(PATHID::CHANGELOG); + return env->GetFilePath(PathId::changelog); } /** * @brief Attempts to read the changelog file, returns true on success * */ - bool ReadFile(PATHID pathId) + bool ReadFile(PathId pathId) { std::string _text; try diff --git a/src/openrct2-ui/windows/Cheats.cpp b/src/openrct2-ui/windows/Cheats.cpp index 3e7fdd6dd3..1a4740d66a 100644 --- a/src/openrct2-ui/windows/Cheats.cpp +++ b/src/openrct2-ui/windows/Cheats.cpp @@ -514,12 +514,12 @@ static StringId window_cheats_page_titles[] = { // Set title widgets[WIDX_TITLE].text = window_cheats_page_titles[page]; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (page) { case WINDOW_CHEATS_PAGE_MONEY: { - auto moneyDisabled = (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) != 0; + auto moneyDisabled = (gameState.park.Flags & PARK_FLAGS_NO_MONEY) != 0; SetCheckboxValue(WIDX_NO_MONEY, moneyDisabled); SetWidgetDisabled(WIDX_ADD_SET_MONEY_GROUP, moneyDisabled); SetWidgetDisabled(WIDX_MONEY_SPINNER, moneyDisabled); @@ -534,60 +534,60 @@ static StringId window_cheats_page_titles[] = { { auto ft = Formatter::Common(); ft.Add(1000.00_GBP); - SetCheckboxValue(WIDX_GUEST_IGNORE_RIDE_INTENSITY, gameState.Cheats.ignoreRideIntensity); - SetCheckboxValue(WIDX_GUEST_IGNORE_PRICE, gameState.Cheats.ignorePrice); - SetCheckboxValue(WIDX_DISABLE_VANDALISM, gameState.Cheats.disableVandalism); - SetCheckboxValue(WIDX_DISABLE_LITTERING, gameState.Cheats.disableLittering); + SetCheckboxValue(WIDX_GUEST_IGNORE_RIDE_INTENSITY, gameState.cheats.ignoreRideIntensity); + SetCheckboxValue(WIDX_GUEST_IGNORE_PRICE, gameState.cheats.ignorePrice); + SetCheckboxValue(WIDX_DISABLE_VANDALISM, gameState.cheats.disableVandalism); + SetCheckboxValue(WIDX_DISABLE_LITTERING, gameState.cheats.disableLittering); break; } case WINDOW_CHEATS_PAGE_PARK: widgets[WIDX_OPEN_CLOSE_PARK].text = STR_CHEAT_OPEN_PARK; - if (gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) + if (gameState.park.Flags & PARK_FLAGS_PARK_OPEN) widgets[WIDX_OPEN_CLOSE_PARK].text = STR_CHEAT_CLOSE_PARK; SetCheckboxValue(WIDX_FORCE_PARK_RATING, Park::GetForcedRating() >= 0); - SetCheckboxValue(WIDX_NEVERENDING_MARKETING, gameState.Cheats.neverendingMarketing); - SetCheckboxValue(WIDX_ALLOW_BUILD_IN_PAUSE_MODE, gameState.Cheats.buildInPauseMode); - SetCheckboxValue(WIDX_ALLOW_REGULAR_PATH_AS_QUEUE, gameState.Cheats.allowRegularPathAsQueue); - SetCheckboxValue(WIDX_ALLOW_SPECIAL_COLOUR_SCHEMES, gameState.Cheats.allowSpecialColourSchemes); + SetCheckboxValue(WIDX_NEVERENDING_MARKETING, gameState.cheats.neverendingMarketing); + SetCheckboxValue(WIDX_ALLOW_BUILD_IN_PAUSE_MODE, gameState.cheats.buildInPauseMode); + SetCheckboxValue(WIDX_ALLOW_REGULAR_PATH_AS_QUEUE, gameState.cheats.allowRegularPathAsQueue); + SetCheckboxValue(WIDX_ALLOW_SPECIAL_COLOUR_SCHEMES, gameState.cheats.allowSpecialColourSchemes); break; case WINDOW_CHEATS_PAGE_RIDES: - SetCheckboxValue(WIDX_UNLOCK_OPERATING_LIMITS, gameState.Cheats.unlockOperatingLimits); - SetCheckboxValue(WIDX_DISABLE_BRAKES_FAILURE, gameState.Cheats.disableBrakesFailure); - SetCheckboxValue(WIDX_DISABLE_ALL_BREAKDOWNS, gameState.Cheats.disableAllBreakdowns); - SetCheckboxValue(WIDX_SHOW_ALL_OPERATING_MODES, gameState.Cheats.showAllOperatingModes); + SetCheckboxValue(WIDX_UNLOCK_OPERATING_LIMITS, gameState.cheats.unlockOperatingLimits); + SetCheckboxValue(WIDX_DISABLE_BRAKES_FAILURE, gameState.cheats.disableBrakesFailure); + SetCheckboxValue(WIDX_DISABLE_ALL_BREAKDOWNS, gameState.cheats.disableAllBreakdowns); + SetCheckboxValue(WIDX_SHOW_ALL_OPERATING_MODES, gameState.cheats.showAllOperatingModes); SetCheckboxValue( - WIDX_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES, gameState.Cheats.showVehiclesFromOtherTrackTypes); - SetCheckboxValue(WIDX_DISABLE_TRAIN_LENGTH_LIMITS, gameState.Cheats.disableTrainLengthLimit); - SetCheckboxValue(WIDX_ENABLE_CHAIN_LIFT_ON_ALL_TRACK, gameState.Cheats.enableChainLiftOnAllTrack); - SetCheckboxValue(WIDX_ENABLE_ARBITRARY_RIDE_TYPE_CHANGES, gameState.Cheats.allowArbitraryRideTypeChanges); - SetCheckboxValue(WIDX_DISABLE_RIDE_VALUE_AGING, gameState.Cheats.disableRideValueAging); - SetCheckboxValue(WIDX_IGNORE_RESEARCH_STATUS, gameState.Cheats.ignoreResearchStatus); - SetCheckboxValue(WIDX_ENABLE_ALL_DRAWABLE_TRACK_PIECES, gameState.Cheats.enableAllDrawableTrackPieces); - SetCheckboxValue(WIDX_ALLOW_TRACK_PLACE_INVALID_HEIGHTS, gameState.Cheats.allowTrackPlaceInvalidHeights); - SetCheckboxValue(WIDX_MAKE_DESTRUCTIBLE, gameState.Cheats.makeAllDestructible); + WIDX_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES, gameState.cheats.showVehiclesFromOtherTrackTypes); + SetCheckboxValue(WIDX_DISABLE_TRAIN_LENGTH_LIMITS, gameState.cheats.disableTrainLengthLimit); + SetCheckboxValue(WIDX_ENABLE_CHAIN_LIFT_ON_ALL_TRACK, gameState.cheats.enableChainLiftOnAllTrack); + SetCheckboxValue(WIDX_ENABLE_ARBITRARY_RIDE_TYPE_CHANGES, gameState.cheats.allowArbitraryRideTypeChanges); + SetCheckboxValue(WIDX_DISABLE_RIDE_VALUE_AGING, gameState.cheats.disableRideValueAging); + SetCheckboxValue(WIDX_IGNORE_RESEARCH_STATUS, gameState.cheats.ignoreResearchStatus); + SetCheckboxValue(WIDX_ENABLE_ALL_DRAWABLE_TRACK_PIECES, gameState.cheats.enableAllDrawableTrackPieces); + SetCheckboxValue(WIDX_ALLOW_TRACK_PLACE_INVALID_HEIGHTS, gameState.cheats.allowTrackPlaceInvalidHeights); + SetCheckboxValue(WIDX_MAKE_DESTRUCTIBLE, gameState.cheats.makeAllDestructible); break; case WINDOW_CHEATS_PAGE_STAFF: - SetCheckboxValue(WIDX_DISABLE_PLANT_AGING, gameState.Cheats.disablePlantAging); + SetCheckboxValue(WIDX_DISABLE_PLANT_AGING, gameState.cheats.disablePlantAging); break; case WINDOW_CHEATS_PAGE_WEATHER: - SetCheckboxValue(WIDX_FREEZE_WEATHER, gameState.Cheats.freezeWeather); + SetCheckboxValue(WIDX_FREEZE_WEATHER, gameState.cheats.freezeWeather); break; } // Current weather if (page == WINDOW_CHEATS_PAGE_WEATHER) { - widgets[WIDX_WEATHER].text = WeatherTypes[EnumValue(gameState.WeatherCurrent.weatherType)]; + widgets[WIDX_WEATHER].text = WeatherTypes[EnumValue(gameState.weatherCurrent.weatherType)]; } // Staff speed if (page == WINDOW_CHEATS_PAGE_STAFF) { - widgets[WIDX_STAFF_SPEED].text = _staffSpeedNames[EnumValue(gameState.Cheats.selectedStaffSpeed)]; + widgets[WIDX_STAFF_SPEED].text = _staffSpeedNames[EnumValue(gameState.cheats.selectedStaffSpeed)]; } - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + if (isInEditorMode()) { SetWidgetDisabled(WIDX_TAB_2, true); SetWidgetDisabled(WIDX_TAB_3, true); @@ -737,6 +737,10 @@ static StringId window_cheats_page_titles[] = { private: void SetPage(int32_t p) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == p && !widgets.empty()) + return; + page = p; frame_no = 0; @@ -755,8 +759,7 @@ static StringId window_cheats_page_titles[] = { Invalidate(); WindowInitScrollWidgets(*this); height = maxY; - widgets[WIDX_BACKGROUND].bottom = maxY - 1; - widgets[WIDX_PAGE_BACKGROUND].bottom = maxY - 1; + ResizeFrameWithPage(); Invalidate(); } @@ -937,7 +940,7 @@ static StringId window_cheats_page_titles[] = { switch (widgetIndex) { case WIDX_NO_MONEY: - CheatsSet(CheatType::NoMoney, GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY ? 0 : 1); + CheatsSet(CheatType::NoMoney, getGameState().park.Flags & PARK_FLAGS_NO_MONEY ? 0 : 1); break; case WIDX_MONEY_SPINNER: MoneyToString(_moneySpinnerValue, _moneySpinnerText, kMoneyStringMaxlength, false); @@ -981,7 +984,7 @@ static StringId window_cheats_page_titles[] = { void OnMouseDownStaff(WidgetIndex widgetIndex) { auto* widget = &widgets[widgetIndex]; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_STAFF_SPEED_DROPDOWN_BUTTON: @@ -999,7 +1002,7 @@ static StringId window_cheats_page_titles[] = { WindowDropdownShowTextCustomWidth( { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, 3, dropdownWidget->width() - 3); - Dropdown::SetChecked(EnumValue(gameState.Cheats.selectedStaffSpeed), true); + Dropdown::SetChecked(EnumValue(gameState.cheats.selectedStaffSpeed), true); } } } @@ -1007,7 +1010,7 @@ static StringId window_cheats_page_titles[] = { void OnMouseDownWeather(WidgetIndex widgetIndex) { auto* widget = &widgets[widgetIndex]; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_WEATHER_DROPDOWN_BUTTON: @@ -1023,7 +1026,7 @@ static StringId window_cheats_page_titles[] = { { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, std::size(WeatherTypes), dropdownWidget->width() - 3); - auto currentWeather = gameState.WeatherCurrent.weatherType; + auto currentWeather = gameState.weatherCurrent.weatherType; Dropdown::SetChecked(EnumValue(currentWeather), true); break; @@ -1033,7 +1036,7 @@ static StringId window_cheats_page_titles[] = { void OnMouseUpPark(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_OWN_ALL_LAND: @@ -1052,7 +1055,7 @@ static StringId window_cheats_page_titles[] = { CheatsSet(CheatType::HaveFun); break; case WIDX_NEVERENDING_MARKETING: - CheatsSet(CheatType::NeverendingMarketing, !gameState.Cheats.neverendingMarketing); + CheatsSet(CheatType::NeverendingMarketing, !gameState.cheats.neverendingMarketing); break; case WIDX_FORCE_PARK_RATING: if (Park::GetForcedRating() >= 0) @@ -1065,20 +1068,20 @@ static StringId window_cheats_page_titles[] = { } break; case WIDX_ALLOW_BUILD_IN_PAUSE_MODE: - CheatsSet(CheatType::BuildInPauseMode, !gameState.Cheats.buildInPauseMode); + CheatsSet(CheatType::BuildInPauseMode, !gameState.cheats.buildInPauseMode); break; case WIDX_ALLOW_REGULAR_PATH_AS_QUEUE: - CheatsSet(CheatType::AllowRegularPathAsQueue, !gameState.Cheats.allowRegularPathAsQueue); + CheatsSet(CheatType::AllowRegularPathAsQueue, !gameState.cheats.allowRegularPathAsQueue); break; case WIDX_ALLOW_SPECIAL_COLOUR_SCHEMES: - CheatsSet(CheatType::AllowSpecialColourSchemes, !gameState.Cheats.allowSpecialColourSchemes); + CheatsSet(CheatType::AllowSpecialColourSchemes, !gameState.cheats.allowSpecialColourSchemes); break; } } void OnMouseUpStaff(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_CLEAR_GRASS: @@ -1097,18 +1100,18 @@ static StringId window_cheats_page_titles[] = { CheatsSet(CheatType::RemoveLitter); break; case WIDX_DISABLE_PLANT_AGING: - CheatsSet(CheatType::DisablePlantAging, !gameState.Cheats.disablePlantAging); + CheatsSet(CheatType::DisablePlantAging, !gameState.cheats.disablePlantAging); break; } } void OnMouseUpWeather(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_FREEZE_WEATHER: - CheatsSet(CheatType::FreezeWeather, !gameState.Cheats.freezeWeather); + CheatsSet(CheatType::FreezeWeather, !gameState.cheats.freezeWeather); break; case WIDX_CREATE_DUCKS: CheatsSet(CheatType::CreateDucks, kCheatsDuckIncrement); @@ -1129,21 +1132,21 @@ static StringId window_cheats_page_titles[] = { if (widgetIndex == WIDX_STAFF_SPEED_DROPDOWN_BUTTON) { int32_t speed = kCheatsStaffNormalSpeed; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (dropdownIndex) { case 0: - gameState.Cheats.selectedStaffSpeed = StaffSpeedCheat::None; + gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::None; speed = kCheatsStaffNormalSpeed; break; case 1: - gameState.Cheats.selectedStaffSpeed = StaffSpeedCheat::Frozen; + gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::Frozen; speed = kCheatsStaffFreezeSpeed; break; case 2: - gameState.Cheats.selectedStaffSpeed = StaffSpeedCheat::Fast; + gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::Fast; speed = kCheatsStaffFastSpeed; } CheatsSet(CheatType::SetStaffSpeed, speed); @@ -1165,7 +1168,7 @@ static StringId window_cheats_page_titles[] = { void OnMouseUpGuests(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_GUEST_HAPPINESS_MAX: @@ -1237,42 +1240,42 @@ static StringId window_cheats_page_titles[] = { CheatsSet(CheatType::GiveAllGuests, OBJECT_UMBRELLA); break; case WIDX_GUEST_IGNORE_RIDE_INTENSITY: - CheatsSet(CheatType::IgnoreRideIntensity, !gameState.Cheats.ignoreRideIntensity); + CheatsSet(CheatType::IgnoreRideIntensity, !gameState.cheats.ignoreRideIntensity); break; case WIDX_GUEST_IGNORE_PRICE: - CheatsSet(CheatType::IgnorePrice, !gameState.Cheats.ignorePrice); + CheatsSet(CheatType::IgnorePrice, !gameState.cheats.ignorePrice); break; case WIDX_DISABLE_VANDALISM: - CheatsSet(CheatType::DisableVandalism, !gameState.Cheats.disableVandalism); + CheatsSet(CheatType::DisableVandalism, !gameState.cheats.disableVandalism); break; case WIDX_DISABLE_LITTERING: - CheatsSet(CheatType::DisableLittering, !gameState.Cheats.disableLittering); + CheatsSet(CheatType::DisableLittering, !gameState.cheats.disableLittering); break; } } void OnMouseUpRides(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_RENEW_RIDES: CheatsSet(CheatType::RenewRides); break; case WIDX_MAKE_DESTRUCTIBLE: - CheatsSet(CheatType::MakeDestructible, !gameState.Cheats.makeAllDestructible); + CheatsSet(CheatType::MakeDestructible, !gameState.cheats.makeAllDestructible); break; case WIDX_FIX_ALL: CheatsSet(CheatType::FixRides); break; case WIDX_UNLOCK_OPERATING_LIMITS: - CheatsSet(CheatType::FastLiftHill, !gameState.Cheats.unlockOperatingLimits); + CheatsSet(CheatType::FastLiftHill, !gameState.cheats.unlockOperatingLimits); break; case WIDX_DISABLE_BRAKES_FAILURE: - CheatsSet(CheatType::DisableBrakesFailure, !gameState.Cheats.disableBrakesFailure); + CheatsSet(CheatType::DisableBrakesFailure, !gameState.cheats.disableBrakesFailure); break; case WIDX_DISABLE_ALL_BREAKDOWNS: - CheatsSet(CheatType::DisableAllBreakdowns, !gameState.Cheats.disableAllBreakdowns); + CheatsSet(CheatType::DisableAllBreakdowns, !gameState.cheats.disableAllBreakdowns); break; case WIDX_RESET_CRASH_STATUS: CheatsSet(CheatType::ResetCrashStatus); @@ -1282,59 +1285,59 @@ static StringId window_cheats_page_titles[] = { break; case WIDX_SHOW_ALL_OPERATING_MODES: { - if (!gameState.Cheats.showAllOperatingModes) + if (!gameState.cheats.showAllOperatingModes) { ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); } - CheatsSet(CheatType::ShowAllOperatingModes, !gameState.Cheats.showAllOperatingModes); + CheatsSet(CheatType::ShowAllOperatingModes, !gameState.cheats.showAllOperatingModes); } break; case WIDX_SHOW_VEHICLES_FROM_OTHER_TRACK_TYPES: { - if (!gameState.Cheats.showVehiclesFromOtherTrackTypes) + if (!gameState.cheats.showVehiclesFromOtherTrackTypes) { ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); } - CheatsSet(CheatType::ShowVehiclesFromOtherTrackTypes, !gameState.Cheats.showVehiclesFromOtherTrackTypes); + CheatsSet(CheatType::ShowVehiclesFromOtherTrackTypes, !gameState.cheats.showVehiclesFromOtherTrackTypes); } break; case WIDX_DISABLE_TRAIN_LENGTH_LIMITS: { - if (!gameState.Cheats.disableTrainLengthLimit) + if (!gameState.cheats.disableTrainLengthLimit) { ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); } - CheatsSet(CheatType::DisableTrainLengthLimit, !gameState.Cheats.disableTrainLengthLimit); + CheatsSet(CheatType::DisableTrainLengthLimit, !gameState.cheats.disableTrainLengthLimit); } break; case WIDX_ENABLE_CHAIN_LIFT_ON_ALL_TRACK: - CheatsSet(CheatType::EnableChainLiftOnAllTrack, !gameState.Cheats.enableChainLiftOnAllTrack); + CheatsSet(CheatType::EnableChainLiftOnAllTrack, !gameState.cheats.enableChainLiftOnAllTrack); break; case WIDX_ENABLE_ARBITRARY_RIDE_TYPE_CHANGES: { - if (!gameState.Cheats.allowArbitraryRideTypeChanges) + if (!gameState.cheats.allowArbitraryRideTypeChanges) { ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); } - CheatsSet(CheatType::AllowArbitraryRideTypeChanges, !gameState.Cheats.allowArbitraryRideTypeChanges); + CheatsSet(CheatType::AllowArbitraryRideTypeChanges, !gameState.cheats.allowArbitraryRideTypeChanges); } break; case WIDX_DISABLE_RIDE_VALUE_AGING: - CheatsSet(CheatType::DisableRideValueAging, !gameState.Cheats.disableRideValueAging); + CheatsSet(CheatType::DisableRideValueAging, !gameState.cheats.disableRideValueAging); break; case WIDX_IGNORE_RESEARCH_STATUS: - CheatsSet(CheatType::IgnoreResearchStatus, !gameState.Cheats.ignoreResearchStatus); + CheatsSet(CheatType::IgnoreResearchStatus, !gameState.cheats.ignoreResearchStatus); break; case WIDX_ENABLE_ALL_DRAWABLE_TRACK_PIECES: - CheatsSet(CheatType::EnableAllDrawableTrackPieces, !gameState.Cheats.enableAllDrawableTrackPieces); + CheatsSet(CheatType::EnableAllDrawableTrackPieces, !gameState.cheats.enableAllDrawableTrackPieces); break; case WIDX_ALLOW_TRACK_PLACE_INVALID_HEIGHTS: { - if (!gameState.Cheats.allowTrackPlaceInvalidHeights) + if (!gameState.cheats.allowTrackPlaceInvalidHeights) { ContextShowError(STR_WARNING_IN_CAPS, STR_THIS_FEATURE_IS_CURRENTLY_UNSTABLE, {}); } - CheatsSet(CheatType::AllowTrackPlaceInvalidHeights, !gameState.Cheats.allowTrackPlaceInvalidHeights); + CheatsSet(CheatType::AllowTrackPlaceInvalidHeights, !gameState.cheats.allowTrackPlaceInvalidHeights); } break; } diff --git a/src/openrct2-ui/windows/ClearScenery.cpp b/src/openrct2-ui/windows/ClearScenery.cpp index 5310fc0d33..ab6d1eeb6c 100644 --- a/src/openrct2-ui/windows/ClearScenery.cpp +++ b/src/openrct2-ui/windows/ClearScenery.cpp @@ -197,7 +197,7 @@ namespace OpenRCT2::Ui::Windows // Draw cost amount if (_clearSceneryCost != kMoney64Undefined && _clearSceneryCost != 0 - && !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + && !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(_clearSceneryCost); @@ -332,7 +332,7 @@ namespace OpenRCT2::Ui::Windows { auto action = GetClearAction(); GameActions::Execute(&action); - gCurrentToolId = Tool::Bulldozer; + gCurrentToolId = Tool::bulldozer; } break; } @@ -349,7 +349,7 @@ namespace OpenRCT2::Ui::Windows { auto action = GetClearAction(); GameActions::Execute(&action); - gCurrentToolId = Tool::Bulldozer; + gCurrentToolId = Tool::bulldozer; } break; } @@ -363,7 +363,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_BACKGROUND: MapInvalidateSelectionRect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - gCurrentToolId = Tool::Bulldozer; + gCurrentToolId = Tool::bulldozer; break; } } @@ -400,8 +400,8 @@ namespace OpenRCT2::Ui::Windows { ShowGridlines(); auto* toolWindow = ContextOpenWindow(WindowClass::ClearScenery); - ToolSet(*toolWindow, WIDX_BACKGROUND, Tool::Bulldozer); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*toolWindow, WIDX_BACKGROUND, Tool::bulldozer); + gInputFlags.set(InputFlag::unk6); } } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/CustomCurrency.cpp b/src/openrct2-ui/windows/CustomCurrency.cpp index 3cfb7b9bef..2a5fdd2035 100644 --- a/src/openrct2-ui/windows/CustomCurrency.cpp +++ b/src/openrct2-ui/windows/CustomCurrency.cpp @@ -198,7 +198,7 @@ namespace OpenRCT2::Ui::Windows DrawWidgets(dpi); - auto screenCoords = windowPos + ScreenCoordsXY{ 10, 30 }; + auto screenCoords = windowPos + ScreenCoordsXY{ 10, 18 + widgets[WIDX_TITLE].height() }; DrawTextBasic(dpi, screenCoords, STR_RATE, {}, { colours[1] }); diff --git a/src/openrct2-ui/windows/DebugPaint.cpp b/src/openrct2-ui/windows/DebugPaint.cpp index cb015859e5..2456eed8ad 100644 --- a/src/openrct2-ui/windows/DebugPaint.cpp +++ b/src/openrct2-ui/windows/DebugPaint.cpp @@ -157,7 +157,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); auto* window = windowMgr->FocusOrCreate( WindowClass::DebugPaint, { 16, ContextGetHeight() - 16 - 33 - WINDOW_HEIGHT }, WINDOW_WIDTH, WINDOW_HEIGHT, - WF_STICK_TO_FRONT | WF_TRANSPARENT); + WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_TITLE_BAR); return window; } diff --git a/src/openrct2-ui/windows/DemolishRidePrompt.cpp b/src/openrct2-ui/windows/DemolishRidePrompt.cpp index adfb72ec54..bad78bbfab 100644 --- a/src/openrct2-ui/windows/DemolishRidePrompt.cpp +++ b/src/openrct2-ui/windows/DemolishRidePrompt.cpp @@ -64,7 +64,7 @@ namespace OpenRCT2::Ui::Windows { case WIDX_DEMOLISH: { - auto gameAction = RideDemolishAction(rideId, RIDE_MODIFY_DEMOLISH); + auto gameAction = RideDemolishAction(rideId, RideModifyType::demolish); GameActions::Execute(&gameAction); break; } @@ -82,10 +82,10 @@ namespace OpenRCT2::Ui::Windows auto currentRide = GetRide(rideId); if (currentRide != nullptr) { - auto stringId = (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) ? STR_DEMOLISH_RIDE_ID + auto stringId = (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) ? STR_DEMOLISH_RIDE_ID : STR_DEMOLISH_RIDE_ID_MONEY; auto ft = Formatter(); - currentRide->FormatNameTo(ft); + currentRide->formatNameTo(ft); ft.Add(_demolishRideCost); ScreenCoordsXY stringCoords(windowPos.x + WW / 2, windowPos.y + (WH / 2) - 3); diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 6260abd8c4..4da833836b 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -46,11 +46,13 @@ namespace OpenRCT2::Ui::Windows MakeWidget({ 0, 0 }, { 1, 1 }, WindowWidgetType::ImgBtn, WindowColour::Primary), }; + std::array gDropdownItems; + std::array gDropdownTooltips; + static std::array _dropdownItemsImages; + int32_t gDropdownNumItems; - Dropdown::Item gDropdownItems[Dropdown::kItemsMaxSize]; - static ImageId _dropdownItemsImages[Dropdown::kItemsMaxSize]; - bool gDropdownIsColour; - int32_t gDropdownLastColourHover; + bool gDropdownHasTooltips; + int32_t gDropdownLastTooltipHover; int32_t gDropdownHighlightedIndex; int32_t gDropdownDefaultIndex; static bool _dropdownPrepareUseImages; @@ -80,7 +82,7 @@ namespace OpenRCT2::Ui::Windows // Input state gDropdownHighlightedIndex = -1; ResetDropdownFlags(); - gDropdownIsColour = false; + gDropdownHasTooltips = false; gDropdownDefaultIndex = -1; InputSetState(InputState::DropdownActive); } @@ -355,15 +357,16 @@ namespace OpenRCT2::Ui::Windows const ScreenCoordsXY& screenPos, int32_t extray, ColourWithFlags colour, uint8_t customItemHeight, uint8_t flags, size_t num_items, int32_t width, size_t prefRowsPerColumn) { - InputSetFlag(static_cast(INPUT_FLAG_DROPDOWN_STAY_OPEN | INPUT_FLAG_DROPDOWN_MOUSE_UP), false); + gInputFlags.unset(InputFlag::dropdownStayOpen, InputFlag::dropdownMouseUp); if (flags & Dropdown::Flag::StayOpen || Config::Get().interface.TouchEnhancements) - InputSetFlag(INPUT_FLAG_DROPDOWN_STAY_OPEN, true); + gInputFlags.set(InputFlag::dropdownStayOpen); WindowDropdownClose(); // Create the window (width/height position are set later) auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->Create(WindowClass::Dropdown, width, customItemHeight, WF_STICK_TO_FRONT); + auto* w = windowMgr->Create( + WindowClass::Dropdown, width, customItemHeight, WF_STICK_TO_FRONT | WF_NO_TITLE_BAR); if (w != nullptr) { auto numRowsPerColumn = prefRowsPerColumn > 0 ? static_cast(prefRowsPerColumn) : Dropdown::kItemsMaxSize; @@ -389,9 +392,9 @@ namespace OpenRCT2::Ui::Windows int32_t x, int32_t y, int32_t extray, ColourWithFlags colour, uint8_t flags, int32_t numItems, int32_t itemWidth, int32_t itemHeight, int32_t numColumns) { - InputSetFlag(static_cast(INPUT_FLAG_DROPDOWN_STAY_OPEN | INPUT_FLAG_DROPDOWN_MOUSE_UP), false); + gInputFlags.unset(InputFlag::dropdownStayOpen, InputFlag::dropdownMouseUp); if (flags & Dropdown::Flag::StayOpen || Config::Get().interface.TouchEnhancements) - InputSetFlag(INPUT_FLAG_DROPDOWN_STAY_OPEN, true); + gInputFlags.set(InputFlag::dropdownStayOpen); // Close existing dropdown WindowDropdownClose(); @@ -491,6 +494,71 @@ namespace OpenRCT2::Ui::Windows COLOUR_VOID, }; + constexpr std::array kColourTooltips = { + STR_COLOUR_BLACK_TIP, + STR_COLOUR_SATURATED_RED_TIP, + STR_COLOUR_DARK_ORANGE_TIP, + STR_COLOUR_DARK_YELLOW_TIP, + STR_COLOUR_GRASS_GREEN_DARK_TIP, + STR_COLOUR_SATURATED_GREEN_TIP, + STR_COLOUR_AQUA_DARK_TIP, + STR_COLOUR_DARK_BLUE_TIP, + STR_COLOUR_SATURATED_PURPLE_DARK_TIP, + + STR_COLOUR_GREY_TIP, + STR_COLOUR_BRIGHT_RED_TIP, + STR_COLOUR_LIGHT_ORANGE_TIP, + STR_COLOUR_YELLOW_TIP, + STR_COLOUR_MOSS_GREEN_TIP, + STR_COLOUR_BRIGHT_GREEN_TIP, + STR_COLOUR_TEAL_TIP, + STR_COLOUR_LIGHT_BLUE_TIP, + STR_COLOUR_BRIGHT_PURPLE_TIP, + + STR_COLOUR_WHITE_TIP, + STR_COLOUR_LIGHT_PINK_TIP, + STR_COLOUR_ORANGE_LIGHT_TIP, + STR_COLOUR_BRIGHT_YELLOW_TIP, + STR_COLOUR_GRASS_GREEN_LIGHT_TIP, + STR_COLOUR_SATURATED_GREEN_LIGHT_TIP, + STR_COLOUR_AQUAMARINE_TIP, + STR_COLOUR_ICY_BLUE_TIP, + STR_COLOUR_SATURATED_PURPLE_LIGHT_TIP, + + STR_COLOUR_DULL_BROWN_DARK_TIP, + STR_COLOUR_BORDEAUX_RED_DARK_TIP, + STR_COLOUR_TAN_DARK_TIP, + STR_COLOUR_SATURATED_BROWN_TIP, + STR_COLOUR_DARK_OLIVE_DARK_TIP, + STR_COLOUR_OLIVE_DARK_TIP, + STR_COLOUR_DULL_GREEN_DARK_TIP, + STR_COLOUR_DARK_PURPLE_TIP, + STR_COLOUR_DARK_PINK_TIP, + + STR_COLOUR_DARK_BROWN_TIP, + STR_COLOUR_BORDEAUX_RED_TIP, + STR_COLOUR_SALMON_PINK_TIP, + STR_COLOUR_LIGHT_BROWN_TIP, + STR_COLOUR_DARK_OLIVE_GREEN_TIP, + STR_COLOUR_OLIVE_GREEN_TIP, + STR_COLOUR_DARK_GREEN_TIP, + STR_COLOUR_LIGHT_PURPLE_TIP, + STR_COLOUR_BRIGHT_PINK_TIP, + + STR_COLOUR_DULL_BROWN_LIGHT_TIP, + STR_COLOUR_BORDEAUX_RED_LIGHT_TIP, + STR_COLOUR_TAN_LIGHT_TIP, + STR_COLOUR_SATURATED_BROWN_LIGHT_TIP, + STR_COLOUR_DARK_OLIVE_LIGHT_TIP, + STR_COLOUR_OLIVE_LIGHT_TIP, + STR_COLOUR_DULL_GREEN_LIGHT_TIP, + STR_COLOUR_DULL_PURPLE_LIGHT_TIP, + STR_COLOUR_MAGENTA_LIGHT_TIP, + + STR_COLOUR_INVISIBLE_TIP, + STR_COLOUR_VOID_TIP, + }; + colour_t ColourDropDownIndexToColour(uint8_t ddidx) { return kColoursDropdownOrder[ddidx]; @@ -504,7 +572,7 @@ namespace OpenRCT2::Ui::Windows { int32_t defaultIndex = -1; - const bool specialColoursEnabled = !alwaysHideSpecialColours && GetGameState().Cheats.allowSpecialColourSchemes; + const bool specialColoursEnabled = !alwaysHideSpecialColours && getGameState().cheats.allowSpecialColourSchemes; auto numColours = specialColoursEnabled ? static_cast(COLOUR_COUNT) : kColourNumNormal; // Set items for (uint64_t i = 0; i < numColours; i++) @@ -528,8 +596,10 @@ namespace OpenRCT2::Ui::Windows Dropdown::Flag::StayOpen, numColours, squareSize, squareSize, DropdownGetAppropriateImageDropdownItemsPerRow(static_cast(numColours))); - gDropdownIsColour = true; - gDropdownLastColourHover = -1; + std::copy(kColourTooltips.begin(), kColourTooltips.end(), gDropdownTooltips.begin()); + + gDropdownHasTooltips = true; + gDropdownLastTooltipHover = -1; gDropdownDefaultIndex = defaultIndex; } diff --git a/src/openrct2-ui/windows/EditorBottomToolbar.cpp b/src/openrct2-ui/windows/EditorBottomToolbar.cpp index 19b96951e9..f7db8c0b32 100644 --- a/src/openrct2-ui/windows/EditorBottomToolbar.cpp +++ b/src/openrct2-ui/windows/EditorBottomToolbar.cpp @@ -20,8 +20,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -72,8 +72,8 @@ namespace OpenRCT2::Ui::Windows { ColourSchemeUpdateByClass( this, - (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WindowClass::EditorScenarioBottomToolbar - : WindowClass::EditorTrackBottomToolbar); + gLegacyScene == LegacyScene::scenarioEditor ? WindowClass::EditorScenarioBottomToolbar + : WindowClass::EditorTrackBottomToolbar); uint16_t screenWidth = ContextGetWidth(); widgets[WIDX_NEXT_IMAGE].left = screenWidth - 200; @@ -86,26 +86,26 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_PREVIOUS_IMAGE].type = WindowWidgetType::ImgBtn; widgets[WIDX_NEXT_IMAGE].type = WindowWidgetType::ImgBtn; - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { HidePreviousStepButton(); HideNextStepButton(); } else { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - if (gameState.EditorStep == EditorStep::ObjectSelection) + if (gameState.editorStep == EditorStep::ObjectSelection) { HidePreviousStepButton(); } - else if (gameState.EditorStep == EditorStep::RollercoasterDesigner) + else if (gameState.editorStep == EditorStep::RollercoasterDesigner) { HideNextStepButton(); } - else if (!(gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER)) + else if (gLegacyScene != LegacyScene::trackDesigner) { - if (GetNumFreeEntities() != kMaxEntities || GetGameState().Park.Flags & PARK_FLAGS_SPRITES_INITIALISED) + if (GetNumFreeEntities() != kMaxEntities || getGameState().park.Flags & PARK_FLAGS_SPRITES_INITIALISED) { HidePreviousStepButton(); } @@ -137,18 +137,18 @@ namespace OpenRCT2::Ui::Windows void OnMouseUp(WidgetIndex widgetIndex) override { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (widgetIndex == WIDX_PREVIOUS_STEP_BUTTON) { - if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) - || (GetNumFreeEntities() == kMaxEntities && !(gameState.Park.Flags & PARK_FLAGS_SPRITES_INITIALISED))) + if (gLegacyScene == LegacyScene::trackDesigner + || (GetNumFreeEntities() == kMaxEntities && !(gameState.park.Flags & PARK_FLAGS_SPRITES_INITIALISED))) { - ((this)->*(kPreviousButtonMouseUp[EnumValue(gameState.EditorStep)]))(); + ((this)->*(kPreviousButtonMouseUp[EnumValue(gameState.editorStep)]))(); } } else if (widgetIndex == WIDX_NEXT_STEP_BUTTON) { - ((this)->*(kNextButtonMouseUp[EnumValue(gameState.EditorStep)]))(); + ((this)->*(kNextButtonMouseUp[EnumValue(gameState.editorStep)]))(); } } @@ -158,7 +158,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - GetGameState().EditorStep = EditorStep::ObjectSelection; + getGameState().editorStep = EditorStep::ObjectSelection; GfxInvalidateScreen(); } @@ -169,7 +169,7 @@ namespace OpenRCT2::Ui::Windows SetAllSceneryItemsInvented(); WindowScenerySetDefaultPlacementConfiguration(); - GetGameState().EditorStep = EditorStep::LandscapeEditor; + getGameState().editorStep = EditorStep::LandscapeEditor; ContextOpenWindow(WindowClass::Map); GfxInvalidateScreen(); } @@ -180,7 +180,7 @@ namespace OpenRCT2::Ui::Windows windowMgr->CloseAll(); ContextOpenWindow(WindowClass::EditorInventionList); - GetGameState().EditorStep = EditorStep::InventionsListSetUp; + getGameState().editorStep = EditorStep::InventionsListSetUp; GfxInvalidateScreen(); } @@ -190,7 +190,7 @@ namespace OpenRCT2::Ui::Windows windowMgr->CloseAll(); ContextOpenWindow(WindowClass::EditorScenarioOptions); - GetGameState().EditorStep = EditorStep::OptionsSelection; + getGameState().editorStep = EditorStep::OptionsSelection; GfxInvalidateScreen(); } @@ -199,8 +199,11 @@ namespace OpenRCT2::Ui::Windows if (!EditorObjectSelectionWindowCheck()) return; + auto* windowMgr = Ui::GetWindowManager(); + windowMgr->CloseByClass(WindowClass::EditorObjectSelection); + FinishObjectSelection(); - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + if (gLegacyScene == LegacyScene::trackDesigner) { ContextOpenWindow(WindowClass::ConstructRide); } @@ -219,7 +222,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); ContextOpenWindow(WindowClass::EditorInventionList); - GetGameState().EditorStep = EditorStep::InventionsListSetUp; + getGameState().editorStep = EditorStep::InventionsListSetUp; } else { @@ -235,7 +238,7 @@ namespace OpenRCT2::Ui::Windows windowMgr->CloseAll(); ContextOpenWindow(WindowClass::EditorScenarioOptions); - GetGameState().EditorStep = EditorStep::OptionsSelection; + getGameState().editorStep = EditorStep::OptionsSelection; GfxInvalidateScreen(); } @@ -245,13 +248,13 @@ namespace OpenRCT2::Ui::Windows windowMgr->CloseAll(); ContextOpenWindow(WindowClass::EditorObjectiveOptions); - GetGameState().EditorStep = EditorStep::ObjectiveSelection; + getGameState().editorStep = EditorStep::ObjectiveSelection; GfxInvalidateScreen(); } void JumpForwardToSaveScenario() const { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); const auto savePrepareResult = ScenarioPrepareForSave(gameState); if (!savePrepareResult.Successful) { @@ -263,8 +266,9 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); auto intent = Intent(WindowClass::Loadsave); - intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_SCENARIO); - intent.PutExtra(INTENT_EXTRA_PATH, gameState.ScenarioName); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::scenario); + intent.PutExtra(INTENT_EXTRA_PATH, gameState.scenarioName); ContextOpenIntent(&intent); } @@ -310,8 +314,8 @@ namespace OpenRCT2::Ui::Windows int16_t textX = (widgets[WIDX_PREVIOUS_IMAGE].left + 30 + widgets[WIDX_PREVIOUS_IMAGE].right) / 2 + windowPos.x; int16_t textY = widgets[WIDX_PREVIOUS_IMAGE].top + 6 + windowPos.y; - StringId stringId = kEditorStepNames[EnumValue(GetGameState().EditorStep) - 1]; - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + StringId stringId = kEditorStepNames[EnumValue(getGameState().editorStep) - 1]; + if (gLegacyScene == LegacyScene::trackDesigner) stringId = STR_EDITOR_STEP_OBJECT_SELECTION; DrawTextBasic(dpi, { textX, textY }, STR_BACK_TO_PREVIOUS_STEP, {}, { textColour, TextAlignment::CENTRE }); @@ -349,8 +353,8 @@ namespace OpenRCT2::Ui::Windows int16_t textX = (widgets[WIDX_NEXT_IMAGE].left + widgets[WIDX_NEXT_IMAGE].right - 30) / 2 + windowPos.x; int16_t textY = widgets[WIDX_NEXT_IMAGE].top + 6 + windowPos.y; - StringId stringId = kEditorStepNames[EnumValue(GetGameState().EditorStep) + 1]; - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + StringId stringId = kEditorStepNames[EnumValue(getGameState().editorStep) + 1]; + if (gLegacyScene == LegacyScene::trackDesigner) stringId = STR_EDITOR_STEP_ROLLERCOASTER_DESIGNER; DrawTextBasic(dpi, { textX, textY }, STR_FORWARD_TO_NEXT_STEP, {}, { textColour, TextAlignment::CENTRE }); @@ -363,7 +367,7 @@ namespace OpenRCT2::Ui::Windows int16_t stateY = height - 0x0C + windowPos.y; auto colour = colours[2].withFlag(ColourFlag::translucent, false).withFlag(ColourFlag::withOutline, true); DrawTextBasic( - dpi, { stateX, stateY }, kEditorStepNames[EnumValue(GetGameState().EditorStep)], {}, + dpi, { stateX, stateY }, kEditorStepNames[EnumValue(getGameState().editorStep)], {}, { colour, TextAlignment::CENTRE }); } @@ -399,7 +403,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); auto* window = windowMgr->Create( WindowClass::BottomToolbar, ScreenCoordsXY(0, ContextGetHeight() - 32), ContextGetWidth(), 32, - WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND); + WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR); return window; } diff --git a/src/openrct2-ui/windows/EditorInventionsList.cpp b/src/openrct2-ui/windows/EditorInventionsList.cpp index 2cd947c58e..d0fb68ea01 100644 --- a/src/openrct2-ui/windows/EditorInventionsList.cpp +++ b/src/openrct2-ui/windows/EditorInventionsList.cpp @@ -155,10 +155,7 @@ namespace OpenRCT2::Ui::Windows selected_tab = 0; _selectedResearchItem = nullptr; - min_width = WW; - min_height = WH; - max_width = WW * 2; - max_height = WH * 2; + WindowSetResize(*this, { WW, WH }, { WW * 2, WH * 2 }); } void OnClose() override @@ -166,7 +163,7 @@ namespace OpenRCT2::Ui::Windows ResearchRemoveFlags(); // When used in-game (as a cheat) - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!isInEditorMode()) { gSilentResearch = true; ResearchResetCurrentItem(); @@ -227,15 +224,15 @@ namespace OpenRCT2::Ui::Windows ScreenSize OnScrollGetSize(int32_t scrollIndex) override { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); ScreenSize size{}; if (scrollIndex == 0) { - size.height = static_cast(gameState.ResearchItemsInvented.size()) * kScrollableRowHeight; + size.height = static_cast(gameState.researchItemsInvented.size()) * kScrollableRowHeight; } else { - size.height = static_cast(gameState.ResearchItemsUninvented.size()) * kScrollableRowHeight; + size.height = static_cast(gameState.researchItemsUninvented.size()) * kScrollableRowHeight; } return size; } @@ -273,7 +270,7 @@ namespace OpenRCT2::Ui::Windows void OnScrollDraw(int32_t scrollIndex, DrawPixelInfo& dpi) override { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); // Draw background uint8_t paletteIndex = ColourMapA[colours[1].colour].mid_light; @@ -283,7 +280,7 @@ namespace OpenRCT2::Ui::Windows int32_t itemY = -kScrollableRowHeight; auto* dragItem = WindowEditorInventionsListDragGetItem(); - const auto& researchList = scrollIndex == 0 ? gameState.ResearchItemsInvented : gameState.ResearchItemsUninvented; + const auto& researchList = scrollIndex == 0 ? gameState.researchItemsInvented : gameState.researchItemsUninvented; for (const auto& researchItem : researchList) { itemY += kScrollableRowHeight; @@ -450,7 +447,7 @@ namespace OpenRCT2::Ui::Windows pressed_widgets |= 1uLL << WIDX_PREVIEW; pressed_widgets |= 1uLL << WIDX_TAB_1; - widgets[WIDX_CLOSE].type = gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR ? WindowWidgetType::Empty + widgets[WIDX_CLOSE].type = gLegacyScene == LegacyScene::scenarioEditor ? WindowWidgetType::Empty : WindowWidgetType::CloseBox; ResizeFrameWithPage(); @@ -525,7 +522,7 @@ namespace OpenRCT2::Ui::Windows void MoveResearchItem(const ResearchItem& item, ResearchItem* beforeItem, bool isInvented) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); _selectedResearchItem = nullptr; Invalidate(); @@ -538,7 +535,7 @@ namespace OpenRCT2::Ui::Windows ResearchRemove(item); - auto& researchList = isInvented ? gameState.ResearchItemsInvented : gameState.ResearchItemsUninvented; + auto& researchList = isInvented ? gameState.researchItemsInvented : gameState.researchItemsUninvented; if (beforeItem != nullptr) { for (size_t i = 0; i < researchList.size(); i++) @@ -558,8 +555,8 @@ namespace OpenRCT2::Ui::Windows private: ResearchItem* GetItemFromScrollY(bool isInvented, int32_t y) const { - auto& gameState = GetGameState(); - auto& researchList = isInvented ? gameState.ResearchItemsInvented : gameState.ResearchItemsUninvented; + auto& gameState = getGameState(); + auto& researchList = isInvented ? gameState.researchItemsInvented : gameState.researchItemsUninvented; for (auto& researchItem : researchList) { y -= kScrollableRowHeight; @@ -574,8 +571,8 @@ namespace OpenRCT2::Ui::Windows ResearchItem* GetItemFromScrollYIncludeSeps(bool isInvented, int32_t y) const { - auto& gameState = GetGameState(); - auto& researchList = isInvented ? gameState.ResearchItemsInvented : gameState.ResearchItemsUninvented; + auto& gameState = getGameState(); + auto& researchList = isInvented ? gameState.researchItemsInvented : gameState.researchItemsUninvented; for (auto& researchItem : researchList) { y -= kScrollableRowHeight; diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index 6ba8b646f7..e44e0535e6 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -37,7 +38,6 @@ #include #include #include -#include #include #include #include @@ -107,16 +107,6 @@ namespace OpenRCT2::Ui::Windows static constexpr uint8_t _numSourceGameItems = 8; - static uint32_t _filter_flags; - static uint16_t _filter_object_counts[EnumValue(ObjectType::count)]; - - static char _filter_string[MAX_PATH]; - - static bool isFilterActive(const uint16_t filter) - { - return (_filter_flags & filter) == filter; - } - static constexpr StringId WINDOW_TITLE = STR_OBJECT_SELECTION; static constexpr int32_t WH = 400; static constexpr int32_t WW = 600; @@ -176,6 +166,7 @@ namespace OpenRCT2::Ui::Windows { STR_OBJECT_SELECTION_TERRAIN_SURFACES, ObjectType::terrainSurface, FILTER_NONE, SPR_G2_TAB_LAND, 1, 1 }, { STR_OBJECT_SELECTION_TERRAIN_EDGES, ObjectType::terrainEdge, FILTER_NONE, SPR_G2_TERRAIN_EDGE_TAB, 1, 1 }, { STR_OBJECT_SELECTION_WATER, ObjectType::water, FILTER_NONE, SPR_TAB_WATER, 1, 1 }, + { STR_OBJECT_SELECTION_CLIMATE, ObjectType::climate, FILTER_NONE, SPR_WEATHER_SUN_CLOUD, 1, 1 }, }; static ObjectSubTab kPeepObjectSubTabs[] = { @@ -184,19 +175,19 @@ namespace OpenRCT2::Ui::Windows }; static constexpr ObjectPageDesc ObjectSelectionPages[] = { - { STR_OBJECT_SELECTION_RIDE_VEHICLES_ATTRACTIONS, ObjectType::ride, SPR_TAB_RIDE_16, kRideObjectSubTabs }, - { STR_OBJECT_SELECTION_SCENERY_GROUPS, ObjectType::sceneryGroup, SPR_TAB_SCENERY_STATUES, kSceneryObjectSubTabs }, - { STR_OBJECT_SELECTION_FOOTPATH_SURFACES, ObjectType::footpathSurface, SPR_G2_LEGACY_PATH_TAB, kPathObjectSubTabs }, - { STR_OBJECT_SELECTION_PARK_ENTRANCE, ObjectType::parkEntrance, SPR_TAB_PARK, kEntrancesObjectSubTabs }, - { STR_OBJECT_SELECTION_TERRAIN_SURFACES, ObjectType::terrainSurface, SPR_G2_TAB_LAND, kTerrainObjectSubTabs }, - { STR_OBJECT_SELECTION_MUSIC, ObjectType::music, SPR_TAB_MUSIC_0, {} }, - { STR_OBJECT_SELECTION_PEEP_NAMES, ObjectType::peepNames, SPR_TAB_GUESTS_0, kPeepObjectSubTabs }, + { STR_OBJECT_SELECTION_RIDE_VEHICLES_ATTRACTIONS, ObjectType::ride, SPR_TAB_RIDE_16, kRideObjectSubTabs }, + { STR_OBJECT_SELECTION_SCENERY_GROUPS, ObjectType::sceneryGroup, SPR_TAB_SCENERY_STATUES, kSceneryObjectSubTabs }, + { STR_OBJECT_SELECTION_FOOTPATH_SURFACES, ObjectType::footpathSurface, SPR_G2_LEGACY_PATH_TAB, kPathObjectSubTabs }, + { STR_OBJECT_SELECTION_PARK_ENTRANCE, ObjectType::parkEntrance, SPR_TAB_PARK, kEntrancesObjectSubTabs }, + { STR_OBJECT_SELECTION_TERRAIN_SURFACES, ObjectType::terrainSurface, SPR_G2_MAP_GEN_TERRAIN_TAB, kTerrainObjectSubTabs }, + { STR_OBJECT_SELECTION_MUSIC, ObjectType::music, SPR_TAB_MUSIC_0, {} }, + { STR_OBJECT_SELECTION_PEEP_NAMES, ObjectType::peepNames, SPR_TAB_GUESTS_0, kPeepObjectSubTabs }, }; // clang-format on #pragma region Widgets - enum WINDOW_EDITOR_OBJECT_SELECTION_WIDGET_IDX + enum WindowEditorObjectSelectionWidgetIndex { WIDX_BACKGROUND, WIDX_TITLE, @@ -267,7 +258,10 @@ namespace OpenRCT2::Ui::Windows int32_t _listSortType = RIDE_SORT_TYPE; bool _listSortDescending = false; std::unique_ptr _loadedObject; + u8string _filter; + uint32_t _filterFlags = FILTER_RIDES_ALL; uint8_t _selectedSubTab = 0; + bool _overrideChecks = false; public: /** @@ -281,19 +275,15 @@ namespace OpenRCT2::Ui::Windows Sub6AB211(); ResetSelectedObjectCountAndSize(); - widgets[WIDX_FILTER_TEXT_BOX].string = _filter_string; - - _filter_flags = FILTER_RIDES_ALL | Config::Get().interface.ObjectSelectionFilterFlags; - std::fill_n(_filter_string, sizeof(_filter_string), 0x00); + _filterFlags = FILTER_RIDES_ALL | Config::Get().interface.ObjectSelectionFilterFlags; + _filter.clear(); WindowInitScrollWidgets(*this); selected_tab = 0; selected_list_item = -1; - min_width = WW; - min_height = WH; - max_width = 1200; - max_height = 1000; + + WindowSetResize(*this, { WW, WH }, { 1200, 1000 }); _listSortType = RIDE_SORT_TYPE; _listSortDescending = false; @@ -303,10 +293,15 @@ namespace OpenRCT2::Ui::Windows VisibleListRefresh(); } + void SetOverrideChecks(bool newState) + { + _overrideChecks = newState; + } + bool CanClose() override { // Prevent window closure when selection is invalid - return EditorObjectSelectionWindowCheck(); + return _overrideChecks || EditorObjectSelectionWindowCheck(); } /** @@ -317,12 +312,12 @@ namespace OpenRCT2::Ui::Windows { UnloadUnselectedObjects(); EditorLoadSelectedObjects(); - EditorObjectFlagsFree(); + EditorObjectFlagsClear(); if (_loadedObject != nullptr) _loadedObject->Unload(); - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + if (isInEditorMode()) { ResearchPopulateListRandom(); } @@ -338,7 +333,7 @@ namespace OpenRCT2::Ui::Windows auto intent = Intent(INTENT_ACTION_REFRESH_NEW_RIDES); ContextBroadcastIntent(&intent); - VisibleListDispose(); + VisibleListClear(); intent = Intent(INTENT_ACTION_REFRESH_SCENERY); ContextBroadcastIntent(&intent); @@ -377,14 +372,18 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_CLOSE: - if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && !EditorObjectSelectionWindowCheck()) + { + if (gLegacyScene != LegacyScene::trackDesignsManager && !EditorObjectSelectionWindowCheck()) return; - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + auto* windowMgr = Ui::GetWindowManager(); + windowMgr->CloseByClass(WindowClass::EditorObjectSelection); + + if (isInEditorMode()) { FinishObjectSelection(); } - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { GameNotifyMapChange(); GameUnloadScripts(); @@ -393,6 +392,7 @@ namespace OpenRCT2::Ui::Windows context->SetActiveScene(context->GetTitleScene()); } break; + } case WIDX_SUB_TAB_0: case WIDX_SUB_TAB_1: @@ -406,13 +406,12 @@ namespace OpenRCT2::Ui::Windows auto& currentPage = ObjectSelectionPages[selected_tab]; auto& subTabDef = currentPage.subTabs[_selectedSubTab]; - _filter_flags &= ~FILTER_RIDES_ALL; - _filter_flags |= subTabDef.flagFilter; + _filterFlags &= ~FILTER_RIDES_ALL; + _filterFlags |= subTabDef.flagFilter; - Config::Get().interface.ObjectSelectionFilterFlags = _filter_flags; + Config::Get().interface.ObjectSelectionFilterFlags = _filterFlags; Config::Save(); - FilterUpdateCounts(); VisibleListRefresh(); selected_list_item = -1; @@ -431,16 +430,16 @@ namespace OpenRCT2::Ui::Windows Invalidate(); auto intent = Intent(WindowClass::Loadsave); - intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_TRACK); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::track); ContextOpenIntent(&intent); break; } case WIDX_FILTER_TEXT_BOX: - WindowStartTextbox(*this, widgetIndex, _filter_string, sizeof(_filter_string)); + WindowStartTextbox(*this, widgetIndex, _filter, kTextInputSize); break; case WIDX_FILTER_CLEAR_BUTTON: - std::fill_n(_filter_string, sizeof(_filter_string), 0x00); - FilterUpdateCounts(); + _filter.clear(); scrolls->contentOffsetY = 0; VisibleListRefresh(); Invalidate(); @@ -494,7 +493,7 @@ namespace OpenRCT2::Ui::Windows void OnResize() override { - WindowSetResize(*this, WW, WH, 1200, 1000); + WindowSetResize(*this, { WW, WH }, { 1200, 1000 }); } static constexpr StringId kSourceStringIds[] = { @@ -516,8 +515,9 @@ namespace OpenRCT2::Ui::Windows gDropdownItems[ddIdx].Format = STR_TOGGLE_OPTION; } - // Track manager cannot select multiple, so only show selection filters if not in track manager - if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) + // Track designs manager cannot select multiple, so only show selection filters if not in track designs + // manager + if (!(gLegacyScene == LegacyScene::trackDesignsManager)) { numSelectionItems = 3; gDropdownItems[DDIX_FILTER_SEPARATOR].Format = 0; @@ -535,16 +535,16 @@ namespace OpenRCT2::Ui::Windows for (int32_t i = 0; i < _numSourceGameItems; i++) { - if (_filter_flags & (1 << i)) + if (_filterFlags & (1 << i)) { Dropdown::SetChecked(i, true); } } - if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) + if (!(gLegacyScene == LegacyScene::trackDesignsManager)) { - Dropdown::SetChecked(DDIX_FILTER_SELECTED, isFilterActive(FILTER_SELECTED)); - Dropdown::SetChecked(DDIX_FILTER_NONSELECTED, isFilterActive(FILTER_NONSELECTED)); + Dropdown::SetChecked(DDIX_FILTER_SELECTED, IsFilterActive(FILTER_SELECTED)); + Dropdown::SetChecked(DDIX_FILTER_NONSELECTED, IsFilterActive(FILTER_NONSELECTED)); } break; } @@ -560,22 +560,21 @@ namespace OpenRCT2::Ui::Windows case WIDX_FILTER_DROPDOWN_BTN: if (dropdownIndex == DDIX_FILTER_SELECTED) { - _filter_flags ^= FILTER_SELECTED; - _filter_flags &= ~FILTER_NONSELECTED; + _filterFlags ^= FILTER_SELECTED; + _filterFlags &= ~FILTER_NONSELECTED; } else if (dropdownIndex == DDIX_FILTER_NONSELECTED) { - _filter_flags ^= FILTER_NONSELECTED; - _filter_flags &= ~FILTER_SELECTED; + _filterFlags ^= FILTER_NONSELECTED; + _filterFlags &= ~FILTER_SELECTED; } else { - _filter_flags ^= (1 << dropdownIndex); + _filterFlags ^= (1 << dropdownIndex); } - Config::Get().interface.ObjectSelectionFilterFlags = _filter_flags; + Config::Get().interface.ObjectSelectionFilterFlags = _filterFlags; Config::Save(); - FilterUpdateCounts(); scrolls->contentOffsetY = 0; VisibleListRefresh(); @@ -619,10 +618,10 @@ namespace OpenRCT2::Ui::Windows const CursorState* state = ContextGetCursorState(); Audio::Play(Audio::SoundId::Click1, 0, state->position.x); - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { const auto objectSelectResult = WindowEditorObjectSelectionSelectObject( - 0, INPUT_FLAG_EDITOR_OBJECT_SELECT, listItem->repositoryItem); + 0, { EditorInputFlag::select }, listItem->repositoryItem); if (!objectSelectResult.Successful) return; @@ -637,31 +636,31 @@ namespace OpenRCT2::Ui::Windows auto& objManager = GetContext()->GetObjectManager(); objManager.LoadObject(_loadedObject.get()->GetIdentifier()); + windowMgr->ForceClose(WindowClass::EditorObjectSelection); + // This function calls window_track_list_open ManageTracks(); - Close(); return; } - uint32_t inputFlags = INPUT_FLAG_EDITOR_OBJECT_1 | INPUT_FLAG_EDITOR_OBJECT_SELECT_OBJECTS_IN_SCENERY_GROUP; + EditorInputFlags inputFlags = { EditorInputFlag::unk1, EditorInputFlag::selectObjectsInSceneryGroup }; // If already selected if (!(object_selection_flags & ObjectSelectionFlags::Selected)) - inputFlags |= INPUT_FLAG_EDITOR_OBJECT_SELECT; + inputFlags.set(EditorInputFlag::select); _gSceneryGroupPartialSelectError = std::nullopt; const auto objectSelectResult = WindowEditorObjectSelectionSelectObject(0, inputFlags, listItem->repositoryItem); if (!objectSelectResult.Successful) { - StringId error_title = (inputFlags & INPUT_FLAG_EDITOR_OBJECT_SELECT) ? STR_UNABLE_TO_SELECT_THIS_OBJECT - : STR_UNABLE_TO_DE_SELECT_THIS_OBJECT; + StringId error_title = (inputFlags.has(EditorInputFlag::select)) ? STR_UNABLE_TO_SELECT_THIS_OBJECT + : STR_UNABLE_TO_DE_SELECT_THIS_OBJECT; ContextShowError(error_title, objectSelectResult.Message, {}); return; } - if (isFilterActive(FILTER_SELECTED) || isFilterActive(FILTER_NONSELECTED)) + if (IsFilterActive(FILTER_SELECTED) || IsFilterActive(FILTER_NONSELECTED)) { - FilterUpdateCounts(); VisibleListRefresh(); Invalidate(); } @@ -739,7 +738,7 @@ namespace OpenRCT2::Ui::Windows if (screenCoords.y + kScrollableRowHeight >= dpi.y && screenCoords.y <= dpi.y + dpi.height) { // Draw checkbox - if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && !(*listItem.flags & 0x20)) + if (!(gLegacyScene == LegacyScene::trackDesignsManager) && !(*listItem.flags & 0x20)) GfxFillRectInset( dpi, { { 2, screenCoords.y }, { 11, screenCoords.y + 10 } }, colours[1], INSET_RECT_F_E0); @@ -753,7 +752,8 @@ namespace OpenRCT2::Ui::Windows } // Draw checkmark - if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && (*listItem.flags & ObjectSelectionFlags::Selected)) + if (!(gLegacyScene == LegacyScene::trackDesignsManager) + && (*listItem.flags & ObjectSelectionFlags::Selected)) { screenCoords.x = 2; auto darkness = highlighted ? TextDarkness::ExtraDark : TextDarkness::Dark; @@ -764,7 +764,7 @@ namespace OpenRCT2::Ui::Windows DrawText(dpi, screenCoords, { colour2, FontStyle::Medium, darkness }, kCheckMarkString); } - screenCoords.x = gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER ? 0 : 15; + screenCoords.x = gLegacyScene == LegacyScene::trackDesignsManager ? 0 : 15; utf8 itemBuffer[512]{}; auto bufferWithColour = strcpy(itemBuffer, highlighted ? "{WINDOW_COLOUR_2}" : "{BLACK}"); @@ -795,7 +795,7 @@ namespace OpenRCT2::Ui::Windows // Draw text String::safeUtf8Copy(buffer, listItem.repositoryItem->Name.c_str(), 256 - (buffer - bufferWithColour)); - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { while (*buffer != 0 && *buffer != 9) buffer++; @@ -830,15 +830,10 @@ namespace OpenRCT2::Ui::Windows if (widgetIndex != WIDX_FILTER_TEXT_BOX) return; - std::string tempText = text.data(); - const char* c = tempText.c_str(); - - if (strcmp(_filter_string, c) == 0) + if (text == _filter) return; - String::safeUtf8Copy(_filter_string, c, sizeof(_filter_string)); - - FilterUpdateCounts(); + _filter.assign(text); scrolls->contentOffsetY = 0; @@ -868,12 +863,12 @@ namespace OpenRCT2::Ui::Windows // Set window title and buttons auto& titleWidget = widgets[WIDX_TITLE]; - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { titleWidget.text = STR_TRACK_DESIGNS_MANAGER_SELECT_RIDE_TYPE; installTrackWidget.type = WindowWidgetType::Button; } - else if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + else if (gLegacyScene == LegacyScene::trackDesigner) { titleWidget.text = STR_ROLLER_COASTER_DESIGNER_SELECT_RIDE_TYPES_VEHICLES; installTrackWidget.type = WindowWidgetType::Empty; @@ -893,10 +888,10 @@ namespace OpenRCT2::Ui::Windows ft.Add(currentPage.Caption); // Set filter dropdown caption - if (!isFilterActive(FILTER_SOURCES_ALL)) + if (!IsFilterActive(FILTER_SOURCES_ALL)) { // Only one source active? - uint32_t sources = _filter_flags & FILTER_SOURCES_ALL; + uint32_t sources = _filterFlags & FILTER_SOURCES_ALL; auto numSourcesActive = std::popcount(sources); if (numSourcesActive == 1) { @@ -934,7 +929,7 @@ namespace OpenRCT2::Ui::Windows else widgets[WIDX_RELOAD_OBJECT].type = WindowWidgetType::Empty; - if (gScreenFlags & (SCREEN_FLAGS_TRACK_MANAGER | SCREEN_FLAGS_TRACK_DESIGNER)) + if (gLegacyScene == LegacyScene::trackDesignsManager || gLegacyScene == LegacyScene::trackDesigner) { for (size_t i = 1; i < std::size(ObjectSelectionPages); i++) { @@ -949,13 +944,13 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_FILTER_RIDE_TAB_FRAME].right = widgets[WIDX_LIST].right; widgets[WIDX_FILTER_TEXT_BOX].right = widgets[WIDX_LIST].right - 77; - widgets[WIDX_FILTER_TEXT_BOX].top = (hasSubTabs ? 79 : 48); - widgets[WIDX_FILTER_TEXT_BOX].bottom = (hasSubTabs ? 92 : 61); + auto contentStart = widgets[WIDX_TAB_CONTENT_PANEL].top; + widgets[WIDX_FILTER_TEXT_BOX].moveToY(contentStart + (hasSubTabs ? 36 : 5)); + widgets[WIDX_FILTER_TEXT_BOX].string = _filter.data(); widgets[WIDX_FILTER_CLEAR_BUTTON].left = widgets[WIDX_LIST].right - 73; widgets[WIDX_FILTER_CLEAR_BUTTON].right = widgets[WIDX_LIST].right; - widgets[WIDX_FILTER_CLEAR_BUTTON].top = (hasSubTabs ? 79 : 48); - widgets[WIDX_FILTER_CLEAR_BUTTON].bottom = (hasSubTabs ? 92 : 61); + widgets[WIDX_FILTER_CLEAR_BUTTON].moveToY(contentStart + (hasSubTabs ? 36 : 5)); // Toggle sub-tab visibility const auto numSubTabs = static_cast(currentPage.subTabs.size()); @@ -1040,7 +1035,6 @@ namespace OpenRCT2::Ui::Windows continue; auto& subTabDef = currentPage.subTabs[i]; - int32_t spriteIndex = subTabDef.baseImage; int32_t frame = 0; if (subTabDef.animationLength > 1 && _selectedSubTab == i) { @@ -1048,12 +1042,16 @@ namespace OpenRCT2::Ui::Windows } // TODO: generalise this? + int32_t spriteIndex = subTabDef.baseImage; if (currentPage.Caption == STR_OBJECT_SELECTION_RIDE_VEHICLES_ATTRACTIONS && i == 4) spriteIndex += kThrillRidesTabAnimationSequence[frame]; else spriteIndex += frame; auto screenPos = windowPos + ScreenCoordsXY{ widget.left, widget.top }; + if (spriteIndex == SPR_WEATHER_SUN_CLOUD) + screenPos += { 2, 4 }; + GfxDrawSprite(dpi, ImageId(spriteIndex, colours[1].colour), screenPos); } } @@ -1067,7 +1065,7 @@ namespace OpenRCT2::Ui::Windows ColourMapA[colours[1].colour].darkest); // Draw number of selected items - if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) + if (!(gLegacyScene == LegacyScene::trackDesignsManager)) { auto screenPos = windowPos + ScreenCoordsXY{ 3, height - 13 }; @@ -1152,12 +1150,13 @@ namespace OpenRCT2::Ui::Windows void SetPage(int32_t _page) { - if (selected_tab == _page) + // Skip setting page if we're already on this page, unless we're initialising the window + if (selected_tab == _page && !widgets.empty()) return; selected_tab = _page; _selectedSubTab = 0; - _filter_flags |= FILTER_RIDES_ALL; + _filterFlags |= FILTER_RIDES_ALL; selected_list_item = -1; scrolls[0].contentOffsetY = 0; frame_no = 0; @@ -1181,7 +1180,7 @@ namespace OpenRCT2::Ui::Windows { int32_t numObjects = static_cast(ObjectRepositoryGetItemsCount()); - VisibleListDispose(); + VisibleListClear(); selected_list_item = -1; const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); @@ -1208,7 +1207,7 @@ namespace OpenRCT2::Ui::Windows if (_listItems.empty()) { - VisibleListDispose(); + VisibleListClear(); } else { @@ -1237,7 +1236,7 @@ namespace OpenRCT2::Ui::Windows Invalidate(); } - void VisibleListDispose() + void VisibleListClear() { _listItems.clear(); _listItems.shrink_to_fit(); @@ -1283,6 +1282,7 @@ namespace OpenRCT2::Ui::Windows screenPos.y += DrawTextWrapped(dpi, screenPos, descriptionWidth, STR_WINDOW_COLOUR_2_STRINGID, ft); screenPos.y += kListRowHeight; } + if (GetSelectedObjectType() == ObjectType::ride) { auto* rideObject = reinterpret_cast(_loadedObject.get()); @@ -1419,19 +1419,19 @@ namespace OpenRCT2::Ui::Windows bool FilterSelected(uint8_t objectFlag) { // Track Manager has no concept of selection filtering, so always return true - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { return true; } - if (isFilterActive(FILTER_SELECTED) == isFilterActive(FILTER_NONSELECTED)) + if (IsFilterActive(FILTER_SELECTED) == IsFilterActive(FILTER_NONSELECTED)) { return true; } - if (isFilterActive(FILTER_SELECTED) && (objectFlag & ObjectSelectionFlags::Selected)) + if (IsFilterActive(FILTER_SELECTED) && (objectFlag & ObjectSelectionFlags::Selected)) { return true; } - if (isFilterActive(FILTER_NONSELECTED) && !(objectFlag & ObjectSelectionFlags::Selected)) + if (IsFilterActive(FILTER_NONSELECTED) && !(objectFlag & ObjectSelectionFlags::Selected)) { return true; } @@ -1445,6 +1445,11 @@ namespace OpenRCT2::Ui::Windows return !(item.Flags & ObjectItemFlags::IsCompatibilityObject) || (objectFlag & ObjectSelectionFlags::Selected); } + bool IsFilterActive(const uint16_t filter) const + { + return (_filterFlags & filter) == filter; + } + static bool IsFilterInName(const ObjectRepositoryItem& item, std::string_view filter) { return String::contains(item.Name, filter, true); @@ -1481,25 +1486,24 @@ namespace OpenRCT2::Ui::Windows bool FilterString(const ObjectRepositoryItem& item) { // Nothing to search for - std::string_view filter = _filter_string; - if (filter.empty()) + if (_filter.empty()) return true; - return IsFilterInName(item, filter) || IsFilterInRideType(item, filter) || IsFilterInFilename(item, filter) - || IsFilterInAuthor(item, filter); + return IsFilterInName(item, _filter) || IsFilterInRideType(item, _filter) || IsFilterInFilename(item, _filter) + || IsFilterInAuthor(item, _filter); } bool SourcesMatch(ObjectSourceGame source) { // clang-format off - return (isFilterActive(FILTER_RCT1) && source == ObjectSourceGame::RCT1) || - (isFilterActive(FILTER_AA) && source == ObjectSourceGame::AddedAttractions) || - (isFilterActive(FILTER_LL) && source == ObjectSourceGame::LoopyLandscapes) || - (isFilterActive(FILTER_RCT2) && source == ObjectSourceGame::RCT2) || - (isFilterActive(FILTER_WW) && source == ObjectSourceGame::WackyWorlds) || - (isFilterActive(FILTER_TT) && source == ObjectSourceGame::TimeTwister) || - (isFilterActive(FILTER_OO) && source == ObjectSourceGame::OpenRCT2Official) || - (isFilterActive(FILTER_CUSTOM) && + return (IsFilterActive(FILTER_RCT1) && source == ObjectSourceGame::RCT1) || + (IsFilterActive(FILTER_AA) && source == ObjectSourceGame::AddedAttractions) || + (IsFilterActive(FILTER_LL) && source == ObjectSourceGame::LoopyLandscapes) || + (IsFilterActive(FILTER_RCT2) && source == ObjectSourceGame::RCT2) || + (IsFilterActive(FILTER_WW) && source == ObjectSourceGame::WackyWorlds) || + (IsFilterActive(FILTER_TT) && source == ObjectSourceGame::TimeTwister) || + (IsFilterActive(FILTER_OO) && source == ObjectSourceGame::OpenRCT2Official) || + (IsFilterActive(FILTER_CUSTOM) && source != ObjectSourceGame::RCT1 && source != ObjectSourceGame::AddedAttractions && source != ObjectSourceGame::LoopyLandscapes && @@ -1512,7 +1516,7 @@ namespace OpenRCT2::Ui::Windows bool FilterSource(const ObjectRepositoryItem* item) { - if (isFilterActive(FILTER_ALL)) + if (IsFilterActive(FILTER_ALL)) return true; for (auto source : item->Sources) @@ -1537,32 +1541,11 @@ namespace OpenRCT2::Ui::Windows break; } } - return (_filter_flags & (1 << (GetRideTypeDescriptor(rideType).Category + _numSourceGameItems))) != 0; + return (_filterFlags & (1 << (EnumValue(GetRideTypeDescriptor(rideType).Category) + _numSourceGameItems))) != 0; } return true; } - void FilterUpdateCounts() - { - if (!isFilterActive(FILTER_ALL) || _filter_string[0] != '\0') - { - const auto& selectionFlags = _objectSelectionFlags; - std::fill(std::begin(_filter_object_counts), std::end(_filter_object_counts), 0); - - size_t numObjects = ObjectRepositoryGetItemsCount(); - const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); - for (size_t i = 0; i < numObjects; i++) - { - const ObjectRepositoryItem* item = &items[i]; - if (FilterSource(item) && FilterString(*item) && FilterChunks(item) && FilterSelected(selectionFlags[i]) - && FilterCompatibilityObject(*item, selectionFlags[i])) - { - _filter_object_counts[EnumValue(item->Type)]++; - } - } - } - } - std::string ObjectGetDescription(const Object* object) { switch (object->GetObjectType()) @@ -1622,7 +1605,7 @@ namespace OpenRCT2::Ui::Windows SetEveryRideTypeInvented(); SetEveryRideEntryInvented(); - GetGameState().EditorStep = EditorStep::DesignsManager; + getGameState().editorStep = EditorStep::DesignsManager; int32_t entry_index = 0; for (; ObjectEntryGetChunk(ObjectType::ride, entry_index) == nullptr; entry_index++) @@ -1649,6 +1632,20 @@ namespace OpenRCT2::Ui::Windows WindowClass::EditorObjectSelection, 755, 400, WF_10 | WF_RESIZABLE | WF_CENTRE_SCREEN); } + // Used for forced closure + void EditorObjectSelectionClose() + { + auto* windowMgr = GetWindowManager(); + auto window = windowMgr->FindByClass(WindowClass::EditorObjectSelection); + if (window == nullptr) + { + return; + } + auto objSelWindow = static_cast(window); + objSelWindow->SetOverrideChecks(true); + objSelWindow->Close(); + } + static bool VisibleListSortRideName(const ObjectListItem& a, const ObjectListItem& b) { auto nameA = a.repositoryItem->Name.c_str(); @@ -1703,7 +1700,7 @@ namespace OpenRCT2::Ui::Windows { LOG_ERROR("Failed to load entry %s", std::string(descriptor.GetName()).c_str()); } - else if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) + else if (!isInEditorMode()) { // Defaults selected items to researched (if in-game) auto objectType = loadedObject->GetObjectType(); @@ -1738,17 +1735,15 @@ namespace OpenRCT2::Ui::Windows bool EditorObjectSelectionWindowCheck() { - auto* windowMgr = Ui::GetWindowManager(); - auto [missingObjectType, errorString] = Editor::CheckObjectSelection(); if (missingObjectType == ObjectType::none) { - windowMgr->CloseByClass(WindowClass::EditorObjectSelection); return true; } ContextShowError(STR_INVALID_SELECTION_OF_OBJECTS, errorString, {}); + auto* windowMgr = Ui::GetWindowManager(); WindowBase* w = windowMgr->FindByClass(WindowClass::EditorObjectSelection); if (w != nullptr) { diff --git a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp index cc1b4aa9fa..80eca6388a 100644 --- a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp +++ b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include @@ -304,6 +303,10 @@ namespace OpenRCT2::Ui::Windows */ void SetPage(int32_t newPage) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == newPage && !widgets.empty()) + return; + page = newPage; frame_no = 0; _rideableRides.clear(); @@ -327,7 +330,7 @@ namespace OpenRCT2::Ui::Windows // Check if there are any rides (not shops or facilities) const auto& rideManager = GetRideManager(); if (std::any_of( - rideManager.begin(), rideManager.end(), [](const Ride& rideToCheck) { return rideToCheck.IsRide(); })) + rideManager.begin(), rideManager.end(), [](const Ride& rideToCheck) { return rideToCheck.isRide(); })) { disabled_widgets &= ~(1uLL << WIDX_TAB_2); } @@ -382,8 +385,8 @@ namespace OpenRCT2::Ui::Windows */ void SetObjective(int32_t objective) { - auto& gameState = GetGameState(); - gameState.ScenarioObjective.Type = objective; + auto& gameState = getGameState(); + gameState.scenarioObjective.Type = objective; Invalidate(); // Set default objective arguments @@ -395,37 +398,37 @@ namespace OpenRCT2::Ui::Windows case OBJECTIVE_10_ROLLERCOASTERS: break; case OBJECTIVE_GUESTS_BY: - gameState.ScenarioObjective.Year = 3; - gameState.ScenarioObjective.NumGuests = 1500; + gameState.scenarioObjective.Year = 3; + gameState.scenarioObjective.NumGuests = 1500; break; case OBJECTIVE_PARK_VALUE_BY: - gameState.ScenarioObjective.Year = 3; - gameState.ScenarioObjective.Currency = 50000.00_GBP; + gameState.scenarioObjective.Year = 3; + gameState.scenarioObjective.Currency = 50000.00_GBP; break; case OBJECTIVE_GUESTS_AND_RATING: - gameState.ScenarioObjective.NumGuests = 2000; + gameState.scenarioObjective.NumGuests = 2000; break; case OBJECTIVE_MONTHLY_RIDE_INCOME: - gameState.ScenarioObjective.Currency = 10000.00_GBP; + gameState.scenarioObjective.Currency = 10000.00_GBP; break; case OBJECTIVE_10_ROLLERCOASTERS_LENGTH: - gameState.ScenarioObjective.MinimumLength = 1200; + gameState.scenarioObjective.MinimumLength = 1200; break; case OBJECTIVE_FINISH_5_ROLLERCOASTERS: - gameState.ScenarioObjective.MinimumExcitement = MakeRideRating(6, 70); + gameState.scenarioObjective.MinimumExcitement = MakeRideRating(6, 70); break; case OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE: - gameState.ScenarioObjective.Currency = 50000.00_GBP; + gameState.scenarioObjective.Currency = 50000.00_GBP; break; case OBJECTIVE_MONTHLY_FOOD_INCOME: - gameState.ScenarioObjective.Currency = 1000.00_GBP; + gameState.scenarioObjective.Currency = 1000.00_GBP; break; } } void ShowObjectiveDropdown() { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); int32_t numItems = 0, objectiveType; Widget* dropdownWidget; @@ -436,7 +439,7 @@ namespace OpenRCT2::Ui::Windows if (i == OBJECTIVE_NONE || i == OBJECTIVE_BUILD_THE_BEST) continue; - const bool objectiveAllowedByMoneyUsage = !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) + const bool objectiveAllowedByMoneyUsage = !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY) || !ObjectiveNeedsMoney(i); // This objective can only work if the player can ask money for rides. const bool objectiveAllowedByPaymentSettings = (i != OBJECTIVE_MONTHLY_RIDE_INCOME) @@ -453,7 +456,7 @@ namespace OpenRCT2::Ui::Windows { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, numItems, dropdownWidget->width() - 3); - objectiveType = gameState.ScenarioObjective.Type; + objectiveType = gameState.scenarioObjective.Type; for (int32_t j = 0; j < numItems; j++) { if (gDropdownItems[j].Args - STR_OBJECTIVE_DROPDOWN_NONE == objectiveType) @@ -471,7 +474,7 @@ namespace OpenRCT2::Ui::Windows dropdownWidget = &widgets[WIDX_CATEGORY]; - for (i = SCENARIO_CATEGORY_BEGINNER; i <= SCENARIO_CATEGORY_OTHER; i++) + for (i = EnumValue(ScenarioCategory::beginner); i <= EnumValue(ScenarioCategory::other); i++) { gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL; gDropdownItems[i].Args = kScenarioCategoryStringIds[i]; @@ -479,68 +482,68 @@ namespace OpenRCT2::Ui::Windows WindowDropdownShowTextCustomWidth( { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, 5, dropdownWidget->width() - 3); - Dropdown::SetChecked(GetGameState().ScenarioCategory, true); + Dropdown::SetChecked(EnumValue(getGameState().scenarioCategory), true); } void Arg1Increase() { - auto& gameState = GetGameState(); - switch (gameState.ScenarioObjective.Type) + auto& gameState = getGameState(); + switch (gameState.scenarioObjective.Type) { case OBJECTIVE_PARK_VALUE_BY: case OBJECTIVE_MONTHLY_RIDE_INCOME: case OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE: - if (gameState.ScenarioObjective.Currency >= kObjectiveCurrencyLoanAndValueMax) + if (gameState.scenarioObjective.Currency >= kObjectiveCurrencyLoanAndValueMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Currency += kObjectiveCurrencyLoanAndValueAdjustment; + gameState.scenarioObjective.Currency += kObjectiveCurrencyLoanAndValueAdjustment; Invalidate(); } break; case OBJECTIVE_MONTHLY_FOOD_INCOME: - if (gameState.ScenarioObjective.Currency >= kObjectiveCurrencyFoodMax) + if (gameState.scenarioObjective.Currency >= kObjectiveCurrencyFoodMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Currency += kObjectiveCurrencyFoodAdjustment; + gameState.scenarioObjective.Currency += kObjectiveCurrencyFoodAdjustment; Invalidate(); } break; case OBJECTIVE_10_ROLLERCOASTERS_LENGTH: - if (gameState.ScenarioObjective.MinimumLength >= kObjectiveLengthMax) + if (gameState.scenarioObjective.MinimumLength >= kObjectiveLengthMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.MinimumLength += kObjectiveLengthAdjustment; + gameState.scenarioObjective.MinimumLength += kObjectiveLengthAdjustment; Invalidate(); } break; case OBJECTIVE_FINISH_5_ROLLERCOASTERS: - if (gameState.ScenarioObjective.MinimumExcitement >= kObjectiveExcitementMax) + if (gameState.scenarioObjective.MinimumExcitement >= kObjectiveExcitementMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.MinimumExcitement += kObjectiveExcitementAdjustment; + gameState.scenarioObjective.MinimumExcitement += kObjectiveExcitementAdjustment; Invalidate(); } break; default: - if (gameState.ScenarioObjective.NumGuests >= kObjectiveGuestsMax) + if (gameState.scenarioObjective.NumGuests >= kObjectiveGuestsMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.NumGuests += kObjectiveGuestsAdjustment; + gameState.scenarioObjective.NumGuests += kObjectiveGuestsAdjustment; Invalidate(); } break; @@ -549,63 +552,63 @@ namespace OpenRCT2::Ui::Windows void Arg1Decrease() { - auto& gameState = GetGameState(); - switch (gameState.ScenarioObjective.Type) + auto& gameState = getGameState(); + switch (gameState.scenarioObjective.Type) { case OBJECTIVE_PARK_VALUE_BY: case OBJECTIVE_MONTHLY_RIDE_INCOME: case OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE: - if (gameState.ScenarioObjective.Currency <= kObjectiveCurrencyLoanAndValueMin) + if (gameState.scenarioObjective.Currency <= kObjectiveCurrencyLoanAndValueMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Currency -= kObjectiveCurrencyLoanAndValueAdjustment; + gameState.scenarioObjective.Currency -= kObjectiveCurrencyLoanAndValueAdjustment; Invalidate(); } break; case OBJECTIVE_MONTHLY_FOOD_INCOME: - if (gameState.ScenarioObjective.Currency <= kObjectiveCurrencyFoodMin) + if (gameState.scenarioObjective.Currency <= kObjectiveCurrencyFoodMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Currency -= kObjectiveCurrencyFoodAdjustment; + gameState.scenarioObjective.Currency -= kObjectiveCurrencyFoodAdjustment; Invalidate(); } break; case OBJECTIVE_10_ROLLERCOASTERS_LENGTH: - if (gameState.ScenarioObjective.MinimumLength <= kObjectiveLengthMin) + if (gameState.scenarioObjective.MinimumLength <= kObjectiveLengthMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.MinimumLength -= kObjectiveLengthAdjustment; + gameState.scenarioObjective.MinimumLength -= kObjectiveLengthAdjustment; Invalidate(); } break; case OBJECTIVE_FINISH_5_ROLLERCOASTERS: - if (gameState.ScenarioObjective.MinimumExcitement <= kObjectiveExcitementMin) + if (gameState.scenarioObjective.MinimumExcitement <= kObjectiveExcitementMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.MinimumExcitement -= kObjectiveExcitementAdjustment; + gameState.scenarioObjective.MinimumExcitement -= kObjectiveExcitementAdjustment; Invalidate(); } break; default: - if (gameState.ScenarioObjective.NumGuests <= kObjectiveGuestsMin) + if (gameState.scenarioObjective.NumGuests <= kObjectiveGuestsMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.NumGuests -= kObjectiveGuestsAdjustment; + gameState.scenarioObjective.NumGuests -= kObjectiveGuestsAdjustment; Invalidate(); } break; @@ -614,28 +617,28 @@ namespace OpenRCT2::Ui::Windows void Arg2Increase() { - auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Year >= kObjectiveYearMax) + auto& gameState = getGameState(); + if (gameState.scenarioObjective.Year >= kObjectiveYearMax) { ContextShowError(STR_CANT_INCREASE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Year += kObjectiveYearAdjustment; + gameState.scenarioObjective.Year += kObjectiveYearAdjustment; Invalidate(); } } void Arg2Decrease() { - auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Year <= kObjectiveYearMin) + auto& gameState = getGameState(); + if (gameState.scenarioObjective.Year <= kObjectiveYearMin) { ContextShowError(STR_CANT_REDUCE_FURTHER, kStringIdNone, {}); } else { - gameState.ScenarioObjective.Year -= kObjectiveYearAdjustment; + gameState.scenarioObjective.Year -= kObjectiveYearAdjustment; Invalidate(); } } @@ -648,25 +651,25 @@ namespace OpenRCT2::Ui::Windows */ void OnMouseUpMain(WidgetIndex widgetIndex) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_PARK_NAME: { WindowTextInputRawOpen( - this, WIDX_PARK_NAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, {}, gameState.Park.Name.c_str(), + this, WIDX_PARK_NAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, {}, gameState.park.Name.c_str(), kParkNameMaxLength); break; } case WIDX_SCENARIO_NAME: WindowTextInputRawOpen( this, WIDX_SCENARIO_NAME, STR_SCENARIO_NAME, STR_ENTER_SCENARIO_NAME, {}, - gameState.ScenarioName.c_str(), kScenarioNameMaxLength); + gameState.scenarioName.c_str(), kScenarioNameMaxLength); break; case WIDX_DETAILS: WindowTextInputRawOpen( this, WIDX_DETAILS, STR_PARK_SCENARIO_DETAILS, STR_ENTER_SCENARIO_DESCRIPTION, {}, - gameState.ScenarioDetails.c_str(), kScenarioDetailsNameMaxLength); + gameState.scenarioDetails.c_str(), kScenarioDetailsNameMaxLength); break; } } @@ -677,7 +680,7 @@ namespace OpenRCT2::Ui::Windows */ void OnResizeMain() { - WindowSetResize(*this, 450, 229, 450, 229); + WindowSetResize(*this, { 450, 229 }, { 450, 229 }); } /** @@ -715,7 +718,7 @@ namespace OpenRCT2::Ui::Windows */ void OnDropdownMain(WidgetIndex widgetIndex, int32_t dropdownIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); uint8_t newObjectiveType; if (dropdownIndex == -1) @@ -726,13 +729,13 @@ namespace OpenRCT2::Ui::Windows case WIDX_OBJECTIVE_DROPDOWN: // TODO: Don't rely on string ID order newObjectiveType = static_cast(gDropdownItems[dropdownIndex].Args - STR_OBJECTIVE_DROPDOWN_NONE); - if (gameState.ScenarioObjective.Type != newObjectiveType) + if (gameState.scenarioObjective.Type != newObjectiveType) SetObjective(newObjectiveType); break; case WIDX_CATEGORY_DROPDOWN: - if (gameState.ScenarioCategory != static_cast(dropdownIndex)) + if (gameState.scenarioCategory != static_cast(dropdownIndex)) { - gameState.ScenarioCategory = static_cast(dropdownIndex); + gameState.scenarioCategory = static_cast(dropdownIndex); Invalidate(); } break; @@ -751,10 +754,10 @@ namespace OpenRCT2::Ui::Windows OnPrepareDraw(); InvalidateWidget(WIDX_TAB_1); - objectiveType = GetGameState().ScenarioObjective.Type; + objectiveType = getGameState().scenarioObjective.Type; // Check if objective is allowed by money and pay-per-ride settings. - const bool objectiveAllowedByMoneyUsage = !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) + const bool objectiveAllowedByMoneyUsage = !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY) || !ObjectiveNeedsMoney(objectiveType); // This objective can only work if the player can ask money for rides. const bool objectiveAllowedByPaymentSettings = (objectiveType != OBJECTIVE_MONTHLY_RIDE_INCOME) @@ -775,7 +778,7 @@ namespace OpenRCT2::Ui::Windows if (text.empty()) return; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_PARK_NAME: @@ -783,18 +786,18 @@ namespace OpenRCT2::Ui::Windows auto action = ParkSetNameAction(std::string(text)); GameActions::Execute(&action); - if (gameState.ScenarioName.empty()) + if (gameState.scenarioName.empty()) { - gameState.ScenarioName = gameState.Park.Name; + gameState.scenarioName = gameState.park.Name; } break; } case WIDX_SCENARIO_NAME: - gameState.ScenarioName = text; + gameState.scenarioName = text; Invalidate(); break; case WIDX_DETAILS: - gameState.ScenarioDetails = text; + gameState.scenarioDetails = text; Invalidate(); break; } @@ -806,11 +809,11 @@ namespace OpenRCT2::Ui::Windows */ void OnPrepareDrawMain() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); SetPressedTab(); - switch (gameState.ScenarioObjective.Type) + switch (gameState.scenarioObjective.Type) { case OBJECTIVE_GUESTS_BY: case OBJECTIVE_PARK_VALUE_BY: @@ -844,8 +847,8 @@ namespace OpenRCT2::Ui::Windows break; } - widgets[WIDX_CLOSE].type = (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WindowWidgetType::Empty - : WindowWidgetType::CloseBox; + widgets[WIDX_CLOSE].type = gLegacyScene == LegacyScene::scenarioEditor ? WindowWidgetType::Empty + : WindowWidgetType::CloseBox; AnchorBorderWidgets(); } @@ -856,7 +859,7 @@ namespace OpenRCT2::Ui::Windows */ void OnDrawMain(DrawPixelInfo& dpi) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); int32_t widthToSet; StringId stringId; @@ -870,14 +873,14 @@ namespace OpenRCT2::Ui::Windows // Objective value screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_OBJECTIVE].left + 1, widgets[WIDX_OBJECTIVE].top }; auto ft = Formatter(); - ft.Add(ObjectiveDropdownOptionNames[gameState.ScenarioObjective.Type]); + ft.Add(ObjectiveDropdownOptionNames[gameState.scenarioObjective.Type]); DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); if (widgets[WIDX_OBJECTIVE_ARG_1].type != WindowWidgetType::Empty) { // Objective argument 1 label screenCoords = windowPos + ScreenCoordsXY{ 28, widgets[WIDX_OBJECTIVE_ARG_1].top }; - switch (gameState.ScenarioObjective.Type) + switch (gameState.scenarioObjective.Type) { case OBJECTIVE_GUESTS_BY: case OBJECTIVE_GUESTS_AND_RATING: @@ -906,31 +909,31 @@ namespace OpenRCT2::Ui::Windows screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_OBJECTIVE_ARG_1].left + 1, widgets[WIDX_OBJECTIVE_ARG_1].top }; ft = Formatter(); - switch (gameState.ScenarioObjective.Type) + switch (gameState.scenarioObjective.Type) { case OBJECTIVE_GUESTS_BY: case OBJECTIVE_GUESTS_AND_RATING: stringId = STR_WINDOW_COLOUR_2_COMMA32; - ft.Add(gameState.ScenarioObjective.NumGuests); + ft.Add(gameState.scenarioObjective.NumGuests); break; case OBJECTIVE_PARK_VALUE_BY: case OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE: case OBJECTIVE_MONTHLY_RIDE_INCOME: case OBJECTIVE_MONTHLY_FOOD_INCOME: stringId = STR_CURRENCY_FORMAT_LABEL; - ft.Add(gameState.ScenarioObjective.Currency); + ft.Add(gameState.scenarioObjective.Currency); break; case OBJECTIVE_10_ROLLERCOASTERS_LENGTH: stringId = STR_WINDOW_COLOUR_2_LENGTH; - ft.Add(gameState.ScenarioObjective.MinimumLength); + ft.Add(gameState.scenarioObjective.MinimumLength); break; case OBJECTIVE_FINISH_5_ROLLERCOASTERS: stringId = STR_WINDOW_COLOUR_2_COMMA2DP32; - ft.Add(gameState.ScenarioObjective.MinimumExcitement); + ft.Add(gameState.scenarioObjective.MinimumExcitement); break; default: stringId = STR_WINDOW_COLOUR_2_COMMA2DP32; - ft.Add(gameState.ScenarioObjective.Currency); + ft.Add(gameState.scenarioObjective.Currency); break; } DrawTextBasic(dpi, screenCoords, stringId, ft, { COLOUR_BLACK }); @@ -946,7 +949,7 @@ namespace OpenRCT2::Ui::Windows screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_OBJECTIVE_ARG_2].left + 1, widgets[WIDX_OBJECTIVE_ARG_2].top }; ft = Formatter(); - ft.Add((gameState.ScenarioObjective.Year * MONTH_COUNT) - 1); + ft.Add((gameState.scenarioObjective.Year * MONTH_COUNT) - 1); DrawTextBasic(dpi, screenCoords, STR_WINDOW_OBJECTIVE_VALUE_DATE, ft); } @@ -955,7 +958,7 @@ namespace OpenRCT2::Ui::Windows widthToSet = widgets[WIDX_PARK_NAME].left - 16; { - auto parkName = GetGameState().Park.Name.c_str(); + auto parkName = getGameState().park.Name.c_str(); ft = Formatter(); ft.Add(STR_STRING); @@ -969,7 +972,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(STR_STRING); - ft.Add(gameState.ScenarioName.c_str()); + ft.Add(gameState.scenarioName.c_str()); DrawTextEllipsised(dpi, screenCoords, widthToSet, STR_WINDOW_SCENARIO_NAME, ft); // Scenario details label @@ -982,7 +985,7 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); ft.Add(STR_STRING); - ft.Add(gameState.ScenarioDetails.c_str()); + ft.Add(gameState.scenarioDetails.c_str()); DrawTextWrapped(dpi, screenCoords, widthToSet, STR_BLACK_STRING, ft); // Scenario category label @@ -992,7 +995,7 @@ namespace OpenRCT2::Ui::Windows // Scenario category value screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_CATEGORY].left + 1, widgets[WIDX_CATEGORY].top }; ft = Formatter(); - ft.Add(kScenarioCategoryStringIds[gameState.ScenarioCategory]); + ft.Add(kScenarioCategoryStringIds[EnumValue(gameState.scenarioCategory)]); DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); } @@ -1006,7 +1009,7 @@ namespace OpenRCT2::Ui::Windows */ void OnResizeRides() { - WindowSetResize(*this, 380, 224, 380, 224); + WindowSetResize(*this, { 380, 224 }, { 380, 224 }); } /** @@ -1024,7 +1027,7 @@ namespace OpenRCT2::Ui::Windows _rideableRides.clear(); for (auto& currentRide : GetRideManager()) { - if (currentRide.IsRide()) + if (currentRide.isRide()) { _rideableRides.push_back(currentRide.id); } @@ -1061,7 +1064,7 @@ namespace OpenRCT2::Ui::Windows auto* currentRide = GetRide(_rideableRides[i]); if (currentRide != nullptr) { - currentRide->lifecycle_flags ^= RIDE_LIFECYCLE_INDESTRUCTIBLE; + currentRide->lifecycleFlags ^= RIDE_LIFECYCLE_INDESTRUCTIBLE; } Invalidate(); } @@ -1093,8 +1096,8 @@ namespace OpenRCT2::Ui::Windows { SetPressedTab(); - widgets[WIDX_CLOSE].type = (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WindowWidgetType::Empty - : WindowWidgetType::CloseBox; + widgets[WIDX_CLOSE].type = gLegacyScene == LegacyScene::scenarioEditor ? WindowWidgetType::Empty + : WindowWidgetType::CloseBox; AnchorBorderWidgets(); } @@ -1143,7 +1146,7 @@ namespace OpenRCT2::Ui::Windows auto* currentRide = GetRide(_rideableRides[i]); if (currentRide != nullptr) { - if (currentRide->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE) + if (currentRide->lifecycleFlags & RIDE_LIFECYCLE_INDESTRUCTIBLE) { auto darkness = stringId == STR_WINDOW_COLOUR_2_STRINGID ? TextDarkness::ExtraDark : TextDarkness::Dark; DrawText( @@ -1154,7 +1157,7 @@ namespace OpenRCT2::Ui::Windows // Ride name Formatter ft; - currentRide->FormatNameTo(ft); + currentRide->formatNameTo(ft); DrawTextBasic(dpi, { 15, y }, stringId, ft); } } diff --git a/src/openrct2-ui/windows/EditorParkEntrance.cpp b/src/openrct2-ui/windows/EditorParkEntrance.cpp index 87c39574ed..a1cd5a40e0 100644 --- a/src/openrct2-ui/windows/EditorParkEntrance.cpp +++ b/src/openrct2-ui/windows/EditorParkEntrance.cpp @@ -35,7 +35,7 @@ namespace OpenRCT2::Ui::Windows static constexpr int32_t kScrollWidth = (kImageSize * kNumColumns) + kScrollBarWidth + 4; static constexpr int32_t kScrollHeight = (kImageSize * kNumRows); static constexpr int32_t kWindowWidth = kScrollWidth + 28; - static constexpr int32_t kWindowHeight = kScrollHeight + 50; + static constexpr int32_t kWindowHeight = kScrollHeight + 51; struct EntranceSelection { @@ -129,9 +129,9 @@ namespace OpenRCT2::Ui::Windows CoordsXYZD PlaceParkEntranceGetMapPosition(const ScreenCoordsXY& screenCoords) { - CoordsXYZD parkEntranceMapPosition{ 0, 0, 0, INVALID_DIRECTION }; + CoordsXYZD parkEntranceMapPosition{ 0, 0, 0, kInvalidDirection }; const CoordsXY mapCoords = ViewportInteractionGetTileStartAtCursor(screenCoords); - parkEntranceMapPosition = { mapCoords.x, mapCoords.y, 0, INVALID_DIRECTION }; + parkEntranceMapPosition = { mapCoords.x, mapCoords.y, 0, kInvalidDirection }; if (parkEntranceMapPosition.IsNull()) return parkEntranceMapPosition; @@ -246,15 +246,14 @@ namespace OpenRCT2::Ui::Windows InitParkEntranceItems(); list_information_type = 0; - min_width = kWindowWidth; - min_height = kWindowHeight; - max_width = kWindowWidth; - max_height = static_cast(43 + kImageSize * GetNumRows()); + + auto maxHeight = static_cast(kWindowHeight + kImageSize * (GetNumRows() - 1)); + WindowSetResize(*this, { kWindowWidth, kWindowHeight }, { kWindowWidth, maxHeight }); pressed_widgets |= 1LL << WIDX_TAB; - ToolSet(*this, WIDX_LIST, Tool::EntranceDown); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*this, WIDX_LIST, Tool::entranceDown); + gInputFlags.set(InputFlag::unk6); } void OnMouseUp(WidgetIndex widgetIndex) override diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index ec7f2ca510..18dfaf22be 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -35,7 +34,7 @@ namespace OpenRCT2::Ui::Windows static constexpr int32_t WH_FINANCIAL = 149; static constexpr int32_t WW_GUESTS = 380; - static constexpr int32_t WH_GUESTS = 149; + static constexpr int32_t WH_GUESTS = 137; static constexpr int32_t WW_PARK = 400; static constexpr int32_t WH_PARK = 200; @@ -50,13 +49,6 @@ namespace OpenRCT2::Ui::Windows WINDOW_EDITOR_SCENARIO_OPTIONS_PAGE_COUNT }; - static constexpr StringId kClimateNames[] = { - STR_CLIMATE_COOL_AND_WET, - STR_CLIMATE_WARM, - STR_CLIMATE_HOT_AND_DRY, - STR_CLIMATE_COLD, - }; - enum { WIDX_BACKGROUND, @@ -98,8 +90,9 @@ namespace OpenRCT2::Ui::Windows WIDX_GUEST_INITIAL_THIRST, WIDX_GUEST_INITIAL_THIRST_INCREASE, WIDX_GUEST_INITIAL_THIRST_DECREASE, - WIDX_GUEST_PREFER_LESS_INTENSE_RIDES, - WIDX_GUEST_PREFER_MORE_INTENSE_RIDES, + WIDX_GUESTS_INTENSITY_PREFERENCE_LABEL, + WIDX_GUESTS_INTENSITY_PREFERENCE, + WIDX_GUESTS_INTENSITY_PREFERENCE_DROPDOWN, // Park tab WIDX_LAND_COST = WIDX_PAGE_START, @@ -113,8 +106,6 @@ namespace OpenRCT2::Ui::Windows WIDX_ENTRY_PRICE, WIDX_ENTRY_PRICE_INCREASE, WIDX_ENTRY_PRICE_DECREASE, - WIDX_CLIMATE, - WIDX_CLIMATE_DROPDOWN, WIDX_FORBID_TREE_REMOVAL, WIDX_FORBID_LANDSCAPE_CHANGES, WIDX_FORBID_HIGH_CONSTRUCTION, @@ -140,16 +131,17 @@ namespace OpenRCT2::Ui::Windows static constexpr Widget window_editor_scenario_options_guests_widgets[] = { WINDOW_SHIM(STR_SCENARIO_OPTIONS_GUESTS, WW_GUESTS, WH_GUESTS), - MakeWidget ({ 0, 43}, { WW_GUESTS, 106}, WindowWidgetType::Resize, WindowColour::Secondary), - MakeRemapWidget ({ 3, 17}, { 31, 27}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB, STR_SCENARIO_OPTIONS_FINANCIAL_TIP ), - MakeRemapWidget ({ 34, 17}, { 31, 30}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB, STR_SCENARIO_OPTIONS_GUESTS_TIP ), - MakeRemapWidget ({ 65, 17}, { 31, 27}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB, STR_SCENARIO_OPTIONS_PARK_TIP ), - MakeSpinnerWidgets({268, 48}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets - MakeSpinnerWidgets({268, 65}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets - MakeSpinnerWidgets({268, 82}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets - MakeSpinnerWidgets({268, 99}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets - MakeWidget ({ 8, 116}, {WW_GUESTS - 16, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_GUESTS_PREFER_LESS_INTENSE_RIDES, STR_GUESTS_PREFER_LESS_INTENSE_RIDES_TIP), - MakeWidget ({ 8, 133}, {WW_GUESTS - 16, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_GUESTS_PREFER_MORE_INTENSE_RIDES, STR_GUESTS_PREFER_MORE_INTENSE_RIDES_TIP), + MakeWidget ({ 0, 43}, {WW_GUESTS, 106}, WindowWidgetType::Resize, WindowColour::Secondary), + MakeRemapWidget ({ 3, 17}, { 31, 27}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB, STR_SCENARIO_OPTIONS_FINANCIAL_TIP), + MakeRemapWidget ({ 34, 17}, { 31, 30}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB, STR_SCENARIO_OPTIONS_GUESTS_TIP ), + MakeRemapWidget ({ 65, 17}, { 31, 27}, WindowWidgetType::Tab, WindowColour::Secondary, SPR_TAB, STR_SCENARIO_OPTIONS_PARK_TIP ), + MakeSpinnerWidgets({298, 48}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets + MakeSpinnerWidgets({298, 65}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets + MakeSpinnerWidgets({298, 82}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets + MakeSpinnerWidgets({298, 99}, { 70, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets + MakeWidget ({ 8, 116}, { 170, 12}, WindowWidgetType::Label, WindowColour::Secondary, STR_GUESTS_PREFER_INTENSITY_LABEL ), + MakeWidget ({198, 116}, { 170, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdNone, STR_GUESTS_PREFER_INTENSITY_TIP ), + MakeWidget ({357, 117}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_GUESTS_PREFER_INTENSITY_TIP ), }; static constexpr Widget window_editor_scenario_options_park_widgets[] = { @@ -163,8 +155,6 @@ namespace OpenRCT2::Ui::Windows MakeWidget ({ 8, 82}, { 210, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdNone, STR_PAY_FOR_PARK_PAY_FOR_RIDES_TIP), MakeWidget ({206, 83}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_PAY_FOR_PARK_PAY_FOR_RIDES_TIP), MakeSpinnerWidgets({328, 82}, { 67, 12}, WindowWidgetType::Spinner, WindowColour::Secondary ), // NB: 3 widgets - MakeWidget ({188, 99}, { 207, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary, kStringIdNone, STR_SELECT_CLIMATE_TIP ), - MakeWidget ({383, 100}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH, STR_SELECT_CLIMATE_TIP ), MakeWidget ({ 8, 116}, {WW_PARK - 16, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_FORBID_TREE_REMOVAL, STR_FORBID_TREE_REMOVAL_TIP ), MakeWidget ({ 8, 133}, {WW_PARK - 16, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_FORBID_LANDSCAPE_CHANGES, STR_FORBID_LANDSCAPE_CHANGES_TIP ), MakeWidget ({ 8, 150}, {WW_PARK - 16, 12}, WindowWidgetType::Checkbox, WindowColour::Secondary, STR_FORBID_HIGH_CONSTRUCTION, STR_FORBID_HIGH_CONSTRUCTION_TIP ), @@ -300,6 +290,8 @@ namespace OpenRCT2::Ui::Windows { switch (page) { + case WINDOW_EDITOR_SCENARIO_OPTIONS_PAGE_GUESTS: + return GuestsDropdown(widgetIndex, selectedIndex); case WINDOW_EDITOR_SCENARIO_OPTIONS_PAGE_PARK: return ParkDropdown(widgetIndex, selectedIndex); } @@ -348,6 +340,10 @@ namespace OpenRCT2::Ui::Windows void SetPage(int32_t newPage) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == newPage && !widgets.empty()) + return; + page = newPage; frame_no = 0; hold_down_widgets = window_editor_scenario_options_page_hold_down_widgets[page]; @@ -363,7 +359,7 @@ namespace OpenRCT2::Ui::Windows void FinancialMouseUp(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_CLOSE: @@ -376,7 +372,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_NO_MONEY: { - auto newMoneySetting = (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) ? 0 : 1; + auto newMoneySetting = (gameState.park.Flags & PARK_FLAGS_NO_MONEY) ? 0 : 1; auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::NoMoney, newMoneySetting); GameActions::Execute(&scenarioSetSetting); Invalidate(); @@ -386,7 +382,7 @@ namespace OpenRCT2::Ui::Windows { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::ForbidMarketingCampaigns, - gameState.Park.Flags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN ? 0 : 1); + gameState.park.Flags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN ? 0 : 1); GameActions::Execute(&scenarioSetSetting); Invalidate(); break; @@ -394,7 +390,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_RCT1_INTEREST: { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::UseRCT1Interest, gameState.Park.Flags & PARK_FLAGS_RCT1_INTEREST ? 0 : 1); + ScenarioSetSetting::UseRCT1Interest, gameState.park.Flags & PARK_FLAGS_RCT1_INTEREST ? 0 : 1); GameActions::Execute(&scenarioSetSetting); Invalidate(); break; @@ -404,36 +400,19 @@ namespace OpenRCT2::Ui::Windows void FinancialResize() { - WindowSetResize(*this, 280, 149, 280, 149); - } - - void ShowClimateDropdown() - { - int32_t i; - - const auto& dropdownWidget = widgets[WIDX_CLIMATE]; - - for (i = 0; i < static_cast(ClimateType::Count); i++) - { - gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL; - gDropdownItems[i].Args = kClimateNames[i]; - } - WindowDropdownShowTextCustomWidth( - { windowPos.x + dropdownWidget.left, windowPos.y + dropdownWidget.top }, dropdownWidget.height() + 1, - colours[1], 0, Dropdown::Flag::StayOpen, static_cast(ClimateType::Count), dropdownWidget.width() - 3); - Dropdown::SetChecked(static_cast(GetGameState().Climate), true); + WindowSetResize(*this, { 280, 149 }, { 280, 149 }); } void FinancialMouseDown(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_INITIAL_CASH_INCREASE: - if (gameState.InitialCash < 1000000.00_GBP) + if (gameState.initialCash < 1000000.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::InitialCash, gameState.InitialCash + 500.00_GBP); + ScenarioSetSetting::InitialCash, gameState.initialCash + 500.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -443,10 +422,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_INITIAL_CASH_DECREASE: - if (gameState.InitialCash > 0.00_GBP) + if (gameState.initialCash > 0.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::InitialCash, gameState.InitialCash - 500.00_GBP); + ScenarioSetSetting::InitialCash, gameState.initialCash - 500.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -456,10 +435,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_INITIAL_LOAN_INCREASE: - if (gameState.BankLoan < 5000000.00_GBP) + if (gameState.bankLoan < 5000000.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::InitialLoan, gameState.BankLoan + 1000.00_GBP); + ScenarioSetSetting::InitialLoan, gameState.bankLoan + 1000.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -469,10 +448,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_INITIAL_LOAN_DECREASE: - if (gameState.BankLoan > 0.00_GBP) + if (gameState.bankLoan > 0.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::InitialLoan, gameState.BankLoan - 1000.00_GBP); + ScenarioSetSetting::InitialLoan, gameState.bankLoan - 1000.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -482,10 +461,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_MAXIMUM_LOAN_INCREASE: - if (gameState.MaxBankLoan < 5000000.00_GBP) + if (gameState.maxBankLoan < 5000000.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::MaximumLoanSize, gameState.MaxBankLoan + 1000.00_GBP); + ScenarioSetSetting::MaximumLoanSize, gameState.maxBankLoan + 1000.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -495,10 +474,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_MAXIMUM_LOAN_DECREASE: - if (gameState.MaxBankLoan > 0.00_GBP) + if (gameState.maxBankLoan > 0.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::MaximumLoanSize, gameState.MaxBankLoan - 1000.00_GBP); + ScenarioSetSetting::MaximumLoanSize, gameState.maxBankLoan - 1000.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -508,10 +487,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_INTEREST_RATE_INCREASE: - if (gameState.BankLoanInterestRate < MaxBankLoanInterestRate) + if (gameState.bankLoanInterestRate < MaxBankLoanInterestRate) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::AnnualInterestRate, gameState.BankLoanInterestRate + 1); + ScenarioSetSetting::AnnualInterestRate, gameState.bankLoanInterestRate + 1); GameActions::Execute(&scenarioSetSetting); } else @@ -521,9 +500,9 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_INTEREST_RATE_DECREASE: - if (gameState.BankLoanInterestRate > 0) + if (gameState.bankLoanInterestRate > 0) { - auto interest = std::min(MaxBankLoanInterestRate, gameState.BankLoanInterestRate - 1); + auto interest = std::min(MaxBankLoanInterestRate, gameState.bankLoanInterestRate - 1); auto scenarioSetSetting = ScenarioSetSettingAction(ScenarioSetSetting::AnnualInterestRate, interest); GameActions::Execute(&scenarioSetSetting); } @@ -535,7 +514,7 @@ namespace OpenRCT2::Ui::Windows break; } - if (gScreenFlags == SCREEN_FLAGS_PLAYING) + if (gLegacyScene == LegacyScene::playing) { auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::Finances); @@ -554,8 +533,8 @@ namespace OpenRCT2::Ui::Windows { SetPressedTab(); - auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) { SetWidgetPressed(WIDX_NO_MONEY, true); for (int32_t i = WIDX_INITIAL_CASH; i <= WIDX_RCT1_INTEREST; i++) @@ -575,7 +554,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_MAXIMUM_LOAN_DECREASE].type = WindowWidgetType::Button; widgets[WIDX_FORBID_MARKETING].type = WindowWidgetType::Checkbox; - if (gameState.Park.Flags & PARK_FLAGS_RCT1_INTEREST) + if (gameState.park.Flags & PARK_FLAGS_RCT1_INTEREST) { widgets[WIDX_INTEREST_RATE].type = WindowWidgetType::Empty; widgets[WIDX_INTEREST_RATE_INCREASE].type = WindowWidgetType::Empty; @@ -592,10 +571,10 @@ namespace OpenRCT2::Ui::Windows } } - SetWidgetPressed(WIDX_FORBID_MARKETING, gameState.Park.Flags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN); + SetWidgetPressed(WIDX_FORBID_MARKETING, gameState.park.Flags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN); - widgets[WIDX_CLOSE].type = (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WindowWidgetType::Empty - : WindowWidgetType::CloseBox; + widgets[WIDX_CLOSE].type = gLegacyScene == LegacyScene::scenarioEditor ? WindowWidgetType::Empty + : WindowWidgetType::CloseBox; AnchorBorderWidgets(); } @@ -607,7 +586,7 @@ namespace OpenRCT2::Ui::Windows WindowDrawWidgets(*this, dpi); DrawTabImages(dpi); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); const auto& initialCashWidget = widgets[WIDX_INITIAL_CASH]; if (initialCashWidget.type != WindowWidgetType::Empty) @@ -617,7 +596,7 @@ namespace OpenRCT2::Ui::Windows screenCoords = windowPos + ScreenCoordsXY{ initialCashWidget.left + 1, initialCashWidget.top }; auto ft = Formatter(); - ft.Add(GetGameState().InitialCash); + ft.Add(getGameState().initialCash); DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } @@ -629,7 +608,7 @@ namespace OpenRCT2::Ui::Windows screenCoords = windowPos + ScreenCoordsXY{ initialLoanWidget.left + 1, initialLoanWidget.top }; auto ft = Formatter(); - ft.Add(gameState.BankLoan); + ft.Add(gameState.bankLoan); DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } @@ -641,7 +620,7 @@ namespace OpenRCT2::Ui::Windows screenCoords = windowPos + ScreenCoordsXY{ maximumLoanWidget.left + 1, maximumLoanWidget.top }; auto ft = Formatter(); - ft.Add(GetGameState().MaxBankLoan); + ft.Add(getGameState().maxBankLoan); DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } @@ -655,7 +634,7 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Add( - std::clamp(static_cast(gameState.BankLoanInterestRate), INT16_MIN, INT16_MAX)); + std::clamp(static_cast(gameState.bankLoanInterestRate), INT16_MIN, INT16_MAX)); DrawTextBasic(dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); } } @@ -666,7 +645,6 @@ namespace OpenRCT2::Ui::Windows void GuestsMouseUp(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); switch (widgetIndex) { case WIDX_CLOSE: @@ -677,43 +655,25 @@ namespace OpenRCT2::Ui::Windows case WIDX_TAB_3: SetPage(widgetIndex - WIDX_TAB_1); break; - case WIDX_GUEST_PREFER_LESS_INTENSE_RIDES: - { - auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::GuestsPreferLessIntenseRides, - gameState.Park.Flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES ? 0 : 1); - GameActions::Execute(&scenarioSetSetting); - Invalidate(); - break; - } - case WIDX_GUEST_PREFER_MORE_INTENSE_RIDES: - { - auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::GuestsPreferMoreIntenseRides, - gameState.Park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES ? 0 : 1); - GameActions::Execute(&scenarioSetSetting); - Invalidate(); - break; - } } } void GuestsResize() { - WindowSetResize(*this, 380, 149, 380, 149); + WindowSetResize(*this, { WW_GUESTS, WH_GUESTS }, { WW_GUESTS, WH_GUESTS }); } void GuestsMouseDown(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_CASH_PER_GUEST_INCREASE: - if (gameState.GuestInitialCash < 1000.00_GBP) + if (gameState.guestInitialCash < 1000.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::AverageCashPerGuest, gameState.GuestInitialCash + 1.00_GBP); + ScenarioSetSetting::AverageCashPerGuest, gameState.guestInitialCash + 1.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -723,10 +683,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_CASH_PER_GUEST_DECREASE: - if (gameState.GuestInitialCash > 0.00_GBP) + if (gameState.guestInitialCash > 0.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::AverageCashPerGuest, gameState.GuestInitialCash - 1.00_GBP); + ScenarioSetSetting::AverageCashPerGuest, gameState.guestInitialCash - 1.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -736,10 +696,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_GUEST_INITIAL_HAPPINESS_INCREASE: - if (gameState.GuestInitialHappiness < 250) + if (gameState.guestInitialHappiness < 250) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::GuestInitialHappiness, gameState.GuestInitialHappiness + 4); + ScenarioSetSetting::GuestInitialHappiness, gameState.guestInitialHappiness + 4); GameActions::Execute(&scenarioSetSetting); } else @@ -749,10 +709,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_GUEST_INITIAL_HAPPINESS_DECREASE: - if (gameState.GuestInitialHappiness > 40) + if (gameState.guestInitialHappiness > 40) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::GuestInitialHappiness, gameState.GuestInitialHappiness - 4); + ScenarioSetSetting::GuestInitialHappiness, gameState.guestInitialHappiness - 4); GameActions::Execute(&scenarioSetSetting); } else @@ -762,10 +722,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_GUEST_INITIAL_HUNGER_INCREASE: - if (gameState.GuestInitialHunger > 40) + if (gameState.guestInitialHunger > 40) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::GuestInitialHunger, gameState.GuestInitialHunger - 4); + ScenarioSetSetting::GuestInitialHunger, gameState.guestInitialHunger - 4); GameActions::Execute(&scenarioSetSetting); } else @@ -775,10 +735,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_GUEST_INITIAL_HUNGER_DECREASE: - if (gameState.GuestInitialHunger < 250) + if (gameState.guestInitialHunger < 250) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::GuestInitialHunger, gameState.GuestInitialHunger + 4); + ScenarioSetSetting::GuestInitialHunger, gameState.guestInitialHunger + 4); GameActions::Execute(&scenarioSetSetting); } else @@ -788,10 +748,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_GUEST_INITIAL_THIRST_INCREASE: - if (gameState.GuestInitialThirst > 40) + if (gameState.guestInitialThirst > 40) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::GuestInitialThirst, gameState.GuestInitialThirst - 4); + ScenarioSetSetting::GuestInitialThirst, gameState.guestInitialThirst - 4); GameActions::Execute(&scenarioSetSetting); } else @@ -801,10 +761,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_GUEST_INITIAL_THIRST_DECREASE: - if (gameState.GuestInitialThirst < 250) + if (gameState.guestInitialThirst < 250) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::GuestInitialThirst, gameState.GuestInitialThirst + 4); + ScenarioSetSetting::GuestInitialThirst, gameState.guestInitialThirst + 4); GameActions::Execute(&scenarioSetSetting); } else @@ -813,9 +773,59 @@ namespace OpenRCT2::Ui::Windows } Invalidate(); break; + + case WIDX_GUESTS_INTENSITY_PREFERENCE_DROPDOWN: + { + auto& dropdownWidget = widgets[widgetIndex - 1]; + + gDropdownItems[0].Format = STR_DROPDOWN_MENU_LABEL; + gDropdownItems[1].Format = STR_DROPDOWN_MENU_LABEL; + gDropdownItems[2].Format = STR_DROPDOWN_MENU_LABEL; + gDropdownItems[3].Format = STR_DROPDOWN_MENU_LABEL; + + gDropdownItems[0].Args = STR_GUESTS_PREFER_INTENSITY_NONE; + gDropdownItems[1].Args = STR_GUESTS_PREFER_INTENSITY_BALANCED; + gDropdownItems[2].Args = STR_GUESTS_PREFER_INTENSITY_LESS_INTENSE_RIDES; + gDropdownItems[3].Args = STR_GUESTS_PREFER_INTENSITY_MORE_INTENSE_RIDES; + + WindowDropdownShowTextCustomWidth( + { windowPos.x + dropdownWidget.left, windowPos.y + dropdownWidget.top }, dropdownWidget.height() - 1, + colours[1], 0, Dropdown::Flag::StayOpen, 4, dropdownWidget.width() - 3); + + const auto preferLess = gameState.park.Flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES; + const auto preferMore = gameState.park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES; + + auto prefItem = 1; + if (preferLess && preferMore) + prefItem = 0; + else if (preferLess && !preferMore) + prefItem = 2; + else if (!preferLess && preferMore) + prefItem = 3; + + Dropdown::SetChecked(prefItem, true); + break; + } } } + void GuestsDropdown(WidgetIndex widgetIndex, int32_t dropdownIndex) + { + if (dropdownIndex < 0 || dropdownIndex > 3) + return; + + bool preferLess = dropdownIndex == 0 || dropdownIndex == 2; + bool preferMore = dropdownIndex == 0 || dropdownIndex == 3; + + auto scenarioSetLessSetting = ScenarioSetSettingAction( + ScenarioSetSetting::GuestsPreferLessIntenseRides, preferLess); + GameActions::Execute(&scenarioSetLessSetting); + + auto scenarioSetMoreSetting = ScenarioSetSettingAction( + ScenarioSetSetting::GuestsPreferMoreIntenseRides, preferMore); + GameActions::Execute(&scenarioSetMoreSetting); + } + void GuestsUpdate() { frame_no++; @@ -827,8 +837,8 @@ namespace OpenRCT2::Ui::Windows { SetPressedTab(); - auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) { widgets[WIDX_CASH_PER_GUEST].type = WindowWidgetType::Empty; widgets[WIDX_CASH_PER_GUEST_INCREASE].type = WindowWidgetType::Empty; @@ -841,11 +851,8 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_CASH_PER_GUEST_DECREASE].type = WindowWidgetType::Button; } - SetWidgetPressed(WIDX_GUEST_PREFER_LESS_INTENSE_RIDES, gameState.Park.Flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES); - SetWidgetPressed(WIDX_GUEST_PREFER_MORE_INTENSE_RIDES, gameState.Park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES); - - widgets[WIDX_CLOSE].type = (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WindowWidgetType::Empty - : WindowWidgetType::CloseBox; + widgets[WIDX_CLOSE].type = gLegacyScene == LegacyScene::scenarioEditor ? WindowWidgetType::Empty + : WindowWidgetType::CloseBox; AnchorBorderWidgets(); } @@ -856,7 +863,7 @@ namespace OpenRCT2::Ui::Windows WindowDrawWidgets(*this, dpi); DrawTabImages(dpi); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); const auto& cashPerGuestWidget = widgets[WIDX_CASH_PER_GUEST]; if (cashPerGuestWidget.type != WindowWidgetType::Empty) @@ -868,7 +875,7 @@ namespace OpenRCT2::Ui::Windows // Cash per guest value screenCoords = windowPos + ScreenCoordsXY{ cashPerGuestWidget.left + 1, cashPerGuestWidget.top }; auto ft = Formatter(); - ft.Add(gameState.GuestInitialCash); + ft.Add(gameState.guestInitialCash); DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } @@ -880,7 +887,7 @@ namespace OpenRCT2::Ui::Windows // Guest initial happiness value screenCoords = windowPos + ScreenCoordsXY{ initialHappinessWidget.left + 1, initialHappinessWidget.top }; auto ft = Formatter(); - ft.Add((gameState.GuestInitialHappiness * 100) / 255); + ft.Add((gameState.guestInitialHappiness * 100) / 255); DrawTextBasic(dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); // Guest initial hunger label @@ -891,7 +898,7 @@ namespace OpenRCT2::Ui::Windows // Guest initial hunger value screenCoords = windowPos + ScreenCoordsXY{ initialHungerWidget.left + 1, initialHungerWidget.top }; ft = Formatter(); - ft.Add(((255 - gameState.GuestInitialHunger) * 100) / 255); + ft.Add(((255 - gameState.guestInitialHunger) * 100) / 255); DrawTextBasic(dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); // Guest initial thirst label @@ -902,8 +909,29 @@ namespace OpenRCT2::Ui::Windows // Guest initial thirst value screenCoords = windowPos + ScreenCoordsXY{ initialThirstWidget.left + 1, initialThirstWidget.top }; ft = Formatter(); - ft.Add(((255 - gameState.GuestInitialThirst) * 100) / 255); + ft.Add(((255 - gameState.guestInitialThirst) * 100) / 255); DrawTextBasic(dpi, screenCoords, STR_PERCENT_FORMAT_LABEL, ft); + + // Guests' intensity value + { + const auto& guestsIntensity = widgets[WIDX_GUESTS_INTENSITY_PREFERENCE]; + screenCoords = windowPos + ScreenCoordsXY{ guestsIntensity.left + 1, guestsIntensity.top }; + + const auto preferLess = gameState.park.Flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES; + const auto preferMore = gameState.park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES; + + StringId prefString = STR_GUESTS_PREFER_INTENSITY_BALANCED; + if (preferLess && preferMore) + prefString = STR_GUESTS_PREFER_INTENSITY_NONE; + else if (preferLess && !preferMore) + prefString = STR_GUESTS_PREFER_INTENSITY_LESS_INTENSE_RIDES; + else if (!preferLess && preferMore) + prefString = STR_GUESTS_PREFER_INTENSITY_MORE_INTENSE_RIDES; + + ft = Formatter(); + ft.Add(prefString); + DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); + } } #pragma endregion @@ -912,7 +940,7 @@ namespace OpenRCT2::Ui::Windows void ParkMouseUp(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_CLOSE: @@ -926,7 +954,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_FORBID_TREE_REMOVAL: { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::ForbidTreeRemoval, gameState.Park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL ? 0 : 1); + ScenarioSetSetting::ForbidTreeRemoval, gameState.park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL ? 0 : 1); GameActions::Execute(&scenarioSetSetting); Invalidate(); break; @@ -935,7 +963,7 @@ namespace OpenRCT2::Ui::Windows { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::ForbidLandscapeChanges, - gameState.Park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES ? 0 : 1); + gameState.park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES ? 0 : 1); GameActions::Execute(&scenarioSetSetting); Invalidate(); break; @@ -944,7 +972,7 @@ namespace OpenRCT2::Ui::Windows { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::ForbidHighConstruction, - gameState.Park.Flags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION ? 0 : 1); + gameState.park.Flags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION ? 0 : 1); GameActions::Execute(&scenarioSetSetting); Invalidate(); break; @@ -953,7 +981,7 @@ namespace OpenRCT2::Ui::Windows { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::ParkRatingHigherDifficultyLevel, - gameState.Park.Flags & PARK_FLAGS_DIFFICULT_PARK_RATING ? 0 : 1); + gameState.park.Flags & PARK_FLAGS_DIFFICULT_PARK_RATING ? 0 : 1); GameActions::Execute(&scenarioSetSetting); Invalidate(); break; @@ -962,7 +990,7 @@ namespace OpenRCT2::Ui::Windows { auto scenarioSetSetting = ScenarioSetSettingAction( ScenarioSetSetting::GuestGenerationHigherDifficultyLevel, - gameState.Park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION ? 0 : 1); + gameState.park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION ? 0 : 1); GameActions::Execute(&scenarioSetSetting); Invalidate(); break; @@ -972,7 +1000,7 @@ namespace OpenRCT2::Ui::Windows void ParkResize() { - WindowSetResize(*this, 400, 200, 400, 200); + WindowSetResize(*this, { 400, 200 }, { 400, 200 }); } void ParkMouseDown(WidgetIndex widgetIndex) @@ -980,14 +1008,14 @@ namespace OpenRCT2::Ui::Windows Widget* dropdownWidget; Widget* widget = &widgets[widgetIndex]; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_LAND_COST_INCREASE: - if (gameState.LandPrice < 200.00_GBP) + if (gameState.landPrice < 200.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::CostToBuyLand, gameState.LandPrice + 1.00_GBP); + ScenarioSetSetting::CostToBuyLand, gameState.landPrice + 1.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -997,10 +1025,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_LAND_COST_DECREASE: - if (gameState.LandPrice > 5.00_GBP) + if (gameState.landPrice > 5.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::CostToBuyLand, gameState.LandPrice - 1.00_GBP); + ScenarioSetSetting::CostToBuyLand, gameState.landPrice - 1.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -1010,10 +1038,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_CONSTRUCTION_RIGHTS_COST_INCREASE: - if (gameState.ConstructionRightsPrice < 200.00_GBP) + if (gameState.constructionRightsPrice < 200.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::CostToBuyConstructionRights, gameState.ConstructionRightsPrice + 1.00_GBP); + ScenarioSetSetting::CostToBuyConstructionRights, gameState.constructionRightsPrice + 1.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -1023,10 +1051,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_CONSTRUCTION_RIGHTS_COST_DECREASE: - if (gameState.ConstructionRightsPrice > 5.00_GBP) + if (gameState.constructionRightsPrice > 5.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::CostToBuyConstructionRights, gameState.ConstructionRightsPrice - 1.00_GBP); + ScenarioSetSetting::CostToBuyConstructionRights, gameState.constructionRightsPrice - 1.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -1036,10 +1064,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_ENTRY_PRICE_INCREASE: - if (gameState.Park.EntranceFee < kMaxEntranceFee) + if (gameState.park.EntranceFee < kMaxEntranceFee) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::ParkChargeEntryFee, gameState.Park.EntranceFee + 1.00_GBP); + ScenarioSetSetting::ParkChargeEntryFee, gameState.park.EntranceFee + 1.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -1049,10 +1077,10 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; case WIDX_ENTRY_PRICE_DECREASE: - if (gameState.Park.EntranceFee > 0.00_GBP) + if (gameState.park.EntranceFee > 0.00_GBP) { auto scenarioSetSetting = ScenarioSetSettingAction( - ScenarioSetSetting::ParkChargeEntryFee, gameState.Park.EntranceFee - 1.00_GBP); + ScenarioSetSetting::ParkChargeEntryFee, gameState.park.EntranceFee - 1.00_GBP); GameActions::Execute(&scenarioSetSetting); } else @@ -1075,17 +1103,14 @@ namespace OpenRCT2::Ui::Windows { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() - 1, colours[1], 0, Dropdown::Flag::StayOpen, 3, dropdownWidget->width() - 3); - if (gameState.Park.Flags & PARK_FLAGS_UNLOCK_ALL_PRICES) + if (gameState.park.Flags & PARK_FLAGS_UNLOCK_ALL_PRICES) Dropdown::SetChecked(2, true); - else if (gameState.Park.Flags & PARK_FLAGS_PARK_FREE_ENTRY) + else if (gameState.park.Flags & PARK_FLAGS_PARK_FREE_ENTRY) Dropdown::SetChecked(0, true); else Dropdown::SetChecked(1, true); break; - case WIDX_CLIMATE_DROPDOWN: - ShowClimateDropdown(); - break; } } @@ -1105,13 +1130,6 @@ namespace OpenRCT2::Ui::Windows Invalidate(); break; } - case WIDX_CLIMATE_DROPDOWN: - if (static_cast(GetGameState().Climate) != static_cast(dropdownIndex)) - { - auto gameAction = ClimateSetAction(ClimateType{ static_cast(dropdownIndex) }); - GameActions::Execute(&gameAction); - } - break; } } @@ -1126,8 +1144,8 @@ namespace OpenRCT2::Ui::Windows { SetPressedTab(); - auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) { for (int32_t i = WIDX_LAND_COST; i <= WIDX_ENTRY_PRICE_DECREASE; i++) widgets[i].type = WindowWidgetType::Empty; @@ -1157,14 +1175,14 @@ namespace OpenRCT2::Ui::Windows } } - SetWidgetPressed(WIDX_FORBID_TREE_REMOVAL, gameState.Park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL); - SetWidgetPressed(WIDX_FORBID_LANDSCAPE_CHANGES, gameState.Park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES); - SetWidgetPressed(WIDX_FORBID_HIGH_CONSTRUCTION, gameState.Park.Flags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION); - SetWidgetPressed(WIDX_HARD_PARK_RATING, gameState.Park.Flags & PARK_FLAGS_DIFFICULT_PARK_RATING); - SetWidgetPressed(WIDX_HARD_GUEST_GENERATION, gameState.Park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION); + SetWidgetPressed(WIDX_FORBID_TREE_REMOVAL, gameState.park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL); + SetWidgetPressed(WIDX_FORBID_LANDSCAPE_CHANGES, gameState.park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES); + SetWidgetPressed(WIDX_FORBID_HIGH_CONSTRUCTION, gameState.park.Flags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION); + SetWidgetPressed(WIDX_HARD_PARK_RATING, gameState.park.Flags & PARK_FLAGS_DIFFICULT_PARK_RATING); + SetWidgetPressed(WIDX_HARD_GUEST_GENERATION, gameState.park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION); - widgets[WIDX_CLOSE].type = (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) ? WindowWidgetType::Empty - : WindowWidgetType::CloseBox; + widgets[WIDX_CLOSE].type = gLegacyScene == LegacyScene::scenarioEditor ? WindowWidgetType::Empty + : WindowWidgetType::CloseBox; AnchorBorderWidgets(); } @@ -1176,7 +1194,7 @@ namespace OpenRCT2::Ui::Windows WindowDrawWidgets(*this, dpi); DrawTabImages(dpi); - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); const auto& landCostWidget = widgets[WIDX_LAND_COST]; if (landCostWidget.type != WindowWidgetType::Empty) { @@ -1187,7 +1205,7 @@ namespace OpenRCT2::Ui::Windows // Cost to buy land value screenCoords = windowPos + ScreenCoordsXY{ landCostWidget.left + 1, landCostWidget.top }; auto ft = Formatter(); - ft.Add(gameState.LandPrice); + ft.Add(gameState.landPrice); DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } @@ -1202,7 +1220,7 @@ namespace OpenRCT2::Ui::Windows screenCoords = windowPos + ScreenCoordsXY{ constructionRightsCostWidget.left + 1, constructionRightsCostWidget.top }; auto ft = Formatter(); - ft.Add(gameState.ConstructionRightsPrice); + ft.Add(gameState.constructionRightsPrice); DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } @@ -1214,9 +1232,9 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); // Pay for park and/or rides value - if (gameState.Park.Flags & PARK_FLAGS_UNLOCK_ALL_PRICES) + if (gameState.park.Flags & PARK_FLAGS_UNLOCK_ALL_PRICES) ft.Add(STR_PAID_ENTRY_PAID_RIDES); - else if (gameState.Park.Flags & PARK_FLAGS_PARK_FREE_ENTRY) + else if (gameState.park.Flags & PARK_FLAGS_PARK_FREE_ENTRY) ft.Add(STR_FREE_PARK_ENTER); else ft.Add(STR_PAY_PARK_ENTER); @@ -1234,20 +1252,9 @@ namespace OpenRCT2::Ui::Windows // Entry price value screenCoords = windowPos + ScreenCoordsXY{ entryPriceWidget.left + 1, entryPriceWidget.top }; auto ft = Formatter(); - ft.Add(gameState.Park.EntranceFee); + ft.Add(gameState.park.EntranceFee); DrawTextBasic(dpi, screenCoords, STR_CURRENCY_FORMAT_LABEL, ft); } - - // Climate label - const auto& climateWidget = widgets[WIDX_CLIMATE]; - screenCoords = windowPos + ScreenCoordsXY{ 8, climateWidget.top }; - DrawTextBasic(dpi, screenCoords, STR_CLIMATE_LABEL); - - // Climate value - screenCoords = windowPos + ScreenCoordsXY{ climateWidget.left + 1, climateWidget.top }; - auto ft = Formatter(); - ft.Add(kClimateNames[EnumValue(gameState.Climate)]); - DrawTextBasic(dpi, screenCoords, STR_WINDOW_COLOUR_2_STRINGID, ft); } #pragma endregion diff --git a/src/openrct2-ui/windows/Error.cpp b/src/openrct2-ui/windows/Error.cpp index faa6502832..79e7c7d0de 100644 --- a/src/openrct2-ui/windows/Error.cpp +++ b/src/openrct2-ui/windows/Error.cpp @@ -142,7 +142,8 @@ namespace OpenRCT2::Ui::Windows auto errorWindow = std::make_unique(std::move(buffer), numLines, autoClose); return windowMgr->Create( - std::move(errorWindow), WindowClass::Error, windowPosition, width, height, WF_STICK_TO_FRONT | WF_TRANSPARENT); + std::move(errorWindow), WindowClass::Error, windowPosition, width, height, + WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_TITLE_BAR); } WindowBase* ErrorOpen(StringId title, StringId message, const Formatter& args, bool autoClose) diff --git a/src/openrct2-ui/windows/Finances.cpp b/src/openrct2-ui/windows/Finances.cpp index 84cfee4e65..5c85a8ac0b 100644 --- a/src/openrct2-ui/windows/Finances.cpp +++ b/src/openrct2-ui/windows/Finances.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include @@ -82,9 +81,10 @@ namespace OpenRCT2::Ui::Windows #pragma region Measurements - static constexpr int32_t WH_SUMMARY = 309; - static constexpr int32_t WH_RESEARCH = 207; - static constexpr int32_t WH_OTHER_TABS = 257; + static constexpr int32_t kCostPerWeekOffset = 321; + static constexpr int32_t kHeightSummary = 309; + static constexpr int32_t kHeightResearch = 207; + static constexpr int32_t kHeightOtherTabs = 257; static constexpr int32_t WW_RESEARCH = 320; static constexpr int32_t WW_OTHER_TABS = 530; static constexpr int32_t RSH_SUMMARY = 266; @@ -110,29 +110,29 @@ namespace OpenRCT2::Ui::Windows static constexpr Widget _windowFinancesSummaryWidgets[] = { - MAIN_FINANCES_WIDGETS(STR_FINANCIAL_SUMMARY, RSW_OTHER_TABS, RSH_SUMMARY, WW_OTHER_TABS, WH_SUMMARY), + MAIN_FINANCES_WIDGETS(STR_FINANCIAL_SUMMARY, RSW_OTHER_TABS, RSH_SUMMARY, WW_OTHER_TABS, kHeightSummary), MakeWidget ({130, 50}, {391, 211}, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_HORIZONTAL ), MakeSpinnerWidgets({ 64, 279}, { 97, 14}, WindowWidgetType::Spinner, WindowColour::Secondary, STR_FINANCES_SUMMARY_LOAN_VALUE), // NB: 3 widgets. }; static constexpr Widget _windowFinancesCashWidgets[] = { - MAIN_FINANCES_WIDGETS(STR_FINANCIAL_GRAPH, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, WH_OTHER_TABS), + MAIN_FINANCES_WIDGETS(STR_FINANCIAL_GRAPH, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, kHeightOtherTabs), }; static constexpr Widget _windowFinancesParkValueWidgets[] = { - MAIN_FINANCES_WIDGETS(STR_PARK_VALUE_GRAPH, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, WH_OTHER_TABS), + MAIN_FINANCES_WIDGETS(STR_PARK_VALUE_GRAPH, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, kHeightOtherTabs), }; static constexpr Widget _windowFinancesProfitWidgets[] = { - MAIN_FINANCES_WIDGETS(STR_PROFIT_GRAPH, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, WH_OTHER_TABS), + MAIN_FINANCES_WIDGETS(STR_PROFIT_GRAPH, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, kHeightOtherTabs), }; static constexpr Widget _windowFinancesMarketingWidgets[] = { - MAIN_FINANCES_WIDGETS(STR_MARKETING, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, WH_OTHER_TABS), + MAIN_FINANCES_WIDGETS(STR_MARKETING, RSW_OTHER_TABS, RSH_OTHER_TABS, WW_OTHER_TABS, kHeightOtherTabs), MakeWidget({3, 47}, { WW_OTHER_TABS - 6, 45}, WindowWidgetType::Groupbox, WindowColour::Tertiary , STR_MARKETING_CAMPAIGNS_IN_OPERATION ), MakeWidget({3, 47}, { WW_OTHER_TABS - 6, 206}, WindowWidgetType::Groupbox, WindowColour::Tertiary , STR_MARKETING_CAMPAIGNS_AVAILABLE ), MakeWidget({8, 0}, {WW_OTHER_TABS - 16, 14}, WindowWidgetType::ImgBtn, WindowColour::Secondary, 0xFFFFFFFF, STR_START_THIS_MARKETING_CAMPAIGN), @@ -145,7 +145,7 @@ namespace OpenRCT2::Ui::Windows static constexpr Widget _windowFinancesResearchWidgets[] = { - MAIN_FINANCES_WIDGETS(STR_RESEARCH_FUNDING, RSW_RESEARCH, RSH_RESEARCH, WW_RESEARCH, WH_RESEARCH), + MAIN_FINANCES_WIDGETS(STR_RESEARCH_FUNDING, RSW_RESEARCH, RSH_RESEARCH, WW_RESEARCH, kHeightResearch), MakeWidget({ 3, 47}, { WW_RESEARCH - 6, 45}, WindowWidgetType::Groupbox, WindowColour::Tertiary, STR_RESEARCH_FUNDING_ ), MakeWidget({ 8, 59}, { 160, 14}, WindowWidgetType::DropdownMenu, WindowColour::Tertiary, 0xFFFFFFFF, STR_SELECT_LEVEL_OF_RESEARCH_AND_DEVELOPMENT), MakeWidget({156, 60}, { 11, 12}, WindowWidgetType::Button, WindowColour::Tertiary, STR_DROPDOWN_GLYPH, STR_SELECT_LEVEL_OF_RESEARCH_AND_DEVELOPMENT), @@ -230,7 +230,7 @@ namespace OpenRCT2::Ui::Windows void SetDisabledTabs() { - disabled_widgets = (GetGameState().Park.Flags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) ? (1uLL << WIDX_TAB_5) : 0; + disabled_widgets = (getGameState().park.Flags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) ? (1uLL << WIDX_TAB_5) : 0; } public: @@ -333,17 +333,17 @@ namespace OpenRCT2::Ui::Windows case WINDOW_FINANCES_PAGE_VALUE_GRAPH: graphPageWidget = &widgets[WIDX_PAGE_BACKGROUND]; centredGraph = false; - _graphProps.series = GetGameState().Park.ValueHistory; + _graphProps.series = getGameState().park.ValueHistory; break; case WINDOW_FINANCES_PAGE_PROFIT_GRAPH: graphPageWidget = &widgets[WIDX_PAGE_BACKGROUND]; centredGraph = true; - _graphProps.series = GetGameState().WeeklyProfitHistory; + _graphProps.series = getGameState().weeklyProfitHistory; break; case WINDOW_FINANCES_PAGE_FINANCIAL_GRAPH: graphPageWidget = &widgets[WIDX_PAGE_BACKGROUND]; centredGraph = true; - _graphProps.series = GetGameState().CashHistory; + _graphProps.series = getGameState().cashHistory; break; } OnPrepareDrawGraph(graphPageWidget, centredGraph); @@ -361,22 +361,22 @@ namespace OpenRCT2::Ui::Windows break; case WINDOW_FINANCES_PAGE_FINANCIAL_GRAPH: { - auto& gameState = GetGameState(); - const auto cashLessLoan = gameState.Cash - gameState.BankLoan; + auto& gameState = getGameState(); + const auto cashLessLoan = gameState.cash - gameState.bankLoan; const auto fmt = cashLessLoan >= 0 ? STR_FINANCES_FINANCIAL_GRAPH_CASH_LESS_LOAN_POSITIVE : STR_FINANCES_FINANCIAL_GRAPH_CASH_LESS_LOAN_NEGATIVE; OnDrawGraph(dpi, cashLessLoan, fmt); break; } case WINDOW_FINANCES_PAGE_VALUE_GRAPH: - OnDrawGraph(dpi, GetGameState().Park.Value, STR_FINANCES_PARK_VALUE); + OnDrawGraph(dpi, getGameState().park.Value, STR_FINANCES_PARK_VALUE); break; case WINDOW_FINANCES_PAGE_PROFIT_GRAPH: { - auto& gameState = GetGameState(); - const auto fmt = gameState.CurrentProfit >= 0 ? STR_FINANCES_WEEKLY_PROFIT_POSITIVE + auto& gameState = getGameState(); + const auto fmt = gameState.currentProfit >= 0 ? STR_FINANCES_WEEKLY_PROFIT_POSITIVE : STR_FINANCES_WEEKLY_PROFIT_LOSS; - OnDrawGraph(dpi, gameState.CurrentProfit, fmt); + OnDrawGraph(dpi, gameState.currentProfit, fmt); break; } case WINDOW_FINANCES_PAGE_MARKETING: @@ -422,7 +422,7 @@ namespace OpenRCT2::Ui::Windows screenCoords.y += kTableCellHeight; } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Expenditure / Income values for each month auto currentMonthYear = GetDate().GetMonthsElapsed(); for (int32_t i = SummaryMaxAvailableMonth(); i >= 0; i--) @@ -445,7 +445,7 @@ namespace OpenRCT2::Ui::Windows money64 profit = 0; for (int32_t j = 0; j < static_cast(ExpenditureType::Count); j++) { - auto expenditure = gameState.ExpenditureTable[i][j]; + auto expenditure = gameState.expenditureTable[i][j]; if (expenditure != 0) { profit += expenditure; @@ -481,6 +481,10 @@ namespace OpenRCT2::Ui::Windows void SetPage(int32_t p) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == p && !widgets.empty()) + return; + page = p; frame_no = 0; @@ -493,13 +497,13 @@ namespace OpenRCT2::Ui::Windows if (p == WINDOW_FINANCES_PAGE_RESEARCH) { width = WW_RESEARCH; - height = WH_RESEARCH; + height = kHeightResearch; flags &= ~WF_RESIZABLE; } else if (p == WINDOW_FINANCES_PAGE_SUMMARY) { width = WW_OTHER_TABS; - height = WH_SUMMARY; + height = kHeightSummary; flags &= ~WF_RESIZABLE; } else if ( @@ -508,13 +512,13 @@ namespace OpenRCT2::Ui::Windows { flags |= WF_RESIZABLE; WindowSetResize( - *this, WW_OTHER_TABS, WH_OTHER_TABS, std::numeric_limits::max(), - std::numeric_limits::max()); + *this, { WW_OTHER_TABS, kHeightOtherTabs }, + { std::numeric_limits::max(), std::numeric_limits::max() }); } else { width = WW_OTHER_TABS; - height = WH_OTHER_TABS; + height = kHeightOtherTabs; flags &= ~WF_RESIZABLE; } OnResize(); @@ -532,17 +536,17 @@ namespace OpenRCT2::Ui::Windows void OnMouseDownSummary(WidgetIndex widgetIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_LOAN_INCREASE: { // If loan can be increased, do so. // If not, action shows error message. - auto newLoan = gameState.BankLoan + 1000.00_GBP; - if (gameState.BankLoan < gameState.MaxBankLoan) + auto newLoan = gameState.bankLoan + 1000.00_GBP; + if (gameState.bankLoan < gameState.maxBankLoan) { - newLoan = std::min(gameState.MaxBankLoan, newLoan); + newLoan = std::min(gameState.maxBankLoan, newLoan); } auto gameAction = ParkSetLoanAction(newLoan); GameActions::Execute(&gameAction); @@ -553,10 +557,10 @@ namespace OpenRCT2::Ui::Windows // If loan is positive, decrease it. // If loan is negative, action shows error message. // If loan is exactly 0, prevent error message. - if (gameState.BankLoan != 0) + if (gameState.bankLoan != 0) { - auto newLoan = gameState.BankLoan - 1000.00_GBP; - if (gameState.BankLoan > 0) + auto newLoan = gameState.bankLoan - 1000.00_GBP; + if (gameState.bankLoan > 0) { newLoan = std::max(static_cast(0LL), newLoan); } @@ -575,7 +579,7 @@ namespace OpenRCT2::Ui::Windows // drawing has completed. auto ft = Formatter::Common(); ft.Increment(6); - ft.Add(GetGameState().BankLoan); + ft.Add(getGameState().bankLoan); // Keep up with new months being added in the first two years. if (GetDate().GetMonthsElapsed() != _lastPaintedMonth) @@ -584,8 +588,9 @@ namespace OpenRCT2::Ui::Windows void OnDrawSummary(DrawPixelInfo& dpi) { - auto screenCoords = windowPos + ScreenCoordsXY{ 8, 51 }; - auto& gameState = GetGameState(); + auto titleBarBottom = widgets[WIDX_TITLE].bottom; + auto screenCoords = windowPos + ScreenCoordsXY{ 8, titleBarBottom + 37 }; + auto& gameState = getGameState(); // Expenditure / Income heading DrawTextBasic( @@ -609,43 +614,46 @@ namespace OpenRCT2::Ui::Windows // Horizontal rule below expenditure / income table GfxFillRectInset( - dpi, { windowPos + ScreenCoordsXY{ 8, 272 }, windowPos + ScreenCoordsXY{ 8 + 513, 272 + 1 } }, colours[1], - INSET_RECT_FLAG_BORDER_INSET); + dpi, + { windowPos + ScreenCoordsXY{ 8, titleBarBottom + 258 }, + windowPos + ScreenCoordsXY{ 8 + 513, titleBarBottom + 258 + 1 } }, + colours[1], INSET_RECT_FLAG_BORDER_INSET); // Loan and interest rate - DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 8, 279 }, STR_FINANCES_SUMMARY_LOAN); - if (!(gameState.Park.Flags & PARK_FLAGS_RCT1_INTEREST)) + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 8, titleBarBottom + 265 }, STR_FINANCES_SUMMARY_LOAN); + if (!(gameState.park.Flags & PARK_FLAGS_RCT1_INTEREST)) { auto ft = Formatter(); - ft.Add(gameState.BankLoanInterestRate); - DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 167, 279 }, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, ft); + ft.Add(gameState.bankLoanInterestRate); + DrawTextBasic( + dpi, windowPos + ScreenCoordsXY{ 167, titleBarBottom + 265 }, STR_FINANCES_SUMMARY_AT_X_PER_YEAR, ft); } // Current cash auto ft = Formatter(); - ft.Add(gameState.Cash); - StringId stringId = gameState.Cash >= 0 ? STR_CASH_LABEL : STR_CASH_NEGATIVE_LABEL; - DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 8, 294 }, stringId, ft); + ft.Add(gameState.cash); + StringId stringId = gameState.cash >= 0 ? STR_CASH_LABEL : STR_CASH_NEGATIVE_LABEL; + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 8, titleBarBottom + 280 }, stringId, ft); // Objective related financial information - if (gameState.ScenarioObjective.Type == OBJECTIVE_MONTHLY_FOOD_INCOME) + if (gameState.scenarioObjective.Type == OBJECTIVE_MONTHLY_FOOD_INCOME) { auto lastMonthProfit = FinanceGetLastMonthShopProfit(); ft = Formatter(); ft.Add(lastMonthProfit); DrawTextBasic( - dpi, windowPos + ScreenCoordsXY{ 280, 279 }, STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, - ft); + dpi, windowPos + ScreenCoordsXY{ 280, titleBarBottom + 265 }, + STR_LAST_MONTH_PROFIT_FROM_FOOD_DRINK_MERCHANDISE_SALES_LABEL, ft); } else { // Park value and company value ft = Formatter(); - ft.Add(gameState.Park.Value); - DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 280, 279 }, STR_PARK_VALUE_LABEL, ft); + ft.Add(gameState.park.Value); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 280, titleBarBottom + 265 }, STR_PARK_VALUE_LABEL, ft); ft = Formatter(); - ft.Add(gameState.CompanyValue); - DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 280, 294 }, STR_COMPANY_VALUE_LABEL, ft); + ft.Add(gameState.companyValue); + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 280, titleBarBottom + 280 }, STR_COMPANY_VALUE_LABEL, ft); } } @@ -669,7 +677,7 @@ namespace OpenRCT2::Ui::Windows void OnPrepareDrawMarketing() { // Count number of active campaigns - int32_t numActiveCampaigns = static_cast(GetGameState().MarketingCampaigns.size()); + int32_t numActiveCampaigns = static_cast(getGameState().marketingCampaigns.size()); int32_t y = std::max(1, numActiveCampaigns) * kListRowHeight + 92; // Update group box positions @@ -698,7 +706,7 @@ namespace OpenRCT2::Ui::Windows void OnDrawMarketing(DrawPixelInfo& dpi) { - auto screenCoords = windowPos + ScreenCoordsXY{ 8, 62 }; + auto screenCoords = windowPos + ScreenCoordsXY{ 8, widgets[WIDX_TAB_1].top + 45 }; int32_t noCampaignsActive = 1; for (int32_t i = 0; i < ADVERTISING_CAMPAIGN_COUNT; i++) { @@ -718,7 +726,7 @@ namespace OpenRCT2::Ui::Windows auto campaignRide = GetRide(marketingCampaign->RideId); if (campaignRide != nullptr) { - campaignRide->FormatNameTo(ft); + campaignRide->formatNameTo(ft); } else { @@ -731,7 +739,7 @@ namespace OpenRCT2::Ui::Windows break; default: { - auto parkName = GetGameState().Park.Name.c_str(); + auto parkName = getGameState().park.Name.c_str(); ft.Add(STR_STRING); ft.Add(parkName); } @@ -753,9 +761,7 @@ namespace OpenRCT2::Ui::Windows if (noCampaignsActive) { DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, STR_MARKETING_CAMPAIGNS_NONE); - screenCoords.y += kListRowHeight; } - screenCoords.y += 34; // Draw campaign button text for (int32_t i = 0; i < ADVERTISING_CAMPAIGN_COUNT; i++) @@ -764,12 +770,11 @@ namespace OpenRCT2::Ui::Windows if (campaignButton->type != WindowWidgetType::Empty) { // Draw button text + screenCoords = windowPos + ScreenCoordsXY{ campaignButton->left, campaignButton->textTop() }; DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ 4, 0 }, kMarketingCampaignNames[i][0]); auto ft = Formatter(); ft.Add(AdvertisingCampaignPricePerWeek[i]); - DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ WH_SUMMARY, 0 }, STR_MARKETING_PER_WEEK, ft); - - screenCoords.y += kButtonFaceHeight + 2; + DrawTextBasic(dpi, screenCoords + ScreenCoordsXY{ kCostPerWeekOffset, 0 }, STR_MARKETING_PER_WEEK, ft); } } } @@ -880,7 +885,7 @@ namespace OpenRCT2::Ui::Windows static FinancesWindow* FinancesWindowOpen(uint8_t page) { auto* windowMgr = Ui::GetWindowManager(); - auto* window = windowMgr->FocusOrCreate(WindowClass::Finances, WW_OTHER_TABS, WH_SUMMARY, WF_10); + auto* window = windowMgr->FocusOrCreate(WindowClass::Finances, WW_OTHER_TABS, kHeightSummary, WF_10); if (window != nullptr && page != WINDOW_FINANCES_PAGE_SUMMARY) window->SetPage(page); @@ -891,7 +896,7 @@ namespace OpenRCT2::Ui::Windows WindowBase* FinancesOpen() { auto* windowMgr = Ui::GetWindowManager(); - return windowMgr->FocusOrCreate(WindowClass::Finances, WW_OTHER_TABS, WH_SUMMARY, WF_10); + return windowMgr->FocusOrCreate(WindowClass::Finances, WW_OTHER_TABS, kHeightSummary, WF_10); } WindowBase* FinancesResearchOpen() diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index 4e8fbcc780..ee18a0d9d2 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -221,8 +221,8 @@ namespace OpenRCT2::Ui::Windows ToolCancel(); _footpathConstructionMode = PATH_CONSTRUCTION_MODE_LAND; - ToolSet(*this, WIDX_CONSTRUCT_ON_LAND, Tool::PathDown); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*this, WIDX_CONSTRUCT_ON_LAND, Tool::pathDown); + gInputFlags.set(InputFlag::unk6); _footpathErrorOccured = false; WindowFootpathSetEnabledAndPressedWidgets(); @@ -332,8 +332,8 @@ namespace OpenRCT2::Ui::Windows MapInvalidateMapSelectionTiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; _footpathConstructionMode = PATH_CONSTRUCTION_MODE_LAND; - ToolSet(*this, WIDX_CONSTRUCT_ON_LAND, Tool::PathDown); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*this, WIDX_CONSTRUCT_ON_LAND, Tool::pathDown); + gInputFlags.set(InputFlag::unk6); _footpathErrorOccured = false; WindowFootpathSetEnabledAndPressedWidgets(); break; @@ -349,8 +349,8 @@ namespace OpenRCT2::Ui::Windows MapInvalidateMapSelectionTiles(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; _footpathConstructionMode = PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL_TOOL; - ToolSet(*this, WIDX_CONSTRUCT_BRIDGE_OR_TUNNEL, Tool::Crosshair); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*this, WIDX_CONSTRUCT_BRIDGE_OR_TUNNEL, Tool::crosshair); + gInputFlags.set(InputFlag::unk6); _footpathErrorOccured = false; WindowFootpathSetEnabledAndPressedWidgets(); break; @@ -499,8 +499,7 @@ namespace OpenRCT2::Ui::Windows else { auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); - auto* pathObj = static_cast( - objManager.GetLoadedObject(ObjectType::paths, gFootpathSelection.LegacyPath)); + const auto* pathObj = objManager.GetLoadedObject(gFootpathSelection.LegacyPath); if (pathObj != nullptr) { auto pathEntry = reinterpret_cast(pathObj->GetLegacyData()); @@ -532,7 +531,7 @@ namespace OpenRCT2::Ui::Windows + ScreenCoordsXY{ widgets[WIDX_CONSTRUCT].midX(), widgets[WIDX_CONSTRUCT].bottom - 12 }; if (_windowFootpathCost != kMoney64Undefined) { - if (!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(_windowFootpathCost); @@ -640,11 +639,10 @@ namespace OpenRCT2::Ui::Windows // Set footpath and queue type button images auto pathImage = kSpriteIdNull; auto queueImage = kSpriteIdNull; - auto pathObj = static_cast( - objManager.GetLoadedObject(ObjectType::paths, gFootpathSelection.LegacyPath)); + const auto* pathObj = objManager.GetLoadedObject(gFootpathSelection.LegacyPath); if (pathObj != nullptr) { - auto pathEntry = reinterpret_cast(pathObj->GetLegacyData()); + auto pathEntry = reinterpret_cast(pathObj->GetLegacyData()); pathImage = pathEntry->GetPreviewImage(); queueImage = pathEntry->GetQueuePreviewImage(); } @@ -670,14 +668,13 @@ namespace OpenRCT2::Ui::Windows uint32_t numPathTypes = 0; // If the game is in sandbox mode, also show paths that are normally restricted to the scenario editor - bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode); + bool showEditorPaths = (gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode); _dropdownEntries.clear(); std::optional defaultIndex; for (ObjectEntryIndex i = 0; i < kMaxFootpathSurfaceObjects; i++) { - const auto* pathType = static_cast( - objManager.GetLoadedObject(ObjectType::footpathSurface, i)); + const auto* pathType = objManager.GetLoadedObject(i); if (pathType == nullptr) { continue; @@ -688,14 +685,14 @@ namespace OpenRCT2::Ui::Windows } // If regular paths can be used as queue, only hide the path if we’re _not_ looking at a queue, // but the path surface is one. - if (GetGameState().Cheats.allowRegularPathAsQueue && !showQueues + if (getGameState().cheats.allowRegularPathAsQueue && !showQueues && ((pathType->Flags & FOOTPATH_ENTRY_FLAG_IS_QUEUE) != 0)) { continue; } // If the cheat is disabled, hide queues from the regular path view and vice versa. else if ( - !GetGameState().Cheats.allowRegularPathAsQueue + !getGameState().cheats.allowRegularPathAsQueue && showQueues != ((pathType->Flags & FOOTPATH_ENTRY_FLAG_IS_QUEUE) != 0)) { continue; @@ -708,6 +705,7 @@ namespace OpenRCT2::Ui::Windows } gDropdownItems[numPathTypes].Format = kStringIdNone; + gDropdownTooltips[numPathTypes] = pathType->NameStringId; Dropdown::SetImage(numPathTypes, ImageId(pathType->PreviewImageId)); _dropdownEntries.push_back({ ObjectType::footpathSurface, i }); numPathTypes++; @@ -733,6 +731,7 @@ namespace OpenRCT2::Ui::Windows } gDropdownItems[numPathTypes].Format = kStringIdNone; + gDropdownTooltips[numPathTypes] = pathEntry->string_idx; Dropdown::SetImage( numPathTypes, ImageId(showQueues ? pathEntry->GetQueuePreviewImage() : pathEntry->GetPreviewImage())); _dropdownEntries.push_back({ ObjectType::paths, i }); @@ -743,6 +742,9 @@ namespace OpenRCT2::Ui::Windows WindowDropdownShowImage( windowPos.x + widget->left, windowPos.y + widget->top, widget->height() + 1, colours[1], 0, numPathTypes, 47, 36, itemsPerRow); + + gDropdownHasTooltips = true; + if (defaultIndex) gDropdownDefaultIndex = static_cast(*defaultIndex); } @@ -767,6 +769,7 @@ namespace OpenRCT2::Ui::Windows } gDropdownItems[numRailingsTypes].Format = kStringIdNone; + gDropdownTooltips[numRailingsTypes] = railingsEntry->NameStringId; Dropdown::SetImage(numRailingsTypes, ImageId(railingsEntry->PreviewImageId)); _dropdownEntries.push_back({ ObjectType::footpathRailings, i }); numRailingsTypes++; @@ -776,6 +779,9 @@ namespace OpenRCT2::Ui::Windows WindowDropdownShowImage( windowPos.x + widget->left, windowPos.y + widget->top, widget->height() + 1, colours[1], 0, numRailingsTypes, 47, 36, itemsPerRow); + + gDropdownHasTooltips = true; + if (defaultIndex) gDropdownDefaultIndex = static_cast(*defaultIndex); } @@ -821,7 +827,7 @@ namespace OpenRCT2::Ui::Windows auto info = GetMapCoordinatesFromPos(screenCoords, interactionFlags); if (info.interactionType != ViewportInteractionItem::None) { - const bool allowInvalidHeights = GetGameState().Cheats.allowTrackPlaceInvalidHeights; + const bool allowInvalidHeights = getGameState().cheats.allowTrackPlaceInvalidHeights; const auto heightStep = kCoordsZStep * (!allowInvalidHeights ? 2 : 1); _footpathPlaceCtrlZ = floor2(info.Element->GetBaseZ(), heightStep); @@ -854,7 +860,7 @@ namespace OpenRCT2::Ui::Windows _footpathPlaceShiftZ = mainWnd->viewport->zoom.ApplyTo(_footpathPlaceShiftZ); } - const bool allowInvalidHeights = GetGameState().Cheats.allowTrackPlaceInvalidHeights; + const bool allowInvalidHeights = getGameState().cheats.allowTrackPlaceInvalidHeights; const auto heightStep = kCoordsZStep * (!allowInvalidHeights ? 2 : 1); _footpathPlaceShiftZ = floor2(_footpathPlaceShiftZ, heightStep); @@ -1139,7 +1145,7 @@ namespace OpenRCT2::Ui::Windows PathConstructFlags constructFlags = FootpathCreateConstructFlags(selectedType); auto footpathPlaceAction = FootpathPlaceAction( - { *mapPos, baseZ }, slope, selectedType, gFootpathSelection.Railings, INVALID_DIRECTION, constructFlags); + { *mapPos, baseZ }, slope, selectedType, gFootpathSelection.Railings, kInvalidDirection, constructFlags); footpathPlaceAction.SetCallback([this](const GameAction* ga, const GameActions::Result* result) { if (result->Error == GameActions::Status::Ok) { @@ -1210,7 +1216,7 @@ namespace OpenRCT2::Ui::Windows _provisionalFootpath.flags.clearAll(); gFootpathConstructSlope = 0; _footpathConstructionMode = PATH_CONSTRUCTION_MODE_BRIDGE_OR_TUNNEL; - _footpathConstructValidDirections = INVALID_DIRECTION; + _footpathConstructValidDirections = kInvalidDirection; WindowFootpathSetEnabledAndPressedWidgets(); } @@ -1250,7 +1256,7 @@ namespace OpenRCT2::Ui::Windows { if (gFootpathConstructSlope == 0) { - self->_footpathConstructValidDirections = INVALID_DIRECTION; + self->_footpathConstructValidDirections = kInvalidDirection; } else { @@ -1322,7 +1328,7 @@ namespace OpenRCT2::Ui::Windows gFootpathConstructFromPosition.y -= CoordsDirectionDelta[edge].y; gFootpathConstructFromPosition.z = z; _footpathConstructDirection = edge; - _footpathConstructValidDirections = INVALID_DIRECTION; + _footpathConstructValidDirections = kInvalidDirection; } /** @@ -1446,7 +1452,7 @@ namespace OpenRCT2::Ui::Windows // Enable / disable directional widgets direction = _footpathConstructValidDirections; - if (direction != INVALID_DIRECTION) + if (direction != kInvalidDirection) { disabledWidgets |= (1uLL << WIDX_DIRECTION_NW) | (1uLL << WIDX_DIRECTION_NE) | (1uLL << WIDX_DIRECTION_SW) | (1uLL << WIDX_DIRECTION_SE); @@ -1592,7 +1598,7 @@ namespace OpenRCT2::Ui::Windows void KeyboardShortcutDemolishCurrent() { if (IsWidgetDisabled(WIDX_REMOVE) || widgets[WIDX_REMOVE].type == WindowWidgetType::Empty - || (!GetGameState().Cheats.buildInPauseMode && GameIsPaused())) + || (!getGameState().cheats.buildInPauseMode && GameIsPaused())) { return; } @@ -1754,7 +1760,7 @@ namespace OpenRCT2::Ui::Windows FootpathRemoveProvisional(); auto footpathPlaceAction = FootpathPlaceAction( - footpathLoc, slope, type, railingsType, INVALID_DIRECTION, constructFlags); + footpathLoc, slope, type, railingsType, kInvalidDirection, constructFlags); footpathPlaceAction.SetFlags(GAME_COMMAND_FLAG_GHOST | GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED); auto res = GameActions::Execute(&footpathPlaceAction); cost = res.Error == GameActions::Status::Ok ? res.Cost : kMoney64Undefined; diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index beb580277c..69aaab1a57 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -97,19 +97,19 @@ namespace OpenRCT2::Ui::Windows // Figure out how much line height we have to work with. uint32_t line_height = FontGetLineHeight(FontStyle::Medium); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Draw money - if (!(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) { const auto& widget = widgets[WIDX_MONEY]; auto screenCoords = ScreenCoordsXY{ windowPos.x + widget.midX(), windowPos.y + widget.midY() - (line_height == 10 ? 5 : 6) }; auto colour = GetHoverWidgetColour(WIDX_MONEY); - StringId stringId = gameState.Cash < 0 ? STR_BOTTOM_TOOLBAR_CASH_NEGATIVE : STR_BOTTOM_TOOLBAR_CASH; + StringId stringId = gameState.cash < 0 ? STR_BOTTOM_TOOLBAR_CASH_NEGATIVE : STR_BOTTOM_TOOLBAR_CASH; auto ft = Formatter(); - ft.Add(gameState.Cash); + ft.Add(gameState.cash); DrawTextBasic(dpi, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE }); } @@ -130,11 +130,11 @@ namespace OpenRCT2::Ui::Windows const auto& widget = widgets[WIDX_GUESTS]; auto screenCoords = ScreenCoordsXY{ windowPos.x + widget.midX(), windowPos.y + widget.midY() - 6 }; - StringId stringId = gameState.NumGuestsInPark == 1 ? _guestCountFormatsSingular[gameState.GuestChangeModifier] - : _guestCountFormats[gameState.GuestChangeModifier]; + StringId stringId = gameState.numGuestsInPark == 1 ? _guestCountFormatsSingular[gameState.guestChangeModifier] + : _guestCountFormats[gameState.guestChangeModifier]; auto colour = GetHoverWidgetColour(WIDX_GUESTS); auto ft = Formatter(); - ft.Add(gameState.NumGuestsInPark); + ft.Add(gameState.numGuestsInPark); DrawTextBasic(dpi, screenCoords, stringId, ft, { colour, TextAlignment::CENTRE }); } @@ -143,7 +143,7 @@ namespace OpenRCT2::Ui::Windows const auto& widget = widgets[WIDX_PARK_RATING]; auto screenCoords = windowPos + ScreenCoordsXY{ widget.left + 11, widget.midY() - 5 }; - DrawParkRating(dpi, colours[3].colour, screenCoords, std::max(10, ((gameState.Park.Rating / 4) * 263) / 256)); + DrawParkRating(dpi, colours[3].colour, screenCoords, std::max(10, ((gameState.park.Rating / 4) * 263) / 256)); } } @@ -199,7 +199,7 @@ namespace OpenRCT2::Ui::Windows // Temperature screenCoords = { windowPos.x + rightPanelWidget.left + 15, static_cast(screenCoords.y + line_height + 1) }; - int32_t temperature = GetGameState().WeatherCurrent.temperature; + int32_t temperature = getGameState().weatherCurrent.temperature; StringId format = STR_CELSIUS_VALUE; if (Config::Get().general.TemperatureFormat == TemperatureUnit::Fahrenheit) { @@ -212,14 +212,14 @@ namespace OpenRCT2::Ui::Windows screenCoords.x += 30; // Current weather - auto currentWeatherSpriteId = ClimateGetWeatherSpriteId(GetGameState().WeatherCurrent); + auto currentWeatherSpriteId = ClimateGetWeatherSpriteId(getGameState().weatherCurrent.weatherType); GfxDrawSprite(dpi, ImageId(currentWeatherSpriteId), screenCoords); // Next weather - auto nextWeatherSpriteId = ClimateGetWeatherSpriteId(GetGameState().WeatherNext); + auto nextWeatherSpriteId = ClimateGetWeatherSpriteId(getGameState().weatherNext.weatherType); if (currentWeatherSpriteId != nextWeatherSpriteId) { - if (GetGameState().WeatherUpdateTimer < 960) + if (getGameState().weatherUpdateTimer < 960) { GfxDrawSprite(dpi, ImageId(SPR_NEXT_WEATHER), screenCoords + ScreenCoordsXY{ 27, 5 }); GfxDrawSprite(dpi, ImageId(nextWeatherSpriteId), screenCoords + ScreenCoordsXY{ 40, 0 }); @@ -432,7 +432,7 @@ namespace OpenRCT2::Ui::Windows { case WIDX_LEFT_OUTSET: case WIDX_MONEY: - if (!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) ContextOpenWindow(WindowClass::Finances); break; case WIDX_GUESTS: @@ -481,17 +481,17 @@ namespace OpenRCT2::Ui::Windows OpenRCT2String OnTooltip(WidgetIndex widgetIndex, StringId fallback) override { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); auto ft = Formatter(); switch (widgetIndex) { case WIDX_MONEY: - ft.Add(gameState.CurrentProfit); - ft.Add(gameState.Park.Value); + ft.Add(gameState.currentProfit); + ft.Add(gameState.park.Value); break; case WIDX_PARK_RATING: - ft.Add(gameState.Park.Rating); + ft.Add(gameState.park.Rating); break; } return { fallback, ft }; @@ -514,7 +514,7 @@ namespace OpenRCT2::Ui::Windows + 1; // Reposition left widgets in accordance with line height... depending on whether there is money in play. - if (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) + if (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) { widgets[WIDX_MONEY].type = WindowWidgetType::Empty; widgets[WIDX_GUESTS].top = 1; @@ -693,14 +693,14 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); auto* window = windowMgr->Create( WindowClass::BottomToolbar, ScreenCoordsXY(0, screenHeight - toolbar_height), screenWidth, toolbar_height, - WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND); + WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR); return window; } void WindowGameBottomToolbarInvalidateNewsItem() { - if (gScreenFlags == SCREEN_FLAGS_PLAYING) + if (gLegacyScene == LegacyScene::playing) { auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateWidgetByClass(WindowClass::BottomToolbar, WIDX_MIDDLE_OUTSET); diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index e15894d990..7606d2be8f 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -86,14 +85,26 @@ namespace OpenRCT2::Ui::Windows WIDX_LOCATE, WIDX_TRACK, - WIDX_HAPPINESS_BAR = WIDX_TAB_CONTENT_START, + WIDX_HAPPINESS_LABEL = WIDX_TAB_CONTENT_START, + WIDX_HAPPINESS_BAR, + WIDX_ENERGY_LABEL, WIDX_ENERGY_BAR, + WIDX_HUNGER_LABEL, WIDX_HUNGER_BAR, + WIDX_THIRST_LABEL, WIDX_THIRST_BAR, + WIDX_NAUSEA_LABEL, WIDX_NAUSEA_BAR, + WIDX_TOILET_LABEL, WIDX_TOILET_BAR, + WIDX_SEPARATOR, - WIDX_RIDE_SCROLL = WIDX_TAB_CONTENT_START, + WIDX_RIDES_BEEN_ON_LABEL = WIDX_TAB_CONTENT_START, + WIDX_RIDE_SCROLL, + + WIDX_RECENT_THOUGHTS_LABEL = WIDX_TAB_CONTENT_START, + + WIDX_CARRYING_LABEL = WIDX_TAB_CONTENT_START, }; validate_global_widx(WC_PEEP, WIDX_PICKUP); @@ -122,21 +133,28 @@ namespace OpenRCT2::Ui::Windows MakeWidget({167, 93}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_LOCATE), STR_LOCATE_SUBJECT_TIP ), // Locate Button MakeWidget({167, 117}, { 24, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_TRACK_PEEP), STR_TOGGLE_GUEST_TRACKING_TIP), // Track Button }; - // clang-format on static constexpr Widget _guestWindowWidgetsStats[] = { MAIN_GUEST_WIDGETS, - MakeProgressBar({ 65, (kListRowHeight * 0) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_GREEN, 0, 19), // Happiness - MakeProgressBar({ 65, (kListRowHeight * 1) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_GREEN, 0, 19), // Energy - MakeProgressBar({ 65, (kListRowHeight * 2) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_RED, 67, 100), // Hunger - MakeProgressBar({ 65, (kListRowHeight * 3) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_RED, 67, 100), // Thirst - MakeProgressBar({ 65, (kListRowHeight * 4) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_RED, 47, 100), // Nausea - MakeProgressBar({ 65, (kListRowHeight * 5) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_RED, 62, 100), // Toilet + MakeWidget ({ 3, (kListRowHeight * 0) + 4 + 43 }, { 62, 10 }, WindowWidgetType::Label, WindowColour::Secondary, STR_GUEST_STAT_HAPPINESS_LABEL), + MakeProgressBar({ 65, (kListRowHeight * 0) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_GREEN, 0, 19), + MakeWidget ({ 3, (kListRowHeight * 1) + 4 + 43 }, { 62, 10 }, WindowWidgetType::Label, WindowColour::Secondary, STR_GUEST_STAT_ENERGY_LABEL), + MakeProgressBar({ 65, (kListRowHeight * 1) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_GREEN, 0, 19), + MakeWidget ({ 3, (kListRowHeight * 2) + 4 + 43 }, { 62, 10 }, WindowWidgetType::Label, WindowColour::Secondary, STR_GUEST_STAT_HUNGER_LABEL), + MakeProgressBar({ 65, (kListRowHeight * 2) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_RED, 67, 100), + MakeWidget ({ 3, (kListRowHeight * 3) + 4 + 43 }, { 62, 10 }, WindowWidgetType::Label, WindowColour::Secondary, STR_GUEST_STAT_THIRST_LABEL), + MakeProgressBar({ 65, (kListRowHeight * 3) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_RED, 67, 100), + MakeWidget ({ 3, (kListRowHeight * 4) + 4 + 43 }, { 62, 10 }, WindowWidgetType::Label, WindowColour::Secondary, STR_GUEST_STAT_NAUSEA_LABEL), + MakeProgressBar({ 65, (kListRowHeight * 4) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_RED, 47, 100), + MakeWidget ({ 3, (kListRowHeight * 5) + 4 + 43 }, { 62, 10 }, WindowWidgetType::Label, WindowColour::Secondary, STR_GUEST_STAT_TOILET_LABEL), + MakeProgressBar({ 65, (kListRowHeight * 5) + 4 + 43 }, { 119, 10 }, COLOUR_BRIGHT_RED, 62, 100), + MakeWidget ({ 3, (kListRowHeight * 7) + 9 + 43 }, { 180, 2 }, WindowWidgetType::HorizontalSeparator, WindowColour::Secondary), }; static constexpr Widget _guestWindowWidgetsRides[] = { MAIN_GUEST_WIDGETS, - MakeWidget({ 3, 57 }, { 186, 87 }, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL), + MakeWidget({ 3, 45 }, { 186, 10 }, WindowWidgetType::Label, WindowColour::Secondary, STR_GUEST_LABEL_RIDES_BEEN_ON), + MakeWidget({ 3, 57 }, { 186, 87 }, WindowWidgetType::Scroll, WindowColour::Secondary, SCROLL_VERTICAL), }; static constexpr Widget _guestWindowWidgetsFinance[] = { @@ -145,17 +163,18 @@ namespace OpenRCT2::Ui::Windows static constexpr Widget _guestWindowWidgetsThoughts[] = { MAIN_GUEST_WIDGETS, + MakeWidget({ 3, 45 }, { 186, 10 }, WindowWidgetType::Label, WindowColour::Secondary, STR_GUEST_RECENT_THOUGHTS_LABEL), }; static constexpr Widget _guestWindowWidgetsInventory[] = { MAIN_GUEST_WIDGETS, + MakeWidget({ 3, 45 }, { 186, 10 }, WindowWidgetType::Label, WindowColour::Secondary, STR_CARRYING), }; static constexpr Widget _guestWindowWidgetsDebug[] = { MAIN_GUEST_WIDGETS, }; - // clang-format off static constexpr std::span _guestWindowPageWidgets[] = { _guestWindowWidgetsOverview, _guestWindowWidgetsStats, @@ -196,10 +215,9 @@ namespace OpenRCT2::Ui::Windows frame_no = 0; _marqueePosition = 0; picked_peep_frame = 0; - min_width = width; - min_height = 157; - max_width = 500; - max_height = 450; + + WindowSetResize(*this, { WW, WH }, { 500, 450 }); + selected_list_item = -1; } @@ -435,7 +453,7 @@ namespace OpenRCT2::Ui::Windows } maxWidth = std::max(minWidth, maxWidth); - WindowSetResize(*this, minWidth, minHeight, maxWidth, maxHeight); + WindowSetResize(*this, { minWidth, minHeight }, { maxWidth, maxHeight }); } void OnPrepareDrawCommon() @@ -475,7 +493,7 @@ namespace OpenRCT2::Ui::Windows if (!WidgetIsDisabled(*this, WIDX_PICKUP)) Invalidate(); } - if (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) + if (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) { newDisabledWidgets |= (1uLL << WIDX_TAB_4); // Disable finance tab if no money } @@ -491,13 +509,17 @@ namespace OpenRCT2::Ui::Windows if (isToolActive(classification, number)) ToolCancel(); - int32_t listen = 0; + bool listen = false; if (newPage == WINDOW_GUEST_OVERVIEW && page == WINDOW_GUEST_OVERVIEW && viewport != nullptr) { - if (!(viewport->flags & VIEWPORT_FLAG_SOUND_ON)) - listen = 1; + viewport->flags ^= VIEWPORT_FLAG_SOUND_ON; + listen = (viewport->flags & VIEWPORT_FLAG_SOUND_ON) != 0; } + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == newPage && !widgets.empty()) + return; + page = newPage; frame_no = 0; _riddenRides.clear(); @@ -601,8 +623,10 @@ namespace OpenRCT2::Ui::Windows if (viewport != nullptr) { - auto reqViewportWidth = width - 30; - auto reqViewportHeight = height - 72; + auto widget = widgets[WIDX_VIEWPORT]; + auto reqViewportWidth = widget.width() - 1; + auto reqViewportHeight = widget.height() - 1; + viewport->pos = windowPos + ScreenCoordsXY{ widget.left + 1, widget.top + 1 }; if (viewport->width != reqViewportWidth || viewport->height != reqViewportHeight) { viewport->width = reqViewportWidth; @@ -640,7 +664,7 @@ namespace OpenRCT2::Ui::Windows WindowBase* wind = windowMgr->FindByNumber(WindowClass::Peep, peepnum); if (wind != nullptr) { - ToolSet(*wind, WC_PEEP__WIDX_PICKUP, Tool::Picker); + ToolSet(*wind, WC_PEEP__WIDX_PICKUP, Tool::picker); } }); GameActions::Execute(&pickupAction); @@ -1103,49 +1127,21 @@ namespace OpenRCT2::Ui::Windows InventoryTabDraw(dpi); DebugTabDraw(dpi); - // Not sure why this is not stats widgets - // cx dx auto screenCoords = windowPos - + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 4 }; - - // Happiness - DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_HAPPINESS_LABEL); - - // Energy - screenCoords.y += kListRowHeight; - DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_ENERGY_LABEL); - - // Hunger - screenCoords.y += kListRowHeight; - DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_HUNGER_LABEL); - - // Thirst - screenCoords.y += kListRowHeight; - DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_THIRST_LABEL); - - // Nausea - screenCoords.y += kListRowHeight; - DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_NAUSEA_LABEL); - - // Toilet - screenCoords.y += kListRowHeight; - DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_TOILET_LABEL); + + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, + widgets[WIDX_PAGE_BACKGROUND].top + (kListRowHeight * 6) + 5 }; // Time in park - screenCoords.y += kListRowHeight + 1; int32_t guestEntryTime = peep->GetParkEntryTime(); if (guestEntryTime != -1) { - int32_t timeInPark = (GetGameState().CurrentTicks - guestEntryTime) >> 11; + int32_t timeInPark = (getGameState().currentTicks - guestEntryTime) >> 11; auto ft = Formatter(); ft.Add(timeInPark & 0xFFFF); DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_TIME_IN_PARK, ft); } screenCoords.y += kListRowHeight + 9; - GfxFillRectInset( - dpi, { screenCoords - ScreenCoordsXY{ 0, 6 }, screenCoords + ScreenCoordsXY{ 179, -5 } }, colours[1], - INSET_RECT_FLAG_BORDER_INSET); // Preferred Ride DrawTextBasic(dpi, screenCoords, STR_GUEST_STAT_PREFERRED_RIDE); @@ -1223,7 +1219,7 @@ namespace OpenRCT2::Ui::Windows } // Every 2048 ticks do a full window_invalidate - int32_t numTicks = GetGameState().CurrentTicks - guest->GetParkEntryTime(); + int32_t numTicks = getGameState().currentTicks - guest->GetParkEntryTime(); if (!(numTicks & 0x7FF)) Invalidate(); @@ -1231,7 +1227,7 @@ namespace OpenRCT2::Ui::Windows _riddenRides.clear(); for (const auto& r : GetRideManager()) { - if (r.IsRide() && guest->HasRidden(r)) + if (r.isRide() && guest->HasRidden(r)) { _riddenRides.push_back(r.id); } @@ -1319,15 +1315,13 @@ namespace OpenRCT2::Ui::Windows auto screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 2, widgets[WIDX_PAGE_BACKGROUND].top + 2 }; - DrawTextBasic(dpi, screenCoords, STR_GUEST_LABEL_RIDES_BEEN_ON); - screenCoords.y = windowPos.y + widgets[WIDX_PAGE_BACKGROUND].bottom - 12; auto ft = Formatter(); auto* r = GetRide(peep->FavouriteRide); if (r != nullptr) { - r->FormatNameTo(ft); + r->formatNameTo(ft); } else { @@ -1356,7 +1350,7 @@ namespace OpenRCT2::Ui::Windows if (r != nullptr) { auto ft = Formatter(); - r->FormatNameTo(ft); + r->formatNameTo(ft); DrawTextBasic(dpi, { 0, y - 1 }, stringId, ft); } } @@ -1556,13 +1550,9 @@ namespace OpenRCT2::Ui::Windows return; } - // cx dx auto screenCoords = windowPos - + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 4 }; + + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 14 }; - DrawTextBasic(dpi, screenCoords, STR_GUEST_RECENT_THOUGHTS_LABEL); - - screenCoords.y += 10; for (const auto& thought : peep->Thoughts) { if (thought.type == PeepThoughtType::None) @@ -1616,7 +1606,7 @@ namespace OpenRCT2::Ui::Windows std::pair InventoryFormatItem(Guest& guest, ShopItem item) const { - auto parkName = GetGameState().Park.Name.c_str(); + auto parkName = getGameState().park.Name.c_str(); // Default item image auto& itemDesc = GetShopItemDescriptor(item); @@ -1641,7 +1631,7 @@ namespace OpenRCT2::Ui::Windows { ft.Rewind(); ft.Increment(2); - invRide->FormatNameTo(ft); + invRide->formatNameTo(ft); } break; @@ -1665,7 +1655,7 @@ namespace OpenRCT2::Ui::Windows ft.Rewind(); ft.Increment(2); ft.Add(STR_PEEP_INVENTORY_VOUCHER_RIDE_FREE); - invRide->FormatNameTo(ft); + invRide->formatNameTo(ft); } break; case VOUCHER_TYPE_PARK_ENTRY_HALF_PRICE: @@ -1695,7 +1685,7 @@ namespace OpenRCT2::Ui::Windows { ft.Rewind(); ft.Increment(2); - invRide->FormatNameTo(ft); + invRide->formatNameTo(ft); } break; case ShopItem::Photo3: @@ -1704,7 +1694,7 @@ namespace OpenRCT2::Ui::Windows { ft.Rewind(); ft.Increment(2); - invRide->FormatNameTo(ft); + invRide->formatNameTo(ft); } break; case ShopItem::Photo4: @@ -1713,7 +1703,7 @@ namespace OpenRCT2::Ui::Windows { ft.Rewind(); ft.Increment(2); - invRide->FormatNameTo(ft); + invRide->formatNameTo(ft); } break; default: @@ -1742,15 +1732,12 @@ namespace OpenRCT2::Ui::Windows } auto& widget = widgets[WIDX_PAGE_BACKGROUND]; - auto screenCoords = windowPos + ScreenCoordsXY{ widget.left + 4, widget.top + 2 }; + auto screenCoords = windowPos + ScreenCoordsXY{ widget.left + 4, widget.top + 12 }; int32_t itemNameWidth = widget.width() - 24; int32_t maxY = windowPos.y + height - 22; int32_t numItems = 0; - DrawTextBasic(dpi, screenCoords, STR_CARRYING); - screenCoords.y += 10; - for (ShopItem item = ShopItem::Balloon; item < ShopItem::Count; item++) { if (screenCoords.y >= maxY) diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 6475d88dfb..7beff84bb2 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -25,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -169,10 +169,9 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_FILTER_BY_NAME].type = WindowWidgetType::FlatBtn; widgets[WIDX_PAGE_DROPDOWN].type = WindowWidgetType::Empty; widgets[WIDX_PAGE_DROPDOWN_BUTTON].type = WindowWidgetType::Empty; - min_width = 350; - min_height = 330; - max_width = 500; - max_height = 450; + + WindowSetResize(*this, { 350, 330 }, { 500, 450 }); + RefreshList(); } @@ -187,14 +186,14 @@ namespace OpenRCT2::Ui::Windows switch (type) { - case GuestListFilterType::GuestsOnRide: + case GuestListFilterType::guestsOnRide: { auto guestRide = GetRide(RideId::FromUnderlying(index)); if (guestRide != nullptr) { ft.Add( - guestRide->GetRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside) ? STR_IN_RIDE : STR_ON_RIDE); - guestRide->FormatNameTo(ft); + guestRide->getRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside) ? STR_IN_RIDE : STR_ON_RIDE); + guestRide->formatNameTo(ft); _selectedFilter = GuestFilterType::Guests; _highlightedIndex = {}; @@ -203,13 +202,13 @@ namespace OpenRCT2::Ui::Windows } break; } - case GuestListFilterType::GuestsInQueue: + case GuestListFilterType::guestsInQueue: { auto guestRide = GetRide(RideId::FromUnderlying(index)); if (guestRide != nullptr) { ft.Add(STR_QUEUING_FOR); - guestRide->FormatNameTo(ft); + guestRide->formatNameTo(ft); _selectedFilter = GuestFilterType::Guests; _highlightedIndex = {}; @@ -218,13 +217,13 @@ namespace OpenRCT2::Ui::Windows } break; } - case GuestListFilterType::GuestsThinkingAboutRide: + case GuestListFilterType::guestsThinkingAboutRide: { auto guestRide = GetRide(RideId::FromUnderlying(index)); if (guestRide != nullptr) { ft.Add(kStringIdNone); - guestRide->FormatNameTo(ft); + guestRide->formatNameTo(ft); _selectedFilter = GuestFilterType::GuestsThinking; _highlightedIndex = {}; @@ -233,7 +232,7 @@ namespace OpenRCT2::Ui::Windows } break; } - case GuestListFilterType::GuestsThinkingX: + case GuestListFilterType::guestsThinkingX: { ft.Add(kPeepThoughtIds[index & 0xFF]); @@ -248,22 +247,6 @@ namespace OpenRCT2::Ui::Windows RefreshList(); } - void OnResize() override - { - min_width = 350; - min_height = 330; - if (width < min_width) - { - Invalidate(); - width = min_width; - } - if (height < min_height) - { - Invalidate(); - height = min_height; - } - } - void OnUpdate() override { if (_lastFindGroupsWait != 0) @@ -817,7 +800,7 @@ namespace OpenRCT2::Ui::Windows bool IsRefreshOfGroupsRequired() { - uint32_t tick256 = floor2(GetGameState().CurrentTicks, 256); + uint32_t tick256 = floor2(getGameState().currentTicks, 256); if (_selectedView == _lastFindGroupsSelectedView) { if (_lastFindGroupsWait != 0 || _lastFindGroupsTick == tick256) @@ -845,7 +828,7 @@ namespace OpenRCT2::Ui::Windows void RefreshGroups() { - _lastFindGroupsTick = floor2(GetGameState().CurrentTicks, 256); + _lastFindGroupsTick = floor2(getGameState().currentTicks, 256); _lastFindGroupsSelectedView = _selectedView; _lastFindGroupsWait = 320; _groups.clear(); @@ -963,7 +946,7 @@ namespace OpenRCT2::Ui::Windows static GuestItem::CompareFunc GetGuestCompareFunc() { - return GetGameState().Park.Flags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES ? CompareGuestItem + return getGameState().park.Flags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES ? CompareGuestItem : CompareGuestItem; } }; diff --git a/src/openrct2-ui/windows/InstallTrack.cpp b/src/openrct2-ui/windows/InstallTrack.cpp index 03e44a6a35..f4a8975b77 100644 --- a/src/openrct2-ui/windows/InstallTrack.cpp +++ b/src/openrct2-ui/windows/InstallTrack.cpp @@ -368,7 +368,7 @@ namespace OpenRCT2::Ui::Windows void InstallTrackDesign() { auto env = OpenRCT2::GetContext()->GetPlatformEnvironment(); - auto destPath = env->GetDirectoryPath(OpenRCT2::DIRBASE::USER, OpenRCT2::DIRID::TRACK); + auto destPath = env->GetDirectoryPath(OpenRCT2::DirBase::user, OpenRCT2::DirId::trackDesigns); if (!Path::CreateDirectory(destPath)) { LOG_ERROR("Unable to create directory '%s'", destPath.c_str()); @@ -422,7 +422,7 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::EditorObjectSelection); + windowMgr->ForceClose(WindowClass::EditorObjectSelection); windowMgr->CloseConstructionWindows(); gTrackDesignSceneryToggle = false; diff --git a/src/openrct2-ui/windows/Land.cpp b/src/openrct2-ui/windows/Land.cpp index aa7b9ba538..3bdd367d89 100644 --- a/src/openrct2-ui/windows/Land.cpp +++ b/src/openrct2-ui/windows/Land.cpp @@ -280,7 +280,7 @@ namespace OpenRCT2::Ui::Windows screenCoords = { windowPos.x + previewWidget->midX(), windowPos.y + previewWidget->bottom + 5 }; - if (!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { // Draw raise cost amount if (_landToolRaiseCost != kMoney64Undefined && _landToolRaiseCost != 0) @@ -306,8 +306,7 @@ namespace OpenRCT2::Ui::Windows if (gLandToolTerrainSurface != kObjectEntryIndexNull) { auto& objManager = GetContext()->GetObjectManager(); - const auto surfaceObj = static_cast( - objManager.GetLoadedObject(ObjectType::terrainSurface, gLandToolTerrainSurface)); + const auto* surfaceObj = objManager.GetLoadedObject(gLandToolTerrainSurface); if (surfaceObj != nullptr) { price += numTiles * static_cast(surfaceObj->Price); @@ -533,7 +532,7 @@ namespace OpenRCT2::Ui::Windows GameActions::Execute(&surfaceSetStyleAction); - gCurrentToolId = Tool::UpDownArrow; + gCurrentToolId = Tool::upDownArrow; } else { @@ -562,7 +561,7 @@ namespace OpenRCT2::Ui::Windows // The tool is set to 12 here instead of 3 so that the dragging cursor is not the elevation change // cursor - gCurrentToolId = Tool::Crosshair; + gCurrentToolId = Tool::crosshair; } } else @@ -585,7 +584,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_BACKGROUND: MapInvalidateSelectionRect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - gCurrentToolId = Tool::DigDown; + gCurrentToolId = Tool::digDown; break; } } @@ -612,7 +611,7 @@ namespace OpenRCT2::Ui::Windows MapInvalidateSelectionRect(); - if (gCurrentToolId == Tool::UpDownArrow) + if (gCurrentToolId == Tool::upDownArrow) { if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) return; @@ -843,8 +842,7 @@ namespace OpenRCT2::Ui::Windows void DrawDropdownButtons(DrawPixelInfo& dpi) { auto& objManager = GetContext()->GetObjectManager(); - const auto surfaceObj = static_cast( - objManager.GetLoadedObject(ObjectType::terrainSurface, _selectedFloorTexture)); + const auto* surfaceObj = objManager.GetLoadedObject(_selectedFloorTexture); ImageId surfaceImage; if (surfaceObj != nullptr) { @@ -853,8 +851,7 @@ namespace OpenRCT2::Ui::Windows surfaceImage = surfaceImage.WithPrimary(surfaceObj->Colour); } - const auto edgeObj = static_cast( - objManager.GetLoadedObject(ObjectType::terrainEdge, _selectedWallTexture)); + const auto edgeObj = objManager.GetLoadedObject(_selectedWallTexture); ImageId edgeImage; if (edgeObj != nullptr) { @@ -892,8 +889,8 @@ namespace OpenRCT2::Ui::Windows { ShowGridlines(); auto* toolWindow = ContextOpenWindow(WindowClass::Land); - ToolSet(*toolWindow, WIDX_BACKGROUND, Tool::DigDown); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*toolWindow, WIDX_BACKGROUND, Tool::digDown); + gInputFlags.set(InputFlag::unk6); } } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/LandRights.cpp b/src/openrct2-ui/windows/LandRights.cpp index 4ef9210df1..5b718aa651 100644 --- a/src/openrct2-ui/windows/LandRights.cpp +++ b/src/openrct2-ui/windows/LandRights.cpp @@ -50,11 +50,11 @@ namespace OpenRCT2::Ui::Windows WIDX_BUY_CONSTRUCTION_RIGHTS, // Editor/sandbox widgets - WIDX_UNOWNED_LAND_CHECKBOX, - WIDX_LAND_SALE_CHECKBOX, WIDX_LAND_OWNED_CHECKBOX, - WIDX_CONSTRUCTION_RIGHTS_SALE_CHECKBOX, + WIDX_LAND_SALE_CHECKBOX, WIDX_CONSTRUCTION_RIGHTS_OWNED_CHECKBOX, + WIDX_CONSTRUCTION_RIGHTS_SALE_CHECKBOX, + WIDX_UNOWNED_LAND_CHECKBOX, }; // clang-format off @@ -65,11 +65,11 @@ namespace OpenRCT2::Ui::Windows MakeRemapWidget({ 54, 32}, { 16, 16}, WindowWidgetType::TrnBtn, WindowColour::Primary, SPR_LAND_TOOL_INCREASE, STR_ADJUST_LARGER_LAND_RIGHTS_TIP ), // increment size MakeRemapWidget({ 22, 53}, { 24, 24}, WindowWidgetType::ImgBtn, WindowColour::Primary, SPR_BUY_LAND_RIGHTS, STR_BUY_LAND_RIGHTS_TIP ), // land rights MakeRemapWidget({ 52, 53}, { 24, 24}, WindowWidgetType::ImgBtn, WindowColour::Primary, SPR_BUY_CONSTRUCTION_RIGHTS, STR_BUY_CONSTRUCTION_RIGHTS_TIP ), // construction rights - MakeWidget ({100, 22}, {170, 12}, WindowWidgetType::Empty, WindowColour::Primary, STR_LAND_NOT_OWNED, STR_SET_LAND_TO_BE_NOT_OWNED_TIP ), + MakeWidget ({100, 22}, {170, 12}, WindowWidgetType::Empty, WindowColour::Primary, STR_LAND_OWNED, STR_SET_LAND_TO_BE_OWNED_TIP ), MakeWidget ({100, 38}, {170, 12}, WindowWidgetType::Empty, WindowColour::Primary, STR_LAND_SALE, STR_SET_LAND_TO_BE_AVAILABLE_TIP ), - MakeWidget ({100, 54}, {170, 12}, WindowWidgetType::Empty, WindowColour::Primary, STR_LAND_OWNED, STR_SET_LAND_TO_BE_OWNED_TIP ), + MakeWidget ({100, 54}, {170, 12}, WindowWidgetType::Empty, WindowColour::Primary, STR_CONSTRUCTION_RIGHTS_OWNED, STR_SET_CONSTRUCTION_RIGHTS_TO_BE_OWNED_TIP ), MakeWidget ({100, 70}, {170, 12}, WindowWidgetType::Empty, WindowColour::Primary, STR_CONSTRUCTION_RIGHTS_SALE, STR_SET_CONSTRUCTION_RIGHTS_TO_BE_AVAILABLE_TIP), - MakeWidget ({100, 86}, {170, 12}, WindowWidgetType::Empty, WindowColour::Primary, STR_CONSTRUCTION_RIGHTS_OWNED, STR_SET_CONSTRUCTION_RIGHTS_TO_BE_OWNED_TIP ), + MakeWidget ({100, 86}, {170, 12}, WindowWidgetType::Empty, WindowColour::Primary, STR_LAND_NOT_OWNED, STR_SET_LAND_TO_BE_NOT_OWNED_TIP ), }; // clang-format on @@ -80,15 +80,15 @@ namespace OpenRCT2::Ui::Windows BuyConstructionRights, // Sandbox/editor mode - SetLandUnowned, - SetLandForSale, SetLandOwned, - SetConstructionRightsForSale, + SetLandForSale, SetConstructionRightsOwned, + SetConstructionRightsForSale, + SetLandUnowned, }; - static const bool kLandRightsVisibleByMode[] = { true, false, true, true, true, false, false }; - static const bool kConstructionRightsVisibleByMode[] = { false, true, true, false, false, true, true }; + static const bool kLandRightsVisibleByMode[] = { true, false, true, true, false, false, true }; + static const bool kConstructionRightsVisibleByMode[] = { false, true, false, false, true, true, true }; class LandRightsWindow final : public Window { @@ -98,7 +98,7 @@ namespace OpenRCT2::Ui::Windows bool IsOwnershipMode() const { - return (gScreenFlags & SCREEN_FLAGS_EDITOR) != 0 || GetGameState().Cheats.sandboxMode; + return isInEditorMode() != 0 || getGameState().cheats.sandboxMode; } void SwitchToMode(LandRightsMode mode) @@ -107,8 +107,8 @@ namespace OpenRCT2::Ui::Windows pressed_widgets = (1uLL << widgetIndex); _landRightsMode = mode; - ToolSet(*this, widgetIndex, Tool::UpArrow); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*this, widgetIndex, Tool::upArrow); + gInputFlags.set(InputFlag::unk6); if (kLandRightsVisibleByMode[EnumValue(mode)]) ShowLandRights(); @@ -143,7 +143,7 @@ namespace OpenRCT2::Ui::Windows } else { - SwitchToMode(LandRightsMode::SetLandUnowned); + SwitchToMode(LandRightsMode::SetLandOwned); } } @@ -408,7 +408,7 @@ namespace OpenRCT2::Ui::Windows // Draw cost amount if (_landRightsCost != kMoney64Undefined && _landRightsCost != 0 - && !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + && !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(_landRightsCost); diff --git a/src/openrct2-ui/windows/LoadSave.cpp b/src/openrct2-ui/windows/LoadSave.cpp index ae59f01f06..2de63cc7fe 100644 --- a/src/openrct2-ui/windows/LoadSave.cpp +++ b/src/openrct2-ui/windows/LoadSave.cpp @@ -15,27 +15,32 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include #include #include +#include #include +#include +#include #include #include #include -#include #include #include #include @@ -54,6 +59,11 @@ namespace OpenRCT2::Ui::Windows static constexpr ScreenSize kWindowSizeMin = { 300, kWindowSizeInit.height / 2 }; static constexpr ScreenSize kWindowSizeMax = kWindowSizeInit * 3; + static constexpr auto kPadding = 5; + + static constexpr auto kPreviewWidth = 250; + static constexpr auto kWindowSizeMinPreview = ScreenSize{ kWindowSizeInit.width + kPreviewWidth, kWindowSizeInit.height }; + static constexpr int kKibiByte = 1024; static constexpr int kMebiByte = kKibiByte * 1024; @@ -113,18 +123,27 @@ namespace OpenRCT2::Ui::Windows class LoadSaveWindow final : public Window { public: - LoadSaveWindow(int32_t loadSaveType) - : type(loadSaveType) + LoadSaveWindow(LoadSaveAction _action, LoadSaveType _type) + : action(_action) + , type(_type) { } private: int32_t maxDateWidth{ 0 }; int32_t maxTimeWidth{ 0 }; - int32_t type; + LoadSaveAction action; + LoadSaveType type; + ParkPreview _preview; + BackgroundWorker::Job _previewLoadJob; - public: - void PopulateList(bool includeNewItem, const u8string& directory, std::string_view extensionPattern) + bool ShowPreviews() + { + auto& config = Config::Get().general; + return config.FileBrowserShowPreviews; + } + + void PopulateList(const u8string& directory, std::string_view extensionPattern) { const auto absoluteDirectory = Path::GetAbsolute(directory); String::safeUtf8Copy(_directory, absoluteDirectory.c_str(), std::size(_directory)); @@ -299,6 +318,174 @@ namespace OpenRCT2::Ui::Windows maxTimeWidth = GfxGetStringWidth(time.c_str(), FontStyle::Medium) + kDateTimeGap; } + void LoadPreview() + { + _preview = {}; + + if (selected_list_item == -1) + return; + + if (!ShowPreviews()) + return; + + if (type == LoadSaveType::track || type == LoadSaveType::heightmap) + return; + + if (_listItems[selected_list_item].type == FileType::directory) + return; + + auto path = _listItems[selected_list_item].path; + + auto& bgWorker = GetContext()->GetBackgroundWorker(); + + if (_previewLoadJob.isValid()) + { + _previewLoadJob.cancel(); + } + + _previewLoadJob = bgWorker.addJob( + [path]() { + try + { + auto fs = FileStream(path, FileMode::open); + + ClassifiedFileInfo info; + if (!TryClassifyFile(&fs, &info) || info.Type != ::FileType::park) + return ParkPreview{}; + + auto& objectRepository = GetContext()->GetObjectRepository(); + auto parkImporter = ParkImporter::CreateParkFile(objectRepository); + parkImporter->LoadFromStream(&fs, false, true, path.c_str()); + return parkImporter->GetParkPreview(); + } + catch (const std::exception& e) + { + LOG_ERROR("Could not get preview:", e.what()); + return ParkPreview{}; + } + }, + [](const ParkPreview preview) { + auto* windowMgr = GetContext()->GetUiContext()->GetWindowManager(); + auto* wnd = windowMgr->FindByClass(WindowClass::Loadsave); + if (wnd == nullptr) + { + return; + } + auto* loadSaveWnd = static_cast(wnd); + loadSaveWnd->UpdateParkPreview(preview); + }); + } + + void UpdateParkPreview(const ParkPreview& preview) + { + _preview = preview; + if (ShowPreviews()) + { + Invalidate(); + } + } + + void DrawPreview(DrawPixelInfo& dpi) + { + constexpr auto kPreviewHeight = kPreviewWidth / 5 * 4; + + // Draw frame + auto& widget = widgets[WIDX_SCROLL]; + auto frameStartPos = windowPos + ScreenCoordsXY(width - kPreviewWidth - kPadding - 1, widget.top); + auto frameEndPos = frameStartPos + ScreenCoordsXY(kPreviewWidth + 1, kPreviewHeight + 1); + GfxFillRectInset(dpi, { frameStartPos, frameEndPos }, colours[1], INSET_RECT_F_60 | INSET_RECT_FLAG_FILL_MID_LIGHT); + + // Draw park name + { + auto namePos = frameStartPos + ScreenCoordsXY{ kPreviewWidth / 2, -kButtonFaceHeight }; + auto ft = Formatter(); + ft.Add(STR_STRING); + ft.Add(_preview.parkName.c_str()); + DrawTextEllipsised(dpi, namePos, kPreviewWidth, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::CENTRE }); + } + + // Draw image, if available + bool foundImage = false; + for (auto& image : _preview.images) + { + if (image.type == PreviewImageType::screenshot) + { + auto imagePos = frameStartPos + ScreenCoordsXY(1, 1); + drawPreviewImage(image, dpi, imagePos); + foundImage = true; + break; + } + } + + // Draw OpenRCT2 logo if no preview was found + if (!foundImage) + { + auto imagePos = frameStartPos + ScreenCoordsXY(1, 1); + auto colour = ColourMapA[colours[1].colour].dark; + GfxDrawSpriteSolid(dpi, ImageId(SPR_G2_LOGO_MONO_DITHERED), imagePos, colour); + + auto textPos = imagePos + ScreenCoordsXY(kPreviewWidth / 2, kPreviewHeight / 2 - 6); + + // NOTE: Can't simplify this as the compiler complains about different enumeration types. + StringId previewText = STR_NO_PREVIEW_AVAILABLE; + if (_previewLoadJob.isValid()) + { + previewText = STR_LOADING_GENERIC; + } + + DrawTextBasic( + dpi, textPos, previewText, {}, + { ColourWithFlags{ COLOUR_WHITE }.withFlag(ColourFlag::withOutline, true), TextAlignment::CENTRE }); + return; + } + + auto summaryCoords = frameStartPos + ScreenCoordsXY(0, kPreviewHeight + kListRowHeight); + + // Date + { + auto ft = Formatter(); + ft.Add(DateFormatStringFormatIds[Config::Get().general.DateFormat]); + ft.Add(DateDayNames[_preview.day]); + ft.Add(_preview.month); + ft.Add(_preview.year + 1); + DrawTextBasic(dpi, summaryCoords, STR_SUMMARY_DATE, ft); + summaryCoords.y += kListRowHeight; + } + + // Park Rating + { + auto ft = Formatter(); + ft.Add(_preview.parkRating); + DrawTextBasic(dpi, summaryCoords, STR_SUMMARY_PARK_RATING, ft); + summaryCoords.y += kListRowHeight; + } + + // Cash + if (_preview.parkUsesMoney) + { + auto ft = Formatter(); + ft.Add(_preview.cash); + DrawTextBasic(dpi, summaryCoords, STR_SUMMARY_CASH, ft); + summaryCoords.y += kListRowHeight; + } + + // Num. Rides + { + auto ft = Formatter(); + ft.Add(_preview.numRides); + DrawTextBasic(dpi, summaryCoords, STR_SUMMARY_NUM_RIDES, ft); + summaryCoords.y += kListRowHeight; + } + + // Num. Guests + { + auto ft = Formatter(); + ft.Add(_preview.numGuests); + DrawTextBasic(dpi, summaryCoords, STR_SUMMARY_NUM_GUESTS, ft); + summaryCoords.y += kListRowHeight; + } + } + void SortList() { std::sort(_listItems.begin(), _listItems.end(), ListItemSort); @@ -317,11 +504,10 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_SYSTEM_BROWSER].type = WindowWidgetType::Empty; } - // TODO: Split LOADSAVETYPE_* into two proper enum classes (one for load/save, the other for the type) - const bool isSave = (type & 0x01) == LOADSAVETYPE_SAVE; + const bool isSave = action == LoadSaveAction::save; // Pause the game if not on title scene, nor in network play. - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && NetworkGetMode() == NETWORK_MODE_NONE) + if (gLegacyScene != LegacyScene::titleSequence && NetworkGetMode() == NETWORK_MODE_NONE) { gGamePaused |= GAME_PAUSED_MODAL; Audio::StopAll(); @@ -348,7 +534,7 @@ namespace OpenRCT2::Ui::Windows // Populate file list const char* pattern = GetFilterPatternByType(type, isSave); const auto path = GetDir(type); - PopulateList(isSave, path, pattern); + PopulateList(path, pattern); no_list_items = static_cast(_listItems.size()); selected_list_item = -1; @@ -356,10 +542,8 @@ namespace OpenRCT2::Ui::Windows InitScrollWidgets(); ComputeMaxDateWidth(); - min_width = kWindowSizeMin.width; - min_height = kWindowSizeMin.height; - max_width = kWindowSizeMax.width; - max_height = kWindowSizeMax.height; + auto minSize = ShowPreviews() ? kWindowSizeMinPreview : kWindowSizeMin; + WindowSetResize(*this, minSize, kWindowSizeMax); } void OnClose() override @@ -372,7 +556,7 @@ namespace OpenRCT2::Ui::Windows Config::Save(); // Unpause the game if not on title scene, nor in network play. - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && NetworkGetMode() == NETWORK_MODE_NONE) + if (gLegacyScene != LegacyScene::titleSequence && NetworkGetMode() == NETWORK_MODE_NONE) { gGamePaused &= ~GAME_PAUSED_MODAL; Audio::Resume(); @@ -381,7 +565,8 @@ namespace OpenRCT2::Ui::Windows void OnResize() override { - WindowSetResize(*this, kWindowSizeMin.width, kWindowSizeMin.height, kWindowSizeMax.width, kWindowSizeMax.height); + auto minSize = ShowPreviews() ? kWindowSizeMinPreview : kWindowSizeMin; + WindowSetResize(*this, minSize, kWindowSizeMax); auto& config = Config::Get().general; config.FileBrowserWidth = width; @@ -410,8 +595,15 @@ namespace OpenRCT2::Ui::Windows toolbarXPos = widget.left - 1; } + auto paddingBottom = ShowPreviews() ? kPadding : kPadding + 10; + + widgets[WIDX_SCROLL].right = width - kPadding; + widgets[WIDX_SCROLL].bottom = height - paddingBottom; + if (ShowPreviews()) + widgets[WIDX_SCROLL].right -= kPreviewWidth + kPadding; + Widget& customiseWidget = widgets[WIDX_SORT_CUSTOMISE]; - customiseWidget.right = width - 5; + customiseWidget.right = widgets[WIDX_SCROLL].right; customiseWidget.left = customiseWidget.right - 14; auto& config = Config::Get().general; @@ -469,10 +661,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_SORT_DATE].type = WindowWidgetType::Empty; } - widgets[WIDX_SCROLL].right = width - 5; - widgets[WIDX_SCROLL].bottom = height - 15; - - if (type & LOADSAVETYPE_SAVE) + if (action == LoadSaveAction::save) { widgets[WIDX_SCROLL].bottom -= 18; @@ -481,18 +670,18 @@ namespace OpenRCT2::Ui::Windows auto saveLabelWidth = GfxGetStringWidth(saveLabel, FontStyle::Medium) + 16; widgets[WIDX_SAVE].type = WindowWidgetType::Button; - widgets[WIDX_SAVE].top = height - 30; - widgets[WIDX_SAVE].bottom = height - 18; - widgets[WIDX_SAVE].left = width - saveLabelWidth - 5; - widgets[WIDX_SAVE].right = width - 5; + widgets[WIDX_SAVE].top = height - paddingBottom - 15; + widgets[WIDX_SAVE].bottom = height - paddingBottom - 3; + widgets[WIDX_SAVE].right = widgets[WIDX_SCROLL].right; + widgets[WIDX_SAVE].left = widgets[WIDX_SCROLL].right - saveLabelWidth; // Get 'Filename:' string width auto filenameLabel = LanguageGetString(STR_FILENAME_LABEL); auto filenameLabelWidth = GfxGetStringWidth(filenameLabel, FontStyle::Medium); widgets[WIDX_FILENAME_TEXTBOX].type = WindowWidgetType::TextBox; - widgets[WIDX_FILENAME_TEXTBOX].top = height - 30; - widgets[WIDX_FILENAME_TEXTBOX].bottom = height - 18; + widgets[WIDX_FILENAME_TEXTBOX].top = height - paddingBottom - 15; + widgets[WIDX_FILENAME_TEXTBOX].bottom = height - paddingBottom - 3; widgets[WIDX_FILENAME_TEXTBOX].left = 4 + filenameLabelWidth + 6; widgets[WIDX_FILENAME_TEXTBOX].right = widgets[WIDX_SAVE].left - 5; } @@ -507,6 +696,9 @@ namespace OpenRCT2::Ui::Windows { DrawWidgets(dpi); + if (ShowPreviews()) + DrawPreview(dpi); + { const auto& widget = widgets[WIDX_PARENT_FOLDER]; const auto pathWidth = widget.left - 8; @@ -559,7 +751,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_SORT_DATE], STR_DATE_COLUMN, FileBrowserSort::DateAscending, FileBrowserSort::DateDescending); // 'Filename:' label - if (type & LOADSAVETYPE_SAVE) + if (action == LoadSaveAction::save) { auto& widget = widgets[WIDX_FILENAME_TEXTBOX]; DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ 5, widget.top + 2 }, STR_FILENAME_LABEL, {}, { COLOUR_GREY }); @@ -568,7 +760,7 @@ namespace OpenRCT2::Ui::Windows void OnMouseUp(WidgetIndex widgetIndex) override { - bool isSave = (type & 0x01) == LOADSAVETYPE_SAVE; + bool isSave = action == LoadSaveAction::save; switch (widgetIndex) { case WIDX_CLOSE: @@ -576,7 +768,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_PARENT_FOLDER: - PopulateList(isSave, _parentDirectory, _extensionPattern); + PopulateList(_parentDirectory, _extensionPattern); InitScrollWidgets(); no_list_items = static_cast(_listItems.size()); break; @@ -592,12 +784,12 @@ namespace OpenRCT2::Ui::Windows u8string path = OpenSystemFileBrowser(isSave, type, _directory, _defaultPath); if (!path.empty()) { - Select(path.c_str(), type, _trackDesign); + Select(path.c_str(), action, type, _trackDesign); } else { // If user cancels file dialog, refresh list - PopulateList(isSave, _directory, _extensionPattern); + PopulateList(_directory, _extensionPattern); InitScrollWidgets(); no_list_items = static_cast(_listItems.size()); } @@ -647,7 +839,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_DEFAULT_FOLDER: - PopulateList(isSave, GetInitialDirectoryByType(type).c_str(), _extensionPattern); + PopulateList(GetInitialDirectoryByType(type).c_str(), _extensionPattern); InitScrollWidgets(); no_list_items = static_cast(_listItems.size()); break; @@ -662,9 +854,9 @@ namespace OpenRCT2::Ui::Windows Path::Combine(_directory, _currentFilename), RemovePatternWildcard(_extensionPattern)); if (File::Exists(path)) - WindowOverwritePromptOpen(_currentFilename, path, type, _trackDesign); + WindowOverwritePromptOpen(_currentFilename, path, action, type, _trackDesign); else - Select(path.c_str(), type, _trackDesign); + Select(path.c_str(), action, type, _trackDesign); } } } @@ -677,21 +869,24 @@ namespace OpenRCT2::Ui::Windows gDropdownItems[0].Format = STR_TOGGLE_OPTION; gDropdownItems[1].Format = STR_TOGGLE_OPTION; gDropdownItems[2].Format = STR_TOGGLE_OPTION; + gDropdownItems[3].Format = STR_TOGGLE_OPTION; gDropdownItems[0].Args = STR_FILEBROWSER_CUSTOMISE_FILENAME; gDropdownItems[1].Args = STR_FILEBROWSER_CUSTOMISE_SIZE; gDropdownItems[2].Args = STR_FILEBROWSER_CUSTOMISE_DATE; + gDropdownItems[3].Args = STR_FILEBROWSER_CUSTOMISE_PREVIEW; Widget* widget = &widgets[WIDX_SORT_CUSTOMISE]; WindowDropdownShowTextCustomWidth( { windowPos.x + widget->left - 70, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0, - Dropdown::Flag::StayOpen, 3, 90); + Dropdown::Flag::StayOpen, 4, 90); auto& config = Config::Get().general; Dropdown::SetChecked(0, true); Dropdown::SetChecked(1, config.FileBrowserShowSizeColumn); Dropdown::SetChecked(2, config.FileBrowserShowDateColumn); + Dropdown::SetChecked(3, config.FileBrowserShowPreviews); } void OnDropdown(WidgetIndex widgetIndex, int32_t selectedIndex) override @@ -711,6 +906,18 @@ namespace OpenRCT2::Ui::Windows config.FileBrowserShowDateColumn ^= true; changed = true; } + else if (selectedIndex == 3) + { + config.FileBrowserShowPreviews ^= true; + + Invalidate(); + if (config.FileBrowserShowPreviews) + width += kPreviewWidth; + else + width -= kPreviewWidth; + + changed = true; + } if (changed) { @@ -744,7 +951,7 @@ namespace OpenRCT2::Ui::Windows no_list_items = 0; selected_list_item = -1; - PopulateList((type & 1) == LOADSAVETYPE_SAVE, path, _extensionPattern); + PopulateList(path, _extensionPattern); InitScrollWidgets(); no_list_items = static_cast(_listItems.size()); @@ -771,15 +978,14 @@ namespace OpenRCT2::Ui::Windows void OnScrollMouseOver(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override { - int32_t selectedItem; - - selectedItem = screenCoords.y / kScrollableRowHeight; + int32_t selectedItem = screenCoords.y / kScrollableRowHeight; if (selectedItem >= no_list_items) return; if (selected_list_item != selectedItem) { selected_list_item = selectedItem; + LoadPreview(); Invalidate(); } } @@ -797,12 +1003,11 @@ namespace OpenRCT2::Ui::Windows // The selected item is a folder no_list_items = 0; selected_list_item = -1; - bool includeNewItem = (type & 1) == LOADSAVETYPE_SAVE; char directory[MAX_PATH]; String::safeUtf8Copy(directory, _listItems[selectedItem].path.c_str(), sizeof(directory)); - PopulateList(includeNewItem, directory, _extensionPattern); + PopulateList(directory, _extensionPattern); InitScrollWidgets(); no_list_items = static_cast(_listItems.size()); @@ -813,10 +1018,15 @@ namespace OpenRCT2::Ui::Windows String::set(_currentFilename, std::size(_currentFilename), _listItems[selectedItem].name.c_str()); InvalidateWidget(WIDX_FILENAME_TEXTBOX); - if ((type & 0x01) == LOADSAVETYPE_SAVE) - WindowOverwritePromptOpen(_listItems[selectedItem].name, _listItems[selectedItem].path, type, _trackDesign); + if (action == LoadSaveAction::save) + { + WindowOverwritePromptOpen( + _listItems[selectedItem].name, _listItems[selectedItem].path, action, type, _trackDesign); + } else - Select(_listItems[selectedItem].path.c_str(), type, _trackDesign); + { + Select(_listItems[selectedItem].path.c_str(), action, type, _trackDesign); + } } } @@ -902,7 +1112,9 @@ namespace OpenRCT2::Ui::Windows #pragma endregion }; - WindowBase* LoadsaveOpen(int32_t type, std::string_view defaultPath, LoadSaveCallback callback, TrackDesign* trackDesign) + WindowBase* LoadsaveOpen( + LoadSaveAction action, LoadSaveType type, std::string_view defaultPath, LoadSaveCallback callback, + TrackDesign* trackDesign) { _trackDesign = trackDesign; _defaultPath = defaultPath; @@ -927,12 +1139,12 @@ namespace OpenRCT2::Ui::Windows w = windowMgr->Create( WindowClass::Loadsave, width, height, WF_STICK_TO_FRONT | WF_RESIZABLE | WF_AUTO_POSITION | WF_CENTRE_SCREEN, - type); + action, type); } - bool isSave = (type & 0x01) == LOADSAVETYPE_SAVE; + bool isSave = action == LoadSaveAction::save; - if ((type & 0x0E) == LOADSAVETYPE_HEIGHTMAP && !isSave) + if (type == LoadSaveType::heightmap && isSave) { Guard::Fail("Cannot save images through loadsave window"); } @@ -940,7 +1152,7 @@ namespace OpenRCT2::Ui::Windows w->widgets[WIDX_TITLE].text = GetTitleStringId(type, isSave); if (w->widgets[WIDX_TITLE].text == kStringIdNone) { - Guard::Fail("Unsupported load/save type: %d", type & 0x0F); + Guard::Fail("Unsupported load/save type: %d", EnumValue(type)); } return w; diff --git a/src/openrct2-ui/windows/Main.cpp b/src/openrct2-ui/windows/Main.cpp index e82644cb51..6918c6357e 100644 --- a/src/openrct2-ui/windows/Main.cpp +++ b/src/openrct2-ui/windows/Main.cpp @@ -78,6 +78,6 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->Create( - WindowClass::MainWindow, { 0, 0 }, ContextGetWidth(), ContextGetHeight(), WF_STICK_TO_BACK); + WindowClass::MainWindow, { 0, 0 }, ContextGetWidth(), ContextGetHeight(), WF_STICK_TO_BACK | WF_NO_TITLE_BAR); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index f11cdeaa37..aded0aafdc 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -57,7 +57,7 @@ namespace OpenRCT2::Ui::Windows static int32_t getPracticalMapSize() { // Take non-square maps into account - return std::max(GetGameState().MapSize.x, GetGameState().MapSize.y) - 2; + return std::max(getGameState().mapSize.x, getGameState().mapSize.y) - 2; } static int32_t getPracticalMapSizeBig() { @@ -74,7 +74,7 @@ namespace OpenRCT2::Ui::Windows static bool isEditorOrSandbox() { - return (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode; + return gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode; } static constexpr StringId WINDOW_TITLE = STR_MAP_LABEL; @@ -239,9 +239,8 @@ namespace OpenRCT2::Ui::Windows | (1uLL << WIDX_MAP_SIZE_SPINNER_X_UP) | (1uLL << WIDX_MAP_SIZE_SPINNER_X_DOWN); flags |= WF_RESIZABLE; - min_width = WW; - min_height = WH; + WindowSetResize(*this, { WW, WH }, { WW, WH }); SetInitialWindowDimensions(); ResetMaxWindowDimensions(); ResizeMiniMap(); @@ -255,8 +254,8 @@ namespace OpenRCT2::Ui::Windows CentreMapOnViewPoint(); FootpathSelectDefault(); - auto& gameState = GetGameState(); - _mapWidthAndHeightLinked = gameState.MapSize.x == gameState.MapSize.y; + auto& gameState = getGameState(); + _mapWidthAndHeightLinked = gameState.mapSize.x == gameState.mapSize.y; // Reset land rights tool size _landRightsToolSize = 1; @@ -298,7 +297,7 @@ namespace OpenRCT2::Ui::Windows break; } case WIDX_PEOPLE_STARTING_POSITION: - if (ToolSet(*this, widgetIndex, Tool::UpArrow)) + if (ToolSet(*this, widgetIndex, Tool::upArrow)) break; ShowGridlines(); @@ -512,7 +511,7 @@ namespace OpenRCT2::Ui::Windows size = std::clamp( size, static_cast(kMinimumMapSizeTechnical), static_cast(kMaximumMapSizeTechnical)); - TileCoordsXY newMapSize = GetGameState().MapSize; + TileCoordsXY newMapSize = getGameState().mapSize; if (_resizeDirection != ResizeDirection::X) newMapSize.y = size; if (_resizeDirection != ResizeDirection::Y) @@ -616,8 +615,8 @@ namespace OpenRCT2::Ui::Windows pressed_widgets |= (1uLL << WIDX_MAP_GENERATOR); // Set disabled widgets - auto& gameState = GetGameState(); - SetWidgetDisabled(WIDX_MAP_SIZE_LINK, gameState.MapSize.x != gameState.MapSize.y); + auto& gameState = getGameState(); + SetWidgetDisabled(WIDX_MAP_SIZE_LINK, gameState.mapSize.x != gameState.mapSize.y); // Resize widgets to window size ResizeFrameWithPage(); @@ -765,7 +764,7 @@ namespace OpenRCT2::Ui::Windows void IncreaseMapSize() { - auto newMapSize = GetGameState().MapSize; + auto newMapSize = getGameState().mapSize; if (IsWidgetPressed(WIDX_MAP_SIZE_LINK) || _resizeDirection == ResizeDirection::Y) newMapSize.y++; if (IsWidgetPressed(WIDX_MAP_SIZE_LINK) || _resizeDirection == ResizeDirection::X) @@ -777,7 +776,7 @@ namespace OpenRCT2::Ui::Windows void DecreaseMapSize() { - auto newMapSize = GetGameState().MapSize; + auto newMapSize = getGameState().mapSize; if (IsWidgetPressed(WIDX_MAP_SIZE_LINK) || _resizeDirection == ResizeDirection::Y) newMapSize.y--; if (IsWidgetPressed(WIDX_MAP_SIZE_LINK) || _resizeDirection == ResizeDirection::X) @@ -927,7 +926,7 @@ namespace OpenRCT2::Ui::Windows Ride* targetRide = GetRide(tileElement->AsEntrance()->GetRideIndex()); if (targetRide != nullptr) { - const auto& colourKey = targetRide->GetRideTypeDescriptor().ColourKey; + const auto& colourKey = targetRide->getRideTypeDescriptor().ColourKey; colourA = RideKeyColours[EnumValue(colourKey)]; } break; @@ -937,7 +936,7 @@ namespace OpenRCT2::Ui::Windows Ride* targetRide = GetRide(tileElement->AsTrack()->GetRideIndex()); if (targetRide != nullptr) { - const auto& colourKey = targetRide->GetRideTypeDescriptor().ColourKey; + const auto& colourKey = targetRide->getRideTypeDescriptor().ColourKey; colourA = RideKeyColours[EnumValue(colourKey)]; } @@ -1101,7 +1100,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_PEOPLE_STARTING_POSITION].type = WindowWidgetType::FlatBtn; // Only show this in the scenario editor, even when in sandbox mode. - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) widgets[WIDX_MAP_GENERATOR].type = WindowWidgetType::FlatBtn; widgets[WIDX_MAP_SIZE_SPINNER_Y].type = WindowWidgetType::Spinner; @@ -1113,10 +1112,10 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_MAP_SIZE_SPINNER_X_DOWN].type = WindowWidgetType::Button; // Push width (Y) and height (X) to the common formatter arguments for the map size spinners to use - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto ft = Formatter::Common(); - ft.Add(gameState.MapSize.y - 2); - ft.Add(gameState.MapSize.x - 2); + ft.Add(gameState.mapSize.y - 2); + ft.Add(gameState.mapSize.x - 2); } void InputMapSize(WidgetIndex callingWidget) diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index dde484d2ec..393876b65d 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -260,7 +260,7 @@ namespace OpenRCT2::Ui::Windows Y, }; - static void HeightmapLoadsaveCallback(int32_t result, const utf8* path); + static void HeightmapLoadsaveCallback(ModalResult result, const utf8* path); class MapGenWindow final : public Window { @@ -274,6 +274,10 @@ namespace OpenRCT2::Ui::Windows void SetPage(int32_t newPage) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == newPage && !widgets.empty()) + return; + page = newPage; frame_no = 0; RemoveViewport(); @@ -929,7 +933,8 @@ namespace OpenRCT2::Ui::Windows case WIDX_HEIGHTMAP_BROWSE: { auto intent = Intent(WindowClass::Loadsave); - intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_HEIGHTMAP); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::heightmap); intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(HeightmapLoadsaveCallback)); ContextOpenIntent(&intent); return; @@ -1180,8 +1185,7 @@ namespace OpenRCT2::Ui::Windows void DrawDropdownButtons(DrawPixelInfo& dpi, WidgetIndex floorWidgetIndex, WidgetIndex edgeWidgetIndex) { auto& objManager = GetContext()->GetObjectManager(); - const auto surfaceObj = static_cast( - objManager.GetLoadedObject(ObjectType::terrainSurface, _settings.landTexture)); + const auto* surfaceObj = objManager.GetLoadedObject(_settings.landTexture); ImageId surfaceImage; if (surfaceObj != nullptr) { @@ -1193,8 +1197,7 @@ namespace OpenRCT2::Ui::Windows } ImageId edgeImage; - const auto edgeObj = static_cast( - objManager.GetLoadedObject(ObjectType::terrainEdge, _settings.edgeTexture)); + const auto* edgeObj = objManager.GetLoadedObject(_settings.edgeTexture); if (edgeObj != nullptr) { edgeImage = ImageId(edgeObj->IconImageId); @@ -1504,9 +1507,9 @@ namespace OpenRCT2::Ui::Windows } } - void AfterLoadingHeightMap(int32_t result, const utf8* path) + void AfterLoadingHeightMap(ModalResult result, const utf8* path) { - if (result == MODAL_RESULT_OK) + if (result == ModalResult::ok) { if (!MapGenerator::LoadHeightmapImage(path)) { @@ -1534,7 +1537,7 @@ namespace OpenRCT2::Ui::Windows return windowMgr->FocusOrCreate(WindowClass::Mapgen, WW, WH, WF_10 | WF_AUTO_POSITION | WF_CENTRE_SCREEN); } - static void HeightmapLoadsaveCallback(int32_t result, const utf8* path) + static void HeightmapLoadsaveCallback(ModalResult result, const utf8* path) { auto* w = static_cast(MapgenOpen()); w->AfterLoadingHeightMap(result, path); diff --git a/src/openrct2-ui/windows/MapTooltip.cpp b/src/openrct2-ui/windows/MapTooltip.cpp index c491508f58..0d6e24e928 100644 --- a/src/openrct2-ui/windows/MapTooltip.cpp +++ b/src/openrct2-ui/windows/MapTooltip.cpp @@ -86,7 +86,7 @@ namespace OpenRCT2::Ui::Windows // Check for cursor movement _cursorHoldDuration++; - if (abs(cursorChange.x) > 5 || abs(cursorChange.y) > 5 || (InputTestFlag(INPUT_FLAG_5)) + if (abs(cursorChange.x) > 5 || abs(cursorChange.y) > 5 || (gInputFlags.has(InputFlag::unk5)) || InputGetState() == InputState::ViewportRight) _cursorHoldDuration = 0; diff --git a/src/openrct2-ui/windows/MazeConstruction.cpp b/src/openrct2-ui/windows/MazeConstruction.cpp index 80393fc4d7..3a2720e5d7 100644 --- a/src/openrct2-ui/windows/MazeConstruction.cpp +++ b/src/openrct2-ui/windows/MazeConstruction.cpp @@ -129,9 +129,9 @@ namespace OpenRCT2::Ui::Windows auto currentRide = GetRide(_currentRideIndex); if (currentRide != nullptr) { - if (currentRide->overall_view.IsNull()) + if (currentRide->overallView.IsNull()) { - auto gameAction = RideDemolishAction(currentRide->id, RIDE_MODIFY_DEMOLISH); + auto gameAction = RideDemolishAction(currentRide->id, RideModifyType::demolish); gameAction.SetFlags(GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED); GameActions::Execute(&gameAction); } @@ -215,7 +215,7 @@ namespace OpenRCT2::Ui::Windows void OnUpdate() override { auto currentRide = GetRide(_currentRideIndex); - if (currentRide == nullptr || currentRide->status != RideStatus::Closed) + if (currentRide == nullptr || currentRide->status != RideStatus::closed) { Close(); return; @@ -292,7 +292,7 @@ namespace OpenRCT2::Ui::Windows if (currentRide != nullptr) { ft.Increment(4); - currentRide->FormatNameTo(ft); + currentRide->formatNameTo(ft); } else { @@ -309,14 +309,14 @@ namespace OpenRCT2::Ui::Windows private: void WindowMazeConstructionEntranceMouseup(WidgetIndex widgetIndex) { - if (ToolSet(*this, widgetIndex, Tool::Crosshair)) + if (ToolSet(*this, widgetIndex, Tool::crosshair)) return; gRideEntranceExitPlaceType = widgetIndex == WIDX_MAZE_ENTRANCE ? ENTRANCE_TYPE_RIDE_ENTRANCE : ENTRANCE_TYPE_RIDE_EXIT; gRideEntranceExitPlaceRideIndex = rideId; gRideEntranceExitPlaceStationIndex = StationIndex::FromUnderlying(0); - InputSetFlag(INPUT_FLAG_6, true); + gInputFlags.set(InputFlag::unk6); RideConstructionInvalidateCurrentTrack(); @@ -352,7 +352,7 @@ namespace OpenRCT2::Ui::Windows if (entranceOrExitCoords.IsNull()) return; - if (gRideEntranceExitPlaceDirection == INVALID_DIRECTION) + if (gRideEntranceExitPlaceDirection == kInvalidDirection) return; RideId rideIndex = gRideEntranceExitPlaceRideIndex; @@ -373,7 +373,7 @@ namespace OpenRCT2::Ui::Windows if (currentRide != nullptr && RideAreAllPossibleEntrancesAndExitsBuilt(*currentRide).Successful) { ToolCancel(); - if (!currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (!currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { windowMgr->CloseByClass(WindowClass::RideConstruction); } @@ -387,7 +387,7 @@ namespace OpenRCT2::Ui::Windows : WIDX_MAZE_EXIT; ToolCancel(); - ToolSet(*this, newToolWidgetIndex, Tool::Crosshair); + ToolSet(*this, newToolWidgetIndex, Tool::crosshair); WindowMazeConstructionUpdatePressedWidgets(); } @@ -399,7 +399,7 @@ namespace OpenRCT2::Ui::Windows { int32_t x, y, z, actionFlags = 0, mode; - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); _rideConstructionNextArrowPulse = 0; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; RideConstructionInvalidateCurrentTrack(); diff --git a/src/openrct2-ui/windows/Multiplayer.cpp b/src/openrct2-ui/windows/Multiplayer.cpp index ff57fa3c82..e708dce7b2 100644 --- a/src/openrct2-ui/windows/Multiplayer.cpp +++ b/src/openrct2-ui/windows/Multiplayer.cpp @@ -64,10 +64,8 @@ namespace OpenRCT2::Ui::Windows // clang-format off #define MAIN_MULTIPLAYER_WIDGETS \ - MakeWidget({ 0, 0}, {340, 240}, WindowWidgetType::Frame, WindowColour::Primary ), /* panel / background */ \ - MakeWidget({ 1, 1}, {338, 14}, WindowWidgetType::Caption, WindowColour::Primary, kStringIdNone, STR_WINDOW_TITLE_TIP ), /* title bar */ \ - MakeWidget({327, 2}, { 11, 12}, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP ), /* close x button */ \ - MakeWidget({ 0, 43}, {340, 197}, WindowWidgetType::Resize, WindowColour::Secondary ), /* content panel */ \ + WINDOW_SHIM(kStringIdNone, 340, 240), \ + MakeWidget({ 0, 43}, {340, 197}, WindowWidgetType::Resize, WindowColour::Secondary ), /* content panel */ \ MakeTab ({ 3, 17}, STR_SHOW_SERVER_INFO_TIP), /* tab */ \ MakeTab ({ 34, 17}, STR_PLAYERS_TIP ), /* tab */ \ MakeTab ({ 65, 17}, STR_GROUPS_TIP ), /* tab */ \ @@ -142,7 +140,7 @@ namespace OpenRCT2::Ui::Windows class MultiplayerWindow final : public Window { private: - std::optional _windowInformationSize; + std::optional _windowInformationSize; uint8_t _selectedGroup{ 0 }; private: @@ -159,7 +157,7 @@ namespace OpenRCT2::Ui::Windows void GroupsScrollPaint(int32_t scrollIndex, DrawPixelInfo& dpi) const; void ShowGroupDropdown(WidgetIndex widgetIndex); - ScreenCoordsXY InformationGetSize(); + ScreenSize InformationGetSize(); public: void OnOpen() override; @@ -203,6 +201,10 @@ namespace OpenRCT2::Ui::Windows void MultiplayerWindow::SetPage(int32_t page_number) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == page_number && !widgets.empty()) + return; + _windowInformationSize.reset(); page = page_number; @@ -289,7 +291,7 @@ namespace OpenRCT2::Ui::Windows } } - ScreenCoordsXY MultiplayerWindow::InformationGetSize() + ScreenSize MultiplayerWindow::InformationGetSize() { assert(!_windowInformationSize.has_value()); @@ -342,12 +344,12 @@ namespace OpenRCT2::Ui::Windows case WINDOW_MULTIPLAYER_PAGE_INFORMATION: { auto size = _windowInformationSize ? _windowInformationSize.value() : InformationGetSize(); - WindowSetResize(*this, size.x, size.y, size.x, size.y); + WindowSetResize(*this, size, size); break; } case WINDOW_MULTIPLAYER_PAGE_PLAYERS: { - WindowSetResize(*this, 420, 124, 500, 450); + WindowSetResize(*this, { 420, 124 }, { 500, 450 }); no_list_items = (IsServerPlayerInvisible() ? NetworkGetNumVisiblePlayers() : NetworkGetNumPlayers()); @@ -359,7 +361,7 @@ namespace OpenRCT2::Ui::Windows } case WINDOW_MULTIPLAYER_PAGE_GROUPS: { - WindowSetResize(*this, 320, 200, 320, 500); + WindowSetResize(*this, { 320, 200 }, { 320, 500 }); no_list_items = NetworkGetNumActions(); @@ -369,7 +371,7 @@ namespace OpenRCT2::Ui::Windows } case WINDOW_MULTIPLAYER_PAGE_OPTIONS: { - WindowSetResize(*this, 300, 100, 300, 100); + WindowSetResize(*this, { 300, 100 }, { 300, 100 }); break; } } diff --git a/src/openrct2-ui/windows/NetworkStatus.cpp b/src/openrct2-ui/windows/NetworkStatus.cpp index 4e70fa5bf9..06e482ba92 100644 --- a/src/openrct2-ui/windows/NetworkStatus.cpp +++ b/src/openrct2-ui/windows/NetworkStatus.cpp @@ -39,13 +39,9 @@ namespace OpenRCT2::Ui::Windows { SetWidgets(window_network_status_widgets); WindowInitScrollWidgets(*this); + WindowSetResize(*this, { 320, 90 }, { 320, 90 }); frame_no = 0; - min_width = 320; - min_height = 90; - max_width = min_width; - max_height = min_height; - page = 0; list_information_type = 0; } diff --git a/src/openrct2-ui/windows/NewCampaign.cpp b/src/openrct2-ui/windows/NewCampaign.cpp index 2b8a1d3d6f..d87f4d62f3 100644 --- a/src/openrct2-ui/windows/NewCampaign.cpp +++ b/src/openrct2-ui/windows/NewCampaign.cpp @@ -95,12 +95,12 @@ namespace OpenRCT2::Ui::Windows std::string rideAName = ""; auto rideA = GetRide(a); if (rideA != nullptr) - rideAName = rideA->GetName(); + rideAName = rideA->getName(); std::string rideBName = ""; auto rideB = GetRide(b); if (rideB != nullptr) - rideBName = rideB->GetName(); + rideBName = rideB->getName(); return String::logicalCmp(rideAName.c_str(), rideBName.c_str()) < 0; } @@ -114,7 +114,7 @@ namespace OpenRCT2::Ui::Windows BitSet items = {}; for (auto& curRide : GetRideManager()) { - auto rideEntry = curRide.GetRideEntry(); + auto rideEntry = curRide.getRideEntry(); if (rideEntry != nullptr) { for (const auto itemType : rideEntry->shop_item) @@ -144,9 +144,9 @@ namespace OpenRCT2::Ui::Windows RideList.clear(); for (const auto& curRide : GetRideManager()) { - if (curRide.status == RideStatus::Open) + if (curRide.status == RideStatus::open) { - const auto& rtd = curRide.GetRideTypeDescriptor(); + const auto& rtd = curRide.getRideTypeDescriptor(); if (rtd.HasFlag(RtdFlag::isShopOrFacility)) continue; if (rtd.HasFlag(RtdFlag::sellsFood)) @@ -234,14 +234,14 @@ namespace OpenRCT2::Ui::Windows // HACK until dropdown items have longer argument buffers gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL; Formatter ft(reinterpret_cast(&gDropdownItems[numItems].Args)); - if (curRide->custom_name.empty()) + if (curRide->customName.empty()) { - curRide->FormatNameTo(ft); + curRide->formatNameTo(ft); } else { gDropdownItems[numItems].Format = STR_OPTIONS_DROPDOWN_ITEM; - ft.Add(curRide->custom_name.c_str()); + ft.Add(curRide->customName.c_str()); } numItems++; } @@ -337,7 +337,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_RIDE_DROPDOWN].text = STR_STRINGID; auto ft = Formatter::Common(); - curRide->FormatNameTo(ft); + curRide->formatNameTo(ft); } } break; @@ -376,7 +376,7 @@ namespace OpenRCT2::Ui::Windows dpi, windowPos + ScreenCoordsXY{ spinnerWidget->left + 1, spinnerWidget->top }, Campaign.no_weeks == 1 ? STR_MARKETING_1_WEEK : STR_X_WEEKS, ft, { colours[0] }); - screenCoords = windowPos + ScreenCoordsXY{ 14, 60 }; + screenCoords = windowPos + ScreenCoordsXY{ 14, spinnerWidget->bottom + 6 }; // Price per week ft = Formatter(); diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 840cbd3677..5c4318e05a 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -43,7 +43,8 @@ using namespace OpenRCT2::TrackMetaData; namespace OpenRCT2::Ui::Windows { static constexpr StringId WindowTitle = kStringIdNone; - static constexpr int32_t WindowHeight = 382; + static constexpr int32_t kWindowHeight = 382; + static constexpr int32_t kWindowHeightResearch = 194; static constexpr int32_t WindowWidth = 601; static constexpr int32_t RideListItemsMax = 384; static constexpr int32_t RideTabCount = 6; @@ -209,7 +210,7 @@ namespace OpenRCT2::Ui::Windows // clang-format off static constexpr Widget window_new_ride_widgets[] = { - WINDOW_SHIM(WindowTitle, WindowWidth, WindowHeight), + WINDOW_SHIM(WindowTitle, WindowWidth, kWindowHeight), MakeWidget({ 0, 43}, {601, 339}, WindowWidgetType::Resize, WindowColour::Secondary ), MakeTab ({ 3, 17}, STR_TRANSPORT_RIDES_TIP ), MakeTab ({ 34, 17}, STR_GENTLE_RIDES_TIP ), @@ -280,9 +281,9 @@ namespace OpenRCT2::Ui::Windows RideSelection _windowNewRideListItems[RideListItemsMax]{}; struct NewRideVariables { - RideSelection SelectedRide; - RideSelection HighlightedRide; - uint16_t SelectedRideCountdown; + RideSelection SelectedRide{}; + RideSelection HighlightedRide{}; + uint16_t SelectedRideCountdown{}; } _newRideVars{}; public: @@ -402,7 +403,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_TAB_7].type = WindowWidgetType::Tab; widgets[WIDX_FILTER_TEXT_BOX].string = _filter.data(); - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + if (gLegacyScene == LegacyScene::trackDesigner) widgets[WIDX_TAB_7].type = WindowWidgetType::Empty; if (_currentTab == RESEARCH_TAB) @@ -538,6 +539,10 @@ namespace OpenRCT2::Ui::Windows void SetPage(NewRideTabId tab) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (_currentTab == tab && !widgets.empty()) + return; + _currentTab = tab; frame_no = 0; _newRideVars.HighlightedRide = { kRideTypeNull, kObjectEntryIndexNull }; @@ -619,7 +624,7 @@ namespace OpenRCT2::Ui::Windows auto currentRideEntry = GetRideEntryByIndex(rideEntryIndex); // Skip if vehicle type is not invented yet - if (!RideEntryIsInvented(rideEntryIndex) && !GetGameState().Cheats.ignoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !getGameState().cheats.ignoreResearchStatus) { continue; } @@ -658,7 +663,7 @@ namespace OpenRCT2::Ui::Windows if (rideType == kRideTypeNull) continue; - if (GetRideTypeDescriptor(rideType).Category != currentCategory) + if (EnumValue(GetRideTypeDescriptor(rideType).Category) != currentCategory) continue; nextListItem = IterateOverRideType(rideType, nextListItem, listEnd); @@ -681,7 +686,7 @@ namespace OpenRCT2::Ui::Windows for (auto rideEntryIndex : rideEntries) { // Skip if vehicle type is not invented yet - if (!RideEntryIsInvented(rideEntryIndex) && !GetGameState().Cheats.ignoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !getGameState().cheats.ignoreResearchStatus) continue; // Ride entries @@ -837,7 +842,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_RESEARCH_FUNDING_BUTTON].type = WindowWidgetType::Empty; newWidth = WindowWidth; - newHeight = WindowHeight; + newHeight = kWindowHeight; } else { @@ -847,11 +852,11 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP].type = WindowWidgetType::Groupbox; widgets[WIDX_LAST_DEVELOPMENT_GROUP].type = WindowWidgetType::Groupbox; widgets[WIDX_LAST_DEVELOPMENT_BUTTON].type = WindowWidgetType::FlatBtn; - if (!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) widgets[WIDX_RESEARCH_FUNDING_BUTTON].type = WindowWidgetType::FlatBtn; newWidth = 300; - newHeight = 196; + newHeight = kWindowHeightResearch; } // Handle new window size @@ -957,7 +962,7 @@ namespace OpenRCT2::Ui::Windows DrawTextBasic(dpi, screenPos + ScreenCoordsXY{ 0, 51 }, designCountStringId, ft); // Price - if (!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { // Get price of ride auto startPieceId = GetRideTypeDescriptor(item.Type).StartTrackPiece; @@ -1055,7 +1060,7 @@ namespace OpenRCT2::Ui::Windows void WindowNewRideInitVars() { // If we are in the track designer, default to the Roller Coaster tab - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + if (gLegacyScene == LegacyScene::trackDesigner) { NewRideWindow::SetOpeningPage(ROLLER_COASTER_TAB); } @@ -1083,7 +1088,7 @@ namespace OpenRCT2::Ui::Windows windowMgr->CloseByClass(WindowClass::TrackDesignPlace); window = windowMgr->Create( - WindowClass::ConstructRide, WindowWidth, WindowHeight, WF_10 | WF_AUTO_POSITION); + WindowClass::ConstructRide, WindowWidth, kWindowHeight, WF_10 | WF_AUTO_POSITION); return window; } @@ -1112,6 +1117,6 @@ namespace OpenRCT2::Ui::Windows return; auto rideTypeIndex = rideEntry->GetFirstNonNullRideType(); - w->SetPage(GetRideTypeDescriptor(rideTypeIndex).Category); + w->SetPage(EnumValue(GetRideTypeDescriptor(rideTypeIndex).Category)); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/News.cpp b/src/openrct2-ui/windows/News.cpp index 42ee360b66..c77d57a3ae 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -94,14 +94,14 @@ namespace OpenRCT2::Ui::Windows size_t j = _pressedNewsItemIndex; _pressedNewsItemIndex = -1; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - if (j >= gameState.NewsItems.GetArchived().size()) + if (j >= gameState.newsItems.GetArchived().size()) { return; } - const auto& newsItem = gameState.NewsItems.GetArchived()[j]; + const auto& newsItem = gameState.newsItems.GetArchived()[j]; if (newsItem.HasButton()) { return; @@ -124,7 +124,7 @@ namespace OpenRCT2::Ui::Windows ScreenSize OnScrollGetSize(int32_t scrollIndex) override { - int32_t scrollHeight = static_cast(GetGameState().NewsItems.GetArchived().size()) * CalculateItemHeight(); + int32_t scrollHeight = static_cast(getGameState().newsItems.GetArchived().size()) * CalculateItemHeight(); return { WW, scrollHeight }; } @@ -134,7 +134,7 @@ namespace OpenRCT2::Ui::Windows int32_t i = 0; int32_t buttonIndex = 0; auto mutableScreenCoords = screenCoords; - for (const auto& newsItem : GetGameState().NewsItems.GetArchived()) + for (const auto& newsItem : getGameState().newsItems.GetArchived()) { if (mutableScreenCoords.y < itemHeight) { @@ -181,7 +181,7 @@ namespace OpenRCT2::Ui::Windows int32_t y = 0; int32_t i = 0; - for (const auto& newsItem : GetGameState().NewsItems.GetArchived()) + for (const auto& newsItem : getGameState().newsItems.GetArchived()) { if (y >= dpi.y + dpi.height) break; diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index 69f3895545..db58b3a210 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -838,8 +838,8 @@ namespace OpenRCT2::Ui::Windows Config::Get().general.FullscreenHeight = resolution.Height; if (Config::Get().general.FullscreenMode - == static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) - ContextSetFullscreenMode(static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)); + == static_cast(OpenRCT2::Ui::FullscreenMode::fullscreen)) + ContextSetFullscreenMode(static_cast(OpenRCT2::Ui::FullscreenMode::fullscreen)); Config::Save(); GfxInvalidateScreen(); @@ -879,7 +879,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(static_cast(Config::Get().general.FullscreenHeight)); // Disable resolution dropdown on "Windowed" and "Fullscreen (desktop)" - if (Config::Get().general.FullscreenMode != static_cast(OpenRCT2::Ui::FULLSCREEN_MODE::FULLSCREEN)) + if (Config::Get().general.FullscreenMode != static_cast(OpenRCT2::Ui::FullscreenMode::fullscreen)) { disabled_widgets |= (1uLL << WIDX_RESOLUTION_DROPDOWN); disabled_widgets |= (1uLL << WIDX_RESOLUTION); @@ -1800,7 +1800,7 @@ namespace OpenRCT2::Ui::Windows { windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, numItems, widget->width() - 3); - Dropdown::SetChecked(Config::Get().general.ScenarioSelectMode, true); + Dropdown::SetChecked(EnumValue(Config::Get().general.scenarioSelectMode), true); break; } case WIDX_DEFAULT_INSPECTION_INTERVAL_DROPDOWN: @@ -1847,9 +1847,9 @@ namespace OpenRCT2::Ui::Windows } break; case WIDX_SCENARIO_GROUPING_DROPDOWN: - if (dropdownIndex != Config::Get().general.ScenarioSelectMode) + if (dropdownIndex != EnumValue(Config::Get().general.scenarioSelectMode)) { - Config::Get().general.ScenarioSelectMode = dropdownIndex; + Config::Get().general.scenarioSelectMode = static_cast(dropdownIndex); Config::Get().interface.ScenarioselectLastTab = 0; Config::Save(); Invalidate(); @@ -1898,14 +1898,14 @@ namespace OpenRCT2::Ui::Windows SetCheckboxValue(WIDX_AUTO_OPEN_SHOPS, Config::Get().general.AutoOpenShops); SetCheckboxValue(WIDX_ALLOW_EARLY_COMPLETION, Config::Get().general.AllowEarlyCompletion); - if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_DIFFICULTY) + if (Config::Get().general.scenarioSelectMode == ScenarioSelectMode::difficulty) widgets[WIDX_SCENARIO_GROUPING].text = STR_OPTIONS_SCENARIO_DIFFICULTY; else widgets[WIDX_SCENARIO_GROUPING].text = STR_OPTIONS_SCENARIO_ORIGIN; SetCheckboxValue(WIDX_SCENARIO_UNLOCKING, Config::Get().general.ScenarioUnlockingEnabled); - if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.scenarioSelectMode == ScenarioSelectMode::origin) { disabled_widgets &= ~(1uLL << WIDX_SCENARIO_UNLOCKING); } @@ -2107,6 +2107,10 @@ namespace OpenRCT2::Ui::Windows void SetPage(int32_t p) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == p && !widgets.empty()) + return; + page = p; frame_no = 0; pressed_widgets = 0; @@ -2203,7 +2207,7 @@ namespace OpenRCT2::Ui::Windows static bool IsRCT1TitleMusicAvailable() { auto env = GetContext()->GetPlatformEnvironment(); - auto rct1path = env->GetDirectoryPath(DIRBASE::RCT1); + auto rct1path = env->GetDirectoryPath(DirBase::rct1); return !rct1path.empty(); } diff --git a/src/openrct2-ui/windows/OverwritePrompt.cpp b/src/openrct2-ui/windows/OverwritePrompt.cpp index 3543935cc9..fc1dff6b32 100644 --- a/src/openrct2-ui/windows/OverwritePrompt.cpp +++ b/src/openrct2-ui/windows/OverwritePrompt.cpp @@ -43,14 +43,17 @@ namespace OpenRCT2::Ui::Windows { std::string _name; std::string _path; - int32_t _type; + LoadSaveAction _action; + LoadSaveType _type; TrackDesign* _trackDesign; public: OverwritePromptWindow( - const std::string_view name, const std::string_view path, int32_t type, TrackDesign* trackDesignPtr) + const std::string_view name, const std::string_view path, LoadSaveAction action, LoadSaveType type, + TrackDesign* trackDesignPtr) : _name(name) , _path(path) + , _action(action) , _type(type) , _trackDesign(trackDesignPtr) { @@ -67,7 +70,7 @@ namespace OpenRCT2::Ui::Windows { case WIDX_OVERWRITE_OVERWRITE: { - FileBrowser::Select(_path.c_str(), _type, _trackDesign); + FileBrowser::Select(_path.c_str(), _action, _type, _trackDesign); // As the LoadSaveWindow::Select function can change the order of the // windows we can't use WindowClose(w). @@ -97,14 +100,15 @@ namespace OpenRCT2::Ui::Windows }; WindowBase* WindowOverwritePromptOpen( - const std::string_view name, const std::string_view path, int32_t type, TrackDesign* trackDesignPtr) + const std::string_view name, const std::string_view path, LoadSaveAction action, LoadSaveType type, + TrackDesign* trackDesignPtr) { auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseByClass(WindowClass::LoadsaveOverwritePrompt); return windowMgr->Create( WindowClass::LoadsaveOverwritePrompt, OVERWRITE_WW, OVERWRITE_WH, - WF_TRANSPARENT | WF_STICK_TO_FRONT | WF_CENTRE_SCREEN, name, path, type, trackDesignPtr); + WF_TRANSPARENT | WF_STICK_TO_FRONT | WF_CENTRE_SCREEN, name, path, action, type, trackDesignPtr); } void WindowLoadSaveOverwritePromptInputKey(WindowBase* w, uint32_t keycode) diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index aa700f3cdf..36157c4c29 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -408,12 +407,12 @@ namespace OpenRCT2::Ui::Windows void SetDisabledTabs() { // Disable price tab if money is disabled - disabled_widgets = (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) ? (1uLL << WIDX_TAB_4) : 0; + disabled_widgets = (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) ? (1uLL << WIDX_TAB_4) : 0; } void PrepareWindowTitleText() { - auto parkName = GetGameState().Park.Name.c_str(); + auto parkName = getGameState().park.Name.c_str(); auto ft = Formatter::Common(); ft.Add(STR_STRING); @@ -433,7 +432,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_RENAME: { - auto& park = GetGameState().Park; + auto& park = getGameState().park; WindowTextInputRawOpen( this, WIDX_RENAME, STR_PARK_NAME, STR_ENTER_PARK_NAME, {}, park.Name.c_str(), kUserStringMaxLength); break; @@ -450,7 +449,7 @@ namespace OpenRCT2::Ui::Windows void OnResizeEntrance() { flags |= WF_RESIZABLE; - WindowSetResize(*this, 230, 174 + 9, 230 * 3, (274 + 9) * 3); + WindowSetResize(*this, { 230, 174 + 9 }, { 230 * 3, (274 + 9) * 3 }); InitViewport(); } @@ -466,7 +465,7 @@ namespace OpenRCT2::Ui::Windows WindowDropdownShowText( { windowPos.x + widget.left, windowPos.y + widget.top }, widget.height() + 1, colours[1], 0, 2); - if (GetGameState().Park.IsOpen()) + if (getGameState().park.IsOpen()) { gDropdownDefaultIndex = 0; Dropdown::SetChecked(1, true); @@ -514,7 +513,7 @@ namespace OpenRCT2::Ui::Windows void OnPrepareDrawEntrance() { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); SetWidgets(_pagedWidgets[page]); InitScrollWidgets(); @@ -522,13 +521,13 @@ namespace OpenRCT2::Ui::Windows // Set open / close park button state { - auto parkName = gameState.Park.Name.c_str(); + auto parkName = gameState.park.Name.c_str(); auto ft = Formatter::Common(); ft.Add(STR_STRING); ft.Add(parkName); } - const bool parkIsOpen = gameState.Park.IsOpen(); + const bool parkIsOpen = gameState.park.IsOpen(); widgets[WIDX_OPEN_OR_CLOSE].image = ImageId(parkIsOpen ? SPR_OPEN : SPR_CLOSED); const auto closeLightImage = SPR_G2_RCT1_CLOSE_BUTTON_0 + !parkIsOpen * 2 + WidgetIsPressed(*this, WIDX_CLOSE_LIGHT); @@ -537,13 +536,13 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_OPEN_LIGHT].image = ImageId(openLightImage); // Only allow closing of park for guest / rating objective - if (gameState.ScenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) + if (gameState.scenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) disabled_widgets |= (1uLL << WIDX_OPEN_OR_CLOSE) | (1uLL << WIDX_CLOSE_LIGHT) | (1uLL << WIDX_OPEN_LIGHT); else disabled_widgets &= ~((1uLL << WIDX_OPEN_OR_CLOSE) | (1uLL << WIDX_CLOSE_LIGHT) | (1uLL << WIDX_OPEN_LIGHT)); // Only allow purchase of land when there is money - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) widgets[WIDX_BUY_LAND_RIGHTS].type = WindowWidgetType::Empty; else widgets[WIDX_BUY_LAND_RIGHTS].type = WindowWidgetType::FlatBtn; @@ -562,7 +561,7 @@ namespace OpenRCT2::Ui::Windows if (ThemeGetFlags() & UITHEME_FLAG_USE_LIGHTS_PARK) { widgets[WIDX_OPEN_OR_CLOSE].type = WindowWidgetType::Empty; - if (gameState.ScenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) + if (gameState.scenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) { widgets[WIDX_CLOSE_LIGHT].type = WindowWidgetType::FlatBtn; widgets[WIDX_OPEN_LIGHT].type = WindowWidgetType::FlatBtn; @@ -615,7 +614,7 @@ namespace OpenRCT2::Ui::Windows // Draw park closed / open label auto ft = Formatter(); - ft.Add(GetGameState().Park.IsOpen() ? STR_PARK_OPEN : STR_PARK_CLOSED); + ft.Add(getGameState().park.IsOpen() ? STR_PARK_OPEN : STR_PARK_CLOSED); auto* labelWidget = &widgets[WIDX_STATUS]; DrawTextEllipsised( @@ -628,12 +627,12 @@ namespace OpenRCT2::Ui::Windows if (page != WINDOW_PARK_PAGE_ENTRANCE) return; - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); std::optional newFocus = std::nullopt; - if (!gameState.Park.Entrances.empty()) + if (!gameState.park.Entrances.empty()) { - const auto& entrance = gameState.Park.Entrances[0]; + const auto& entrance = gameState.park.Entrances[0]; newFocus = Focus(CoordsXYZ{ entrance.x + 16, entrance.y + 16, entrance.z + 32 }); } @@ -678,7 +677,7 @@ namespace OpenRCT2::Ui::Windows void OnResizeRating() { flags |= WF_RESIZABLE; - WindowSetResize(*this, 268, 174 + 9, 2000, 2000); + WindowSetResize(*this, { 268, 174 + 9 }, { 2000, 2000 }); } void OnUpdateRating() @@ -701,7 +700,7 @@ namespace OpenRCT2::Ui::Windows _ratingProps.min = 0; _ratingProps.max = 1000; - _ratingProps.series = GetGameState().Park.RatingHistory; + _ratingProps.series = getGameState().park.RatingHistory; const Widget* background = &widgets[WIDX_PAGE_BACKGROUND]; _ratingGraphBounds = { windowPos + ScreenCoordsXY{ background->left + 4, background->top + 15 }, windowPos + ScreenCoordsXY{ background->right - 4, background->bottom - 4 } }; @@ -725,7 +724,7 @@ namespace OpenRCT2::Ui::Windows // Current value Formatter ft; - ft.Add(GetGameState().Park.Rating); + ft.Add(getGameState().park.Rating); DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ widget->left + 3, widget->top + 2 }, STR_PARK_RATING_LABEL, ft); // Graph border @@ -746,7 +745,7 @@ namespace OpenRCT2::Ui::Windows void OnResizeGuests() { flags |= WF_RESIZABLE; - WindowSetResize(*this, 268, 174 + 9, 2000, 2000); + WindowSetResize(*this, { 268, 174 + 9 }, { 2000, 2000 }); } void OnUpdateGuests() @@ -768,8 +767,8 @@ namespace OpenRCT2::Ui::Windows WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_7); AnchorBorderWidgets(); - const auto& gameState = GetGameState(); - _guestProps.series = gameState.GuestsInParkHistory; + const auto& gameState = getGameState(); + _guestProps.series = gameState.guestsInParkHistory; const Widget* background = &widgets[WIDX_PAGE_BACKGROUND]; _guestGraphBounds = { windowPos + ScreenCoordsXY{ background->left + 4, background->top + 15 }, windowPos + ScreenCoordsXY{ background->right - 4, background->bottom - 4 } }; @@ -777,9 +776,9 @@ namespace OpenRCT2::Ui::Windows // Calculate Y axis max and min _guestProps.min = 0; _guestProps.max = 5000; - for (size_t i = 0; i < std::size(gameState.GuestsInParkHistory); i++) + for (size_t i = 0; i < std::size(gameState.guestsInParkHistory); i++) { - auto value = gameState.GuestsInParkHistory[i]; + auto value = gameState.guestsInParkHistory[i]; if (value == kGuestsInParkHistoryUndefined) continue; while (value > _guestProps.max) @@ -805,7 +804,7 @@ namespace OpenRCT2::Ui::Windows // Current value Formatter ft; - ft.Add(GetGameState().NumGuestsInPark); + ft.Add(getGameState().numGuestsInPark); DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ widget->left + 3, widget->top + 2 }, STR_GUESTS_IN_PARK_LABEL, ft); // Graph border @@ -825,24 +824,24 @@ namespace OpenRCT2::Ui::Windows #pragma region Price page void OnResizePrice() { - WindowSetResize(*this, 230, 124, 230, 124); + WindowSetResize(*this, { 230, 124 }, { 230, 124 }); } void OnMouseDownPrice(WidgetIndex widgetIndex) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); switch (widgetIndex) { case WIDX_INCREASE_PRICE: { - const auto newFee = std::min(kMaxEntranceFee, gameState.Park.EntranceFee + 1.00_GBP); + const auto newFee = std::min(kMaxEntranceFee, gameState.park.EntranceFee + 1.00_GBP); auto gameAction = ParkSetEntranceFeeAction(newFee); GameActions::Execute(&gameAction); break; } case WIDX_DECREASE_PRICE: { - const auto newFee = std::max(0.00_GBP, gameState.Park.EntranceFee - 1.00_GBP); + const auto newFee = std::max(0.00_GBP, gameState.park.EntranceFee - 1.00_GBP); auto gameAction = ParkSetEntranceFeeAction(newFee); GameActions::Execute(&gameAction); break; @@ -879,7 +878,7 @@ namespace OpenRCT2::Ui::Windows } // If the entry price is locked at free, disable the widget, unless the unlock_all_prices cheat is active. - if ((GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) || !Park::EntranceFeeUnlocked()) + if ((getGameState().park.Flags & PARK_FLAGS_NO_MONEY) || !Park::EntranceFeeUnlocked()) { widgets[WIDX_PRICE].type = WindowWidgetType::LabelCentred; widgets[WIDX_INCREASE_PRICE].type = WindowWidgetType::Empty; @@ -904,7 +903,7 @@ namespace OpenRCT2::Ui::Windows auto screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 30 }; auto ft = Formatter(); - ft.Add(GetGameState().TotalIncomeFromAdmissions); + ft.Add(getGameState().totalIncomeFromAdmissions); DrawTextBasic(dpi, screenCoords, STR_INCOME_FROM_ADMISSIONS, ft); money64 parkEntranceFee = Park::GetEntranceFee(); @@ -923,7 +922,7 @@ namespace OpenRCT2::Ui::Windows #pragma region Stats page void OnResizeStats() { - WindowSetResize(*this, 230, 119, 230, 119); + WindowSetResize(*this, { 230, 119 }, { 230, 119 }); } void OnUpdateStats() @@ -965,9 +964,9 @@ namespace OpenRCT2::Ui::Windows auto screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 4 }; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Draw park size - auto parkSize = gameState.Park.Size * 10; + auto parkSize = gameState.park.Size * 10; auto stringIndex = STR_PARK_SIZE_METRIC_LABEL; if (Config::Get().general.MeasurementFormat == MeasurementFormat::Imperial) { @@ -999,12 +998,12 @@ namespace OpenRCT2::Ui::Windows // Draw number of guests in park ft = Formatter(); - ft.Add(gameState.NumGuestsInPark); + ft.Add(gameState.numGuestsInPark); DrawTextBasic(dpi, screenCoords, STR_GUESTS_IN_PARK_LABEL, ft); screenCoords.y += kListRowHeight; ft = Formatter(); - ft.Add(gameState.TotalAdmissions); + ft.Add(gameState.totalAdmissions); DrawTextBasic(dpi, screenCoords, STR_TOTAL_ADMISSIONS, ft); } #pragma endregion @@ -1026,10 +1025,10 @@ namespace OpenRCT2::Ui::Windows { #ifndef NO_TTF if (gCurrentTTFFontSet != nullptr) - WindowSetResize(*this, 230, 270, 230, 270); + WindowSetResize(*this, { 230, 270 }, { 230, 270 }); else #endif - WindowSetResize(*this, 230, 226, 230, 226); + WindowSetResize(*this, { 230, 226 }, { 230, 226 }); } void OnUpdateObjective() @@ -1043,7 +1042,7 @@ namespace OpenRCT2::Ui::Windows if (widgetIndex == WIDX_ENTER_NAME && !text.empty()) { std::string strText(text); - ScenarioSuccessSubmitName(GetGameState(), strText.c_str()); + ScenarioSuccessSubmitName(getGameState(), strText.c_str()); Invalidate(); } } @@ -1071,7 +1070,7 @@ namespace OpenRCT2::Ui::Windows PrepareWindowTitleText(); // Show name input button on scenario completion. - if (GetGameState().Park.Flags & PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT) + if (getGameState().park.Flags & PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT) { widgets[WIDX_ENTER_NAME].type = WindowWidgetType::Button; widgets[WIDX_ENTER_NAME].top = height - 19; @@ -1086,7 +1085,7 @@ namespace OpenRCT2::Ui::Windows void OnDrawObjective(DrawPixelInfo& dpi) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); DrawWidgets(dpi); DrawTabImages(dpi); @@ -1095,7 +1094,7 @@ namespace OpenRCT2::Ui::Windows + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 7 }; auto ft = Formatter(); ft.Add(STR_STRING); - ft.Add(gameState.ScenarioDetails.c_str()); + ft.Add(gameState.scenarioDetails.c_str()); screenCoords.y += DrawTextWrapped(dpi, screenCoords, 222, STR_BLACK_STRING, ft); screenCoords.y += 5; @@ -1105,15 +1104,15 @@ namespace OpenRCT2::Ui::Windows // Objective ft = Formatter(); - formatObjective(ft, gameState.ScenarioObjective); + formatObjective(ft, gameState.scenarioObjective); - screenCoords.y += DrawTextWrapped(dpi, screenCoords, 221, kObjectiveNames[gameState.ScenarioObjective.Type], ft); + screenCoords.y += DrawTextWrapped(dpi, screenCoords, 221, kObjectiveNames[gameState.scenarioObjective.Type], ft); screenCoords.y += 5; // Objective outcome - if (gameState.ScenarioCompletedCompanyValue != kMoney64Undefined) + if (gameState.scenarioCompletedCompanyValue != kMoney64Undefined) { - if (gameState.ScenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) + if (gameState.scenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) { // Objective failed DrawTextWrapped(dpi, screenCoords, 222, STR_OBJECTIVE_FAILED); @@ -1122,7 +1121,7 @@ namespace OpenRCT2::Ui::Windows { // Objective completed ft = Formatter(); - ft.Add(gameState.ScenarioCompletedCompanyValue); + ft.Add(gameState.scenarioCompletedCompanyValue); DrawTextWrapped(dpi, screenCoords, 222, STR_OBJECTIVE_ACHIEVED, ft); } } @@ -1132,7 +1131,7 @@ namespace OpenRCT2::Ui::Windows #pragma region Awards page void OnResizeAwards() { - WindowSetResize(*this, 230, 182, 230, 182); + WindowSetResize(*this, { 230, 182 }, { 230, 182 }); } void OnUpdateAwards() @@ -1158,7 +1157,7 @@ namespace OpenRCT2::Ui::Windows auto screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 4 }; - auto& currentAwards = GetGameState().CurrentAwards; + auto& currentAwards = getGameState().currentAwards; for (const auto& award : currentAwards) { @@ -1181,8 +1180,15 @@ namespace OpenRCT2::Ui::Windows // Set listen only to viewport bool listen = false; - if (newPage == WINDOW_PARK_PAGE_ENTRANCE && viewport != nullptr && !(viewport->flags & VIEWPORT_FLAG_SOUND_ON)) - listen = true; + if (newPage == WINDOW_PARK_PAGE_ENTRANCE && page == WINDOW_PARK_PAGE_ENTRANCE && viewport != nullptr) + { + viewport->flags ^= VIEWPORT_FLAG_SOUND_ON; + listen = (viewport->flags & VIEWPORT_FLAG_SOUND_ON) != 0; + } + + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == newPage && !widgets.empty()) + return; page = newPage; frame_no = 0; diff --git a/src/openrct2-ui/windows/PatrolArea.cpp b/src/openrct2-ui/windows/PatrolArea.cpp index 2acdb288db..137b74098a 100644 --- a/src/openrct2-ui/windows/PatrolArea.cpp +++ b/src/openrct2-ui/windows/PatrolArea.cpp @@ -248,10 +248,10 @@ namespace OpenRCT2::Ui::Windows } else { - if (!ToolSet(*this, 0, Tool::WalkDown)) + if (!ToolSet(*this, 0, Tool::walkDown)) { ShowGridlines(); - InputSetFlag(INPUT_FLAG_6, true); + gInputFlags.set(InputFlag::unk6); SetPatrolAreaToRender(_staffId); GfxInvalidateScreen(); } diff --git a/src/openrct2-ui/windows/Player.cpp b/src/openrct2-ui/windows/Player.cpp index 14816a991e..773398525c 100644 --- a/src/openrct2-ui/windows/Player.cpp +++ b/src/openrct2-ui/windows/Player.cpp @@ -33,7 +33,6 @@ namespace OpenRCT2::Ui::Windows #pragma region Widgets - // clang-format off enum WindowPlayerWidgetIdx { WIDX_BACKGROUND, @@ -50,21 +49,20 @@ namespace OpenRCT2::Ui::Windows WIDX_VIEWPORT, }; - #define WINDOW_PLAYER_COMMON_WIDGETS \ - MakeWidget({ 0, 0 }, { 192, 157 }, WindowWidgetType::Frame, WindowColour::Primary), \ - MakeWidget({ 1, 1 }, { 190, 14 }, WindowWidgetType::Caption, WindowColour::Primary, STR_STRING, STR_WINDOW_TITLE_TIP), \ - MakeWidget({ 179, 2 }, { 11, 12 }, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP), \ - MakeWidget({ 0, 43 }, { 192, 114 }, WindowWidgetType::Resize, WindowColour::Secondary), \ - MakeTab({ 3, 17 }), \ + // clang-format off +#define WINDOW_PLAYER_COMMON_WIDGETS \ + WINDOW_SHIM(STR_STRING, 192, 157), \ + MakeWidget({ 0, 43 }, { 192, 114 }, WindowWidgetType::Resize, WindowColour::Secondary), \ + MakeTab({ 3, 17 }), \ MakeTab({ 34, 17 }) static constexpr Widget window_player_overview_widgets[] = { WINDOW_PLAYER_COMMON_WIDGETS, - MakeWidget({ 3, 46}, {175, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Permission group - MakeWidget({167, 47}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ), - MakeWidget({179, 45}, { 12, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_LOCATE), STR_LOCATE_PLAYER_TIP), // Locate button - MakeWidget({179, 69}, { 12, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_KICK_PLAYER_TIP ), // Kick button - MakeWidget({ 3, 60}, {175, 61}, WindowWidgetType::Viewport, WindowColour::Secondary ), // Viewport + MakeWidget({ 3, 46}, {175, 12}, WindowWidgetType::DropdownMenu, WindowColour::Secondary ), // Permission group + MakeWidget({167, 47}, { 11, 10}, WindowWidgetType::Button, WindowColour::Secondary, STR_DROPDOWN_GLYPH ), + MakeWidget({179, 45}, { 12, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_LOCATE), STR_LOCATE_PLAYER_TIP), // Locate button + MakeWidget({179, 69}, { 12, 24}, WindowWidgetType::FlatBtn, WindowColour::Secondary, ImageId(SPR_DEMOLISH), STR_KICK_PLAYER_TIP ), // Kick button + MakeWidget({ 3, 60}, {175, 61}, WindowWidgetType::Viewport, WindowColour::Secondary ), // Viewport }; static constexpr Widget window_player_statistics_widgets[] = { @@ -99,10 +97,9 @@ namespace OpenRCT2::Ui::Windows page = 0; frame_no = 0; list_information_type = 0; - min_width = 210; - min_height = 134; - max_width = 500; - max_height = 450; + + WindowSetResize(*this, { 210, 134 }, { 500, 450 }); + hold_down_widgets = 0; pressed_widgets = 0; SetPage(WINDOW_PLAYER_PAGE_OVERVIEW); @@ -210,6 +207,10 @@ namespace OpenRCT2::Ui::Windows private: void SetPage(int32_t newPage) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == newPage && !widgets.empty()) + return; + int32_t originalPage = page; page = newPage; @@ -338,7 +339,7 @@ namespace OpenRCT2::Ui::Windows void OnResizeOverview() { - WindowSetResize(*this, 240, 170, 500, 300); + WindowSetResize(*this, { 240, 170 }, { 500, 300 }); } void OnUpdateOverview() @@ -569,7 +570,7 @@ namespace OpenRCT2::Ui::Windows void OnResizeStatistics() { - WindowSetResize(*this, 210, 80, 210, 80); + WindowSetResize(*this, { 210, 80 }, { 210, 80 }); } void OnUpdateStatistics() diff --git a/src/openrct2-ui/windows/ProgressWindow.cpp b/src/openrct2-ui/windows/ProgressWindow.cpp index c90eb6a064..6a11c9c12a 100644 --- a/src/openrct2-ui/windows/ProgressWindow.cpp +++ b/src/openrct2-ui/windows/ProgressWindow.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -34,9 +35,7 @@ namespace OpenRCT2::Ui::Windows // clang-format off static constexpr Widget kProgressWindowWidgets[] = { - MakeWidget({ 0, 0}, { kWindowWidth, kWindowHeight}, WindowWidgetType::Frame, WindowColour::Primary ), // panel / background - MakeWidget({ 1, 1}, {kWindowWidth - 3, 14}, WindowWidgetType::Caption, WindowColour::Primary, STR_STRINGID, STR_WINDOW_TITLE_TIP), // title bar - MakeWidget({kWindowWidth - 12, 2}, { 11, 12}, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP), // close x button + WINDOW_SHIM(STR_STRINGID, kWindowWidth, kWindowHeight) }; struct LoaderVehicleStyle @@ -83,16 +82,15 @@ namespace OpenRCT2::Ui::Windows public: void OnOpen() override { + Audio::StopSFX(); SetWidgets(kProgressWindowWidgets); WindowInitScrollWidgets(*this); + WindowSetResize(*this, { kWindowWidth, kWindowHeight }, { kWindowWidth, kWindowHeight }); frame_no = 0; - min_width = kWindowWidth; - min_height = kWindowHeight; - max_width = min_width; - max_height = min_height; ApplyStyle(); + OnResize(); } void OnClose() override diff --git a/src/openrct2-ui/windows/RefurbishRidePrompt.cpp b/src/openrct2-ui/windows/RefurbishRidePrompt.cpp index fd32058dfe..cb1286a740 100644 --- a/src/openrct2-ui/windows/RefurbishRidePrompt.cpp +++ b/src/openrct2-ui/windows/RefurbishRidePrompt.cpp @@ -63,7 +63,7 @@ namespace OpenRCT2::Ui::Windows { case WIDX_REFURBISH: { - auto gameAction = RideDemolishAction(rideId, RIDE_MODIFY_RENEW); + auto gameAction = RideDemolishAction(rideId, RideModifyType::renew); GameActions::Execute(&gameAction); break; } @@ -81,10 +81,10 @@ namespace OpenRCT2::Ui::Windows auto currentRide = GetRide(rideId); if (currentRide != nullptr) { - auto stringId = (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) ? STR_REFURBISH_RIDE_ID_NO_MONEY + auto stringId = (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) ? STR_REFURBISH_RIDE_ID_NO_MONEY : STR_REFURBISH_RIDE_ID_MONEY; auto ft = Formatter(); - currentRide->FormatNameTo(ft); + currentRide->formatNameTo(ft); ft.Add(_demolishRideCost / 2); ScreenCoordsXY stringCoords(windowPos.x + WW / 2, windowPos.y + (WH / 2) - 3); @@ -92,6 +92,11 @@ namespace OpenRCT2::Ui::Windows } } + void OnPrepareDraw() override + { + ResizeFrame(); + } + void OnResize() override { ResizeFrame(); diff --git a/src/openrct2-ui/windows/Research.cpp b/src/openrct2-ui/windows/Research.cpp index 1e4d6f2570..2ff6faffc4 100644 --- a/src/openrct2-ui/windows/Research.cpp +++ b/src/openrct2-ui/windows/Research.cpp @@ -52,7 +52,7 @@ namespace OpenRCT2::Ui::Windows WIDX_LAST_DEVELOPMENT_GROUP, WIDX_LAST_DEVELOPMENT_BUTTON, - WIDX_FUNDING_GROUP = 6, + WIDX_RESEARCH_FUNDING_GROUP = 6, WIDX_RESEARCH_FUNDING, WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON, WIDX_PRIORITIES_GROUP, @@ -129,6 +129,9 @@ namespace OpenRCT2::Ui::Windows void SetPage(int32_t newPageIndex) { + if (page == newPageIndex && !widgets.empty()) + return; + page = newPageIndex; frame_no = 0; RemoveViewport(); @@ -323,26 +326,26 @@ namespace OpenRCT2::Ui::Windows void WindowResearchDevelopmentMouseUp(WidgetIndex widgetIndex, WidgetIndex baseWidgetIndex) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); auto widgetOffset = GetWidgetIndexOffset(baseWidgetIndex, WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP); if (widgetIndex == (WIDX_LAST_DEVELOPMENT_BUTTON + widgetOffset)) { - News::OpenSubject(News::ItemType::Research, gameState.ResearchLastItem->rawValue); + News::OpenSubject(News::ItemType::Research, gameState.researchLastItem->rawValue); } } void WindowResearchDevelopmentPrepareDraw(WindowBase* w, WidgetIndex baseWidgetIndex) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); // Offset the widget index to allow reuse from other windows auto widgetOffset = GetWidgetIndexOffset(baseWidgetIndex, WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP); w->widgets[WIDX_LAST_DEVELOPMENT_BUTTON + widgetOffset].type = WindowWidgetType::Empty; // Display button to link to the last development, if there is one - if (gameState.ResearchLastItem.has_value()) + if (gameState.researchLastItem.has_value()) { - auto type = gameState.ResearchLastItem->type; + auto type = gameState.researchLastItem->type; w->widgets[WIDX_LAST_DEVELOPMENT_BUTTON + widgetOffset].type = WindowWidgetType::FlatBtn; const auto image = type == Research::EntryType::Ride ? SPR_NEW_RIDE : SPR_NEW_SCENERY; w->widgets[WIDX_LAST_DEVELOPMENT_BUTTON + widgetOffset].image = ImageId(image); @@ -351,13 +354,13 @@ namespace OpenRCT2::Ui::Windows void WindowResearchDevelopmentDraw(WindowBase* w, DrawPixelInfo& dpi, WidgetIndex baseWidgetIndex) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); auto widgetOffset = GetWidgetIndexOffset(baseWidgetIndex, WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP); auto screenCoords = w->windowPos + ScreenCoordsXY{ 10, w->widgets[WIDX_CURRENTLY_IN_DEVELOPMENT_GROUP + widgetOffset].top + 12 }; - if (gameState.ResearchProgressStage == RESEARCH_STAGE_FINISHED_ALL) + if (gameState.researchProgressStage == RESEARCH_STAGE_FINISHED_ALL) { // Research type auto ft = Formatter(); @@ -381,53 +384,53 @@ namespace OpenRCT2::Ui::Windows // Research type auto ft = Formatter(); StringId label = STR_RESEARCH_TYPE_LABEL; - if (gameState.ResearchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH) + if (gameState.researchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH) { ft.Add(STR_RESEARCH_UNKNOWN); } - else if (gameState.ResearchProgressStage == RESEARCH_STAGE_DESIGNING) + else if (gameState.researchProgressStage == RESEARCH_STAGE_DESIGNING) { - ft.Add(gameState.ResearchNextItem->GetCategoryName()); + ft.Add(gameState.researchNextItem->GetCategoryName()); } - else if (gameState.ResearchNextItem->type == Research::EntryType::Ride) + else if (gameState.researchNextItem->type == Research::EntryType::Ride) { - const auto& rtd = GetRideTypeDescriptor(gameState.ResearchNextItem->baseRideType); + const auto& rtd = GetRideTypeDescriptor(gameState.researchNextItem->baseRideType); if (rtd.HasFlag(RtdFlag::listVehiclesSeparately)) { - ft.Add(gameState.ResearchNextItem->GetName()); + ft.Add(gameState.researchNextItem->GetName()); } - else if (gameState.ResearchNextItem->flags & RESEARCH_ENTRY_FLAG_FIRST_OF_TYPE) + else if (gameState.researchNextItem->flags & RESEARCH_ENTRY_FLAG_FIRST_OF_TYPE) { ft.Add(rtd.Naming.Name); } else { - ft.Add(gameState.ResearchNextItem->GetName()); + ft.Add(gameState.researchNextItem->GetName()); ft.Add(rtd.Naming.Name); label = STR_RESEARCH_TYPE_LABEL_VEHICLE; } } else { - ft.Add(gameState.ResearchNextItem->GetName()); + ft.Add(gameState.researchNextItem->GetName()); } DrawTextWrapped(dpi, screenCoords, 296, label, ft); screenCoords.y += 25; // Progress ft = Formatter(); - ft.Add(ResearchStageNames[gameState.ResearchProgressStage]); + ft.Add(ResearchStageNames[gameState.researchProgressStage]); DrawTextWrapped(dpi, screenCoords, 296, STR_RESEARCH_PROGRESS_LABEL, ft); screenCoords.y += 15; // Expected ft = Formatter(); - if (gameState.ResearchProgressStage != RESEARCH_STAGE_INITIAL_RESEARCH && gameState.ResearchExpectedDay != 255) + if (gameState.researchProgressStage != RESEARCH_STAGE_INITIAL_RESEARCH && gameState.researchExpectedDay != 255) { // TODO: Should probably use game date format setting ft.Add(STR_RESEARCH_EXPECTED_FORMAT); - ft.Add(DateDayNames[gameState.ResearchExpectedDay]); - ft.Add(DateGameMonthNames[gameState.ResearchExpectedMonth]); + ft.Add(DateDayNames[gameState.researchExpectedDay]); + ft.Add(DateGameMonthNames[gameState.researchExpectedMonth]); } else { @@ -439,30 +442,30 @@ namespace OpenRCT2::Ui::Windows // Last development screenCoords = w->windowPos + ScreenCoordsXY{ 10, w->widgets[WIDX_LAST_DEVELOPMENT_GROUP + widgetOffset].top + 12 }; - if (gameState.ResearchLastItem.has_value()) + if (gameState.researchLastItem.has_value()) { StringId lastDevelopmentFormat = kStringIdEmpty; auto ft = Formatter(); - if (gameState.ResearchLastItem->type == Research::EntryType::Scenery) + if (gameState.researchLastItem->type == Research::EntryType::Scenery) { lastDevelopmentFormat = STR_RESEARCH_SCENERY_LABEL; - ft.Add(gameState.ResearchLastItem->GetName()); + ft.Add(gameState.researchLastItem->GetName()); } else { lastDevelopmentFormat = STR_RESEARCH_RIDE_LABEL; - const auto& rtd = GetRideTypeDescriptor(gameState.ResearchLastItem->baseRideType); + const auto& rtd = GetRideTypeDescriptor(gameState.researchLastItem->baseRideType); if (rtd.HasFlag(RtdFlag::listVehiclesSeparately)) { - ft.Add(gameState.ResearchLastItem->GetName()); + ft.Add(gameState.researchLastItem->GetName()); } - else if (gameState.ResearchLastItem->flags & RESEARCH_ENTRY_FLAG_FIRST_OF_TYPE) + else if (gameState.researchLastItem->flags & RESEARCH_ENTRY_FLAG_FIRST_OF_TYPE) { ft.Add(rtd.Naming.Name); } else { - ft.Add(gameState.ResearchLastItem->GetName()); + ft.Add(gameState.researchLastItem->GetName()); ft.Add(rtd.Naming.Name); lastDevelopmentFormat = STR_RESEARCH_VEHICLE_LABEL; } @@ -478,7 +481,7 @@ namespace OpenRCT2::Ui::Windows void WindowResearchFundingMouseDown(WindowBase* w, WidgetIndex widgetIndex, WidgetIndex baseWidgetIndex) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); auto widgetOffset = GetWidgetIndexOffset(baseWidgetIndex, WIDX_RESEARCH_FUNDING); if (widgetIndex != (WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON + widgetOffset)) @@ -495,13 +498,13 @@ namespace OpenRCT2::Ui::Windows { w->windowPos.x + dropdownWidget->left, w->windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, w->colours[1], 0, Dropdown::Flag::StayOpen, 4, dropdownWidget->width() - 3); - int32_t currentResearchLevel = gameState.ResearchFundingLevel; + int32_t currentResearchLevel = gameState.researchFundingLevel; Dropdown::SetChecked(currentResearchLevel, true); } void WindowResearchFundingMouseUp(WidgetIndex widgetIndex, WidgetIndex baseWidgetIndex) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); auto widgetOffset = GetWidgetIndexOffset(baseWidgetIndex, WIDX_RESEARCH_FUNDING); switch (widgetIndex - widgetOffset) @@ -514,9 +517,9 @@ namespace OpenRCT2::Ui::Windows case WIDX_SHOPS_AND_STALLS: case WIDX_SCENERY_AND_THEMING: { - auto activeResearchTypes = gameState.ResearchPriorities; + auto activeResearchTypes = gameState.researchPriorities; activeResearchTypes ^= 1uLL << (widgetIndex - (WIDX_TRANSPORT_RIDES + widgetOffset)); - auto gameAction = ParkSetResearchFundingAction(activeResearchTypes, gameState.ResearchFundingLevel); + auto gameAction = ParkSetResearchFundingAction(activeResearchTypes, gameState.researchFundingLevel); GameActions::Execute(&gameAction); break; } @@ -525,22 +528,22 @@ namespace OpenRCT2::Ui::Windows void WindowResearchFundingDropdown(WidgetIndex widgetIndex, int32_t selectedIndex, WidgetIndex baseWidgetIndex) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); auto widgetOffset = GetWidgetIndexOffset(baseWidgetIndex, WIDX_RESEARCH_FUNDING); if (widgetIndex != (WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON + widgetOffset) || selectedIndex == -1) return; - auto gameAction = ParkSetResearchFundingAction(gameState.ResearchPriorities, selectedIndex); + auto gameAction = ParkSetResearchFundingAction(gameState.researchPriorities, selectedIndex); GameActions::Execute(&gameAction); } void WindowResearchFundingPrepareDraw(WindowBase* w, WidgetIndex baseWidgetIndex) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); auto widgetOffset = GetWidgetIndexOffset(baseWidgetIndex, WIDX_RESEARCH_FUNDING); - if ((gameState.Park.Flags & PARK_FLAGS_NO_MONEY) || gameState.ResearchProgressStage == RESEARCH_STAGE_FINISHED_ALL) + if ((gameState.park.Flags & PARK_FLAGS_NO_MONEY) || gameState.researchProgressStage == RESEARCH_STAGE_FINISHED_ALL) { w->widgets[WIDX_RESEARCH_FUNDING + widgetOffset].type = WindowWidgetType::Empty; w->widgets[WIDX_RESEARCH_FUNDING_DROPDOWN_BUTTON + widgetOffset].type = WindowWidgetType::Empty; @@ -552,12 +555,12 @@ namespace OpenRCT2::Ui::Windows } // Current funding - int32_t currentResearchLevel = gameState.ResearchFundingLevel; + int32_t currentResearchLevel = gameState.researchFundingLevel; w->widgets[WIDX_RESEARCH_FUNDING + widgetOffset].text = kResearchFundingLevelNames[currentResearchLevel]; // Checkboxes - uint8_t activeResearchTypes = gameState.ResearchPriorities; - int32_t uncompletedResearchTypes = gameState.ResearchUncompletedCategories; + uint8_t activeResearchTypes = gameState.researchPriorities; + int32_t uncompletedResearchTypes = gameState.researchUncompletedCategories; for (int32_t i = 0; i < 7; i++) { int32_t mask = 1 << i; @@ -584,14 +587,15 @@ namespace OpenRCT2::Ui::Windows void WindowResearchFundingDraw(WindowBase* w, DrawPixelInfo& dpi) { - const auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + const auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) return; - int32_t currentResearchLevel = gameState.ResearchFundingLevel; + int32_t currentResearchLevel = gameState.researchFundingLevel; auto ft = Formatter(); ft.Add(research_cost_table[currentResearchLevel]); - DrawTextBasic(dpi, w->windowPos + ScreenCoordsXY{ 10, 77 }, STR_RESEARCH_COST_PER_MONTH, ft); + DrawTextBasic( + dpi, w->windowPos + ScreenCoordsXY{ 10, w->widgets[WIDX_TAB_1].top + 60 }, STR_RESEARCH_COST_PER_MONTH, ft); } #pragma endregion diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index 1bf97c2b07..94eece6ac2 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -79,9 +79,11 @@ using namespace OpenRCT2::TrackMetaData; namespace OpenRCT2::Ui::Windows { + static constexpr int32_t kMinimumWindowWidth = 316; + static constexpr StringId WINDOW_TITLE = STR_RIDE_WINDOW_TITLE; static constexpr int32_t WH = 207; - static constexpr int32_t WW = 316; + static constexpr int32_t WW = kMinimumWindowWidth; enum { @@ -242,7 +244,7 @@ namespace OpenRCT2::Ui::Windows #define MAIN_RIDE_WIDGETS \ WINDOW_SHIM(WINDOW_TITLE, WW, WH), \ - MakeWidget({ 0, 43 }, { 316, 137 }, WindowWidgetType::Resize, WindowColour::Secondary), \ + MakeWidget({ 0, 43}, {kMinimumWindowWidth, 137}, WindowWidgetType::Resize, WindowColour::Secondary), \ MakeTab({ 3, 17 }, STR_VIEW_OF_RIDE_ATTRACTION_TIP), \ MakeTab({ 34, 17 }, STR_VEHICLE_DETAILS_AND_OPTIONS_TIP), \ MakeTab({ 65, 17 }, STR_OPERATING_OPTIONS_TIP), \ @@ -659,15 +661,14 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return 0; - auto* rideEntry = ride->GetRideEntry(); + auto* rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return 0; uint8_t numItems = 0; - for (auto i = 0; i < ride->num_cars_per_train; i++) + for (auto i = 0; i < ride->numCarsPerTrain; i++) { - const auto& carEntry = rideEntry - ->Cars[RideEntryGetVehicleAtPosition(ride->subtype, ride->num_cars_per_train, i)]; + const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition(ride->subtype, ride->numCarsPerTrain, i)]; if (carEntry.isVisible()) numItems++; } @@ -681,17 +682,17 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr || ride->vehicleColourSettings != VehicleColourSettings::perCar) return dropdownIndex; - auto* rideEntry = ride->GetRideEntry(); + auto* rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return dropdownIndex; // `dropdownIndex` will contain a number picked from the visible cars. // Convert this to the actual index. auto carDropdownIndex = -1; - for (auto carIndex = 0; carIndex < ride->num_cars_per_train; carIndex++) + for (auto carIndex = 0; carIndex < ride->numCarsPerTrain; carIndex++) { const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition( - ride->subtype, ride->num_cars_per_train, carIndex)]; + ride->subtype, ride->numCarsPerTrain, carIndex)]; if (!carEntry.isVisible()) continue; @@ -712,17 +713,17 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr || ride->vehicleColourSettings != VehicleColourSettings::perCar) return selectedCarIndex; - auto* rideEntry = ride->GetRideEntry(); + auto* rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return selectedCarIndex; // `selectedCarIndex` will contain an offset that includes invisible cars. // Convert this to the corresponding dropdown index of actually visible cars. auto carDropdownIndex = -1; - for (auto carIndex = 0; carIndex < ride->num_cars_per_train; carIndex++) + for (auto carIndex = 0; carIndex < ride->numCarsPerTrain; carIndex++) { const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition( - ride->subtype, ride->num_cars_per_train, carIndex)]; + ride->subtype, ride->numCarsPerTrain, carIndex)]; if (!carEntry.isVisible()) continue; @@ -752,10 +753,8 @@ namespace OpenRCT2::Ui::Windows list_information_type = 0; picked_peep_frame = 0; DisableTabs(); - min_width = 316; - min_height = 180; - max_width = 500; - max_height = 450; + + WindowSetResize(*this, { kMinimumWindowWidth, 180 }, { 500, 450 }); auto ride = GetRide(rideId); if (ride == nullptr) @@ -1149,9 +1148,15 @@ namespace OpenRCT2::Ui::Windows // Set listen only to viewport bool listen = false; - if (newPage == WINDOW_RIDE_PAGE_MAIN && page == WINDOW_RIDE_PAGE_MAIN && viewport != nullptr - && !(viewport->flags & VIEWPORT_FLAG_SOUND_ON)) - listen = true; + if (newPage == WINDOW_RIDE_PAGE_MAIN && page == WINDOW_RIDE_PAGE_MAIN && viewport != nullptr) + { + viewport->flags ^= VIEWPORT_FLAG_SOUND_ON; + listen = (viewport->flags & VIEWPORT_FLAG_SOUND_ON) != 0; + } + + // Skip setting page if we're already on this page, unless we're initialising the window + if (page == newPage && !widgets.empty()) + return; page = newPage; frame_no = 0; @@ -1220,19 +1225,19 @@ namespace OpenRCT2::Ui::Windows if (ride != nullptr) { int32_t spriteIndex = 0; - switch (ride->GetClassification()) + switch (ride->getClassification()) { - case RideClassification::Ride: + case RideClassification::ride: spriteIndex = SPR_TAB_RIDE_0; if (page == WINDOW_RIDE_PAGE_MAIN) spriteIndex += (frame_no / 4) % 16; break; - case RideClassification::ShopOrStall: + case RideClassification::shopOrStall: spriteIndex = SPR_TAB_SHOPS_AND_STALLS_0; if (page == WINDOW_RIDE_PAGE_MAIN) spriteIndex += (frame_no / 4) % 16; break; - case RideClassification::KioskOrFacility: + case RideClassification::kioskOrFacility: spriteIndex = SPR_TAB_KIOSKS_AND_FACILITIES_0; if (page == WINDOW_RIDE_PAGE_MAIN) spriteIndex += (frame_no / 4) % 8; @@ -1272,7 +1277,7 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; @@ -1286,12 +1291,12 @@ namespace OpenRCT2::Ui::Windows } // For any suspended rides, move image higher in the vehicle tab on the rides window - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isSuspended)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::isSuspended)) { screenCoords.y /= 4; } - const auto vehicle = RideEntryGetVehicleAtPosition(ride->subtype, ride->num_cars_per_train, rideEntry->TabCar); + const auto vehicle = RideEntryGetVehicleAtPosition(ride->subtype, ride->numCarsPerTrain, rideEntry->TabCar); const auto& carEntry = rideEntry->Cars[vehicle]; auto vehicleId = (ride->vehicleColourSettings == VehicleColourSettings::perCar) ? rideEntry->TabCar : 0; @@ -1351,7 +1356,7 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (!rtd.HasFlag(RtdFlag::hasDataLogging)) disabledTabs |= (1uLL << WIDX_TAB_8); // 0x800 @@ -1378,10 +1383,10 @@ namespace OpenRCT2::Ui::Windows } if (rtd.specialType == RtdSpecialType::cashMachine || rtd.specialType == RtdSpecialType::firstAid - || (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) != 0) + || (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) != 0) disabledTabs |= (1uLL << WIDX_TAB_9); // 0x1000 - if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) != 0) + if (gLegacyScene == LegacyScene::trackDesigner) disabledTabs |= (1uLL << WIDX_TAB_4 | 1uLL << WIDX_TAB_6 | 1uLL << WIDX_TAB_9 | 1uLL << WIDX_TAB_10); // 0x3280 const auto* rideEntry = GetRideEntryByIndex(ride->subtype); @@ -1481,17 +1486,17 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return std::nullopt; - int32_t viewSelectionIndex = _viewIndex - 1 - ride->NumTrains; + int32_t viewSelectionIndex = _viewIndex - 1 - ride->numTrains; if (viewSelectionIndex < 0) { return std::nullopt; } - for (const auto& station : ride->GetStations()) + for (const auto& station : ride->getStations()) { if (!station.Start.IsNull() && viewSelectionIndex-- == 0) { - const auto stationIndex = ride->GetStationIndex(&station); + const auto stationIndex = ride->getStationIndex(&station); return std::make_optional(stationIndex); } } @@ -1511,11 +1516,11 @@ namespace OpenRCT2::Ui::Windows std::optional newFocus; - if (viewSelectionIndex >= 0 && viewSelectionIndex < ride->NumTrains - && ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + if (viewSelectionIndex >= 0 && viewSelectionIndex < ride->numTrains + && ride->lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK) { auto vehId = ride->vehicles[viewSelectionIndex]; - const auto* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride->getRideEntry(); if (rideEntry != nullptr && rideEntry->TabCar != 0) { Vehicle* vehicle = GetEntity(vehId); @@ -1533,12 +1538,12 @@ namespace OpenRCT2::Ui::Windows newFocus = Focus(vehId); } } - else if (viewSelectionIndex >= ride->NumTrains && viewSelectionIndex < (ride->NumTrains + ride->num_stations)) + else if (viewSelectionIndex >= ride->numTrains && viewSelectionIndex < (ride->numTrains + ride->numStations)) { auto stationIndex = GetStationIndexFromViewSelection(); if (stationIndex) { - const auto location = ride->GetStation(*stationIndex).GetStart(); + const auto location = ride->getStation(*stationIndex).GetStart(); newFocus = Focus(location); } } @@ -1575,7 +1580,7 @@ namespace OpenRCT2::Ui::Windows focus = newFocus; // rct2: 0x006aec9c only used here so brought it into the function - if (viewport == nullptr && !ride->overall_view.IsNull() && focus.has_value()) + if (viewport == nullptr && !ride->overallView.IsNull() && focus.has_value()) { const auto& viewWidget = widgets[WIDX_VIEWPORT]; @@ -1600,7 +1605,7 @@ namespace OpenRCT2::Ui::Windows auto ride = GetRide(rideId); if (ride != nullptr) { - auto rideName = ride->GetName(); + auto rideName = ride->getName(); WindowTextInputRawOpen( this, WIDX_RENAME, STR_RIDE_ATTRACTION_NAME, STR_ENTER_NEW_NAME_FOR_THIS_RIDE_ATTRACTION, {}, rideName.c_str(), 32); @@ -1660,16 +1665,16 @@ namespace OpenRCT2::Ui::Windows { default: case WIDX_CLOSE_LIGHT: - status = RideStatus::Closed; + status = RideStatus::closed; break; case WIDX_SIMULATE_LIGHT: - status = RideStatus::Simulating; + status = RideStatus::simulating; break; case WIDX_TEST_LIGHT: - status = RideStatus::Testing; + status = RideStatus::testing; break; case WIDX_OPEN_LIGHT: - status = RideStatus::Open; + status = RideStatus::open; break; } auto gameAction = RideSetStatusAction(ride->id, status); @@ -1691,24 +1696,24 @@ namespace OpenRCT2::Ui::Windows if (ride != nullptr) { #ifdef __SIMULATE_IN_RIDE_WINDOW__ - if (ride->SupportsStatus(RideStatus::Simulating)) + if (ride->supportsStatus(RideStatus::simulating)) { minHeight += 14; } #endif - if (ride->SupportsStatus(RideStatus::Testing)) + if (ride->supportsStatus(RideStatus::testing)) { minHeight += 14; } } } - if (GetGameState().Cheats.allowArbitraryRideTypeChanges) + if (getGameState().cheats.allowArbitraryRideTypeChanges) { minHeight += 15; } flags |= WF_RESIZABLE; - WindowSetResize(*this, 316, minHeight, 500, 450); + WindowSetResize(*this, { kMinimumWindowWidth, minHeight }, { 500, 450 }); // Unlike with other windows, the focus needs to be recentred so it’s best to just reset it. focus = std::nullopt; InitViewport(); @@ -1728,10 +1733,10 @@ namespace OpenRCT2::Ui::Windows bool TrainMustBeHidden(const Ride& ride, int32_t trainIndex) const { - if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + if (!(ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) return true; - const auto* rideEntry = ride.GetRideEntry(); + const auto* rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return false; @@ -1748,13 +1753,13 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); int32_t numItems = 1; if (!rtd.HasFlag(RtdFlag::noVehicles)) { - numItems += ride->num_stations; - numItems += ride->NumTrains; + numItems += ride->numStations; + numItems += ride->numTrains; } WindowDropdownShowTextCustomWidth( @@ -1768,7 +1773,7 @@ namespace OpenRCT2::Ui::Windows // Vehicles int32_t name = GetRideComponentName(rtd.NameConvention.vehicle).number; - for (int32_t i = 0; i < ride->NumTrains; i++) + for (int32_t i = 0; i < ride->numTrains; i++) { gDropdownItems[currentItem].Format = STR_DROPDOWN_MENU_LABEL; gDropdownItems[currentItem].Args = name | (currentItem << 16); @@ -1781,7 +1786,7 @@ namespace OpenRCT2::Ui::Windows // Stations name = GetRideComponentName(rtd.NameConvention.station).number; - for (int32_t i = 1; i <= ride->num_stations; i++) + for (int32_t i = 1; i <= ride->numStations; i++) { gDropdownItems[currentItem].Format = STR_DROPDOWN_MENU_LABEL; gDropdownItems[currentItem].Args = name | (i << 16); @@ -1797,23 +1802,23 @@ namespace OpenRCT2::Ui::Windows switch (ride.status) { default: - case RideStatus::Closed: - if ((ride.lifecycle_flags & RIDE_LIFECYCLE_CRASHED) - || (ride.lifecycle_flags & RIDE_LIFECYCLE_HAS_STALLED_VEHICLE)) + case RideStatus::closed: + if ((ride.lifecycleFlags & RIDE_LIFECYCLE_CRASHED) + || (ride.lifecycleFlags & RIDE_LIFECYCLE_HAS_STALLED_VEHICLE)) { - return RideStatus::Closed; + return RideStatus::closed; } - if (ride.SupportsStatus(RideStatus::Testing) && !(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (ride.supportsStatus(RideStatus::testing) && !(ride.lifecycleFlags & RIDE_LIFECYCLE_TESTED)) { - return RideStatus::Testing; + return RideStatus::testing; } - return RideStatus::Open; - case RideStatus::Simulating: - return RideStatus::Testing; - case RideStatus::Testing: - return (ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED) ? RideStatus::Open : RideStatus::Closed; - case RideStatus::Open: - return RideStatus::Closed; + return RideStatus::open; + case RideStatus::simulating: + return RideStatus::testing; + case RideStatus::testing: + return (ride.lifecycleFlags & RIDE_LIFECYCLE_TESTED) ? RideStatus::open : RideStatus::closed; + case RideStatus::open: + return RideStatus::closed; } } @@ -1830,7 +1835,7 @@ namespace OpenRCT2::Ui::Windows void SetDropdown(RideStatusDropdownInfo& info, RideStatus status, StringId text) const { - if (info.Ride->SupportsStatus(status)) + if (info.Ride->supportsStatus(status)) { auto index = info.NumItems; gDropdownItems[index].Format = STR_DROPDOWN_MENU_LABEL; @@ -1856,12 +1861,12 @@ namespace OpenRCT2::Ui::Windows info.CurrentStatus = info.Ride->status; info.DefaultStatus = GetNextDefaultStatus(*info.Ride); - SetDropdown(info, RideStatus::Closed, STR_CLOSE_RIDE); + SetDropdown(info, RideStatus::closed, STR_CLOSE_RIDE); #ifdef __SIMULATE_IN_RIDE_WINDOW__ - SetDropdown(info, RideStatus::Simulating, STR_SIMULATE_RIDE); + SetDropdown(info, RideStatus::simulating, STR_SIMULATE_RIDE); #endif - SetDropdown(info, RideStatus::Testing, STR_TEST_RIDE); - SetDropdown(info, RideStatus::Open, STR_OPEN_RIDE); + SetDropdown(info, RideStatus::testing, STR_TEST_RIDE); + SetDropdown(info, RideStatus::open, STR_OPEN_RIDE); WindowDropdownShowText( { windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0, info.NumItems); Dropdown::SetChecked(info.CheckedIndex, true); @@ -1963,7 +1968,7 @@ namespace OpenRCT2::Ui::Windows WindowDropdownShowText( { windowPos.x + widget->left, windowPos.y + widget->top }, widget->height() + 1, colours[1], 0, 2); gDropdownDefaultIndex = 0; - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack) || _viewIndex == 0 || _viewIndex > ride->NumTrains) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack) || _viewIndex == 0 || _viewIndex > ride->numTrains) { // Disable if we're a flat ride, 'overall view' is selected or a station is selected Dropdown::SetDisabled(1, true); @@ -1975,11 +1980,11 @@ namespace OpenRCT2::Ui::Windows auto* ride = GetRide(rideId); if (ride != nullptr) { - if (!(ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_MAIN)) + if (!(ride->windowInvalidateFlags & RIDE_INVALIDATE_RIDE_MAIN)) { if (_viewIndex > 0) { - if (_viewIndex <= ride->NumTrains) + if (_viewIndex <= ride->numTrains) { Vehicle* vehicle = GetEntity(ride->vehicles[_viewIndex - 1]); if (vehicle != nullptr) @@ -1997,14 +2002,14 @@ namespace OpenRCT2::Ui::Windows void PopulateVehicleTypeDropdown(const Ride& ride, bool forceRefresh = false) { auto& objManager = GetContext()->GetObjectManager(); - const auto* rideEntry = ride.GetRideEntry(); + const auto* rideEntry = ride.getRideEntry(); bool selectionShouldBeExpanded; ride_type_t rideTypeIterator, rideTypeIteratorMax; - const auto& gameState = GetGameState(); - const auto& rtd = ride.GetRideTypeDescriptor(); - if (gameState.Cheats.showVehiclesFromOtherTrackTypes + const auto& gameState = getGameState(); + const auto& rtd = ride.getRideTypeDescriptor(); + if (gameState.cheats.showVehiclesFromOtherTrackTypes && !( rtd.HasFlag(RtdFlag::isFlatRide) || rtd.specialType == RtdSpecialType::maze || rtd.specialType == RtdSpecialType::miniGolf)) @@ -2045,7 +2050,7 @@ namespace OpenRCT2::Ui::Windows continue; // Skip if vehicle type has not been invented yet - if (!RideEntryIsInvented(rideEntryIndex) && !gameState.Cheats.ignoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !gameState.cheats.ignoreResearchStatus) continue; auto name = currentRideEntry->naming.Name; @@ -2137,7 +2142,7 @@ namespace OpenRCT2::Ui::Windows { gDropdownItems[i].Args = _entranceDropdownData[i].LabelId; gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL; - if (_entranceDropdownData[i].EntranceTypeId == ride->entrance_style) + if (_entranceDropdownData[i].EntranceTypeId == ride->entranceStyle) gDropdownItems[i].Format = STR_DROPDOWN_MENU_LABEL_SELECTED; } @@ -2177,10 +2182,10 @@ namespace OpenRCT2::Ui::Windows auto ride = GetRide(rideId); if (ride != nullptr) { - if (dropdownIndex != 0 && dropdownIndex <= ride->NumTrains - && !(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + if (dropdownIndex != 0 && dropdownIndex <= ride->numTrains + && !(ride->lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) { - dropdownIndex = ride->NumTrains + 1; + dropdownIndex = ride->numTrains + 1; } if (dropdownIndex >= gDropdownNumItems) { @@ -2198,7 +2203,7 @@ namespace OpenRCT2::Ui::Windows auto ride = GetRide(rideId); if (ride != nullptr) { - auto status = RideStatus::Closed; + auto status = RideStatus::closed; if (dropdownIndex < 0) { dropdownIndex = gDropdownHighlightedIndex; @@ -2208,16 +2213,16 @@ namespace OpenRCT2::Ui::Windows switch (gDropdownItems[dropdownIndex].Args) { case STR_CLOSE_RIDE: - status = RideStatus::Closed; + status = RideStatus::closed; break; case STR_SIMULATE_RIDE: - status = RideStatus::Simulating; + status = RideStatus::simulating; break; case STR_TEST_RIDE: - status = RideStatus::Testing; + status = RideStatus::testing; break; case STR_OPEN_RIDE: - status = RideStatus::Open; + status = RideStatus::open; break; } } @@ -2271,12 +2276,12 @@ namespace OpenRCT2::Ui::Windows auto ride = GetRide(rideId); if (ride != nullptr) { - if (!(ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_MAIN)) + if (!(ride->windowInvalidateFlags & RIDE_INVALIDATE_RIDE_MAIN)) { if (_viewIndex == 0) return; - if (_viewIndex <= ride->NumTrains) + if (_viewIndex <= ride->numTrains) { Vehicle* vehicle = GetEntity(ride->vehicles[_viewIndex - 1]); if (vehicle == nullptr @@ -2289,7 +2294,7 @@ namespace OpenRCT2::Ui::Windows } } } - ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_MAIN; + ride->windowInvalidateFlags &= ~RIDE_INVALIDATE_RIDE_MAIN; } InvalidateWidget(WIDX_STATUS); } @@ -2323,14 +2328,14 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); disabled_widgets &= ~((1uLL << WIDX_DEMOLISH) | (1uLL << WIDX_CONSTRUCTION)); - if (ride->lifecycle_flags & (RIDE_LIFECYCLE_INDESTRUCTIBLE | RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) - && !gameState.Cheats.makeAllDestructible) + if (ride->lifecycleFlags & (RIDE_LIFECYCLE_INDESTRUCTIBLE | RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) + && !gameState.cheats.makeAllDestructible) disabled_widgets |= (1uLL << WIDX_DEMOLISH); auto ft = Formatter::Common(); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); uint32_t spriteIds[] = { SPR_CLOSED, @@ -2341,31 +2346,31 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_OPEN].image = ImageId(spriteIds[EnumValue(ride->status)]); #ifdef __SIMULATE_IN_RIDE_WINDOW__ - widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + (ride->status == RideStatus::Closed) * 2 + widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + (ride->status == RideStatus::closed) * 2 + WidgetIsPressed(*this, WIDX_CLOSE_LIGHT); - widgets[WIDX_SIMULATE_LIGHT].image = SPR_G2_RCT1_SIMULATE_BUTTON_0 + (ride->status == RideStatus::Simulating) * 2 + widgets[WIDX_SIMULATE_LIGHT].image = SPR_G2_RCT1_SIMULATE_BUTTON_0 + (ride->status == RideStatus::simulating) * 2 + WidgetIsPressed(*w, WIDX_SIMULATE_LIGHT); - widgets[WIDX_TEST_LIGHT].image = SPR_G2_RCT1_TEST_BUTTON_0 + (ride->status == RideStatus::Testing) * 2 + widgets[WIDX_TEST_LIGHT].image = SPR_G2_RCT1_TEST_BUTTON_0 + (ride->status == RideStatus::testing) * 2 + WidgetIsPressed(*this, WIDX_TEST_LIGHT); #else - const auto closeLightImage = SPR_G2_RCT1_CLOSE_BUTTON_0 + (ride->status == RideStatus::Closed) * 2 + const auto closeLightImage = SPR_G2_RCT1_CLOSE_BUTTON_0 + (ride->status == RideStatus::closed) * 2 + WidgetIsPressed(*this, WIDX_CLOSE_LIGHT); widgets[WIDX_CLOSE_LIGHT].image = ImageId(closeLightImage); - auto baseSprite = ride->status == RideStatus::Simulating ? SPR_G2_RCT1_SIMULATE_BUTTON_0 + auto baseSprite = ride->status == RideStatus::simulating ? SPR_G2_RCT1_SIMULATE_BUTTON_0 : SPR_G2_RCT1_TEST_BUTTON_0; const auto testLightImage = baseSprite - + (ride->status == RideStatus::Testing || ride->status == RideStatus::Simulating) * 2 + + (ride->status == RideStatus::testing || ride->status == RideStatus::simulating) * 2 + WidgetIsPressed(*this, WIDX_TEST_LIGHT); widgets[WIDX_TEST_LIGHT].image = ImageId(testLightImage); #endif - const auto openLightImage = SPR_G2_RCT1_OPEN_BUTTON_0 + (ride->status == RideStatus::Open) * 2 + const auto openLightImage = SPR_G2_RCT1_OPEN_BUTTON_0 + (ride->status == RideStatus::open) * 2 + WidgetIsPressed(*this, WIDX_OPEN_LIGHT); widgets[WIDX_OPEN_LIGHT].image = ImageId(openLightImage); AnchorBorderWidgets(); - const int32_t offset = gameState.Cheats.allowArbitraryRideTypeChanges ? 15 : 0; + const int32_t offset = gameState.cheats.allowArbitraryRideTypeChanges ? 15 : 0; // Anchor main page specific widgets widgets[WIDX_VIEWPORT].right = width - 26; widgets[WIDX_VIEWPORT].bottom = height - (14 + offset); @@ -2383,7 +2388,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_RIDE_TYPE_DROPDOWN].top = height - 16; widgets[WIDX_RIDE_TYPE_DROPDOWN].bottom = height - 5; - if (!gameState.Cheats.allowArbitraryRideTypeChanges) + if (!gameState.cheats.allowArbitraryRideTypeChanges) { widgets[WIDX_RIDE_TYPE].type = WindowWidgetType::Empty; widgets[WIDX_RIDE_TYPE_DROPDOWN].type = WindowWidgetType::Empty; @@ -2391,7 +2396,7 @@ namespace OpenRCT2::Ui::Windows else { widgets[WIDX_RIDE_TYPE].type = WindowWidgetType::DropdownMenu; - widgets[WIDX_RIDE_TYPE].text = ride->GetRideTypeDescriptor().Naming.Name; + widgets[WIDX_RIDE_TYPE].text = ride->getRideTypeDescriptor().Naming.Name; widgets[WIDX_RIDE_TYPE_DROPDOWN].type = WindowWidgetType::Button; } @@ -2403,14 +2408,14 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_CLOSE_LIGHT].type = WindowWidgetType::ImgBtn; widgets[WIDX_SIMULATE_LIGHT].type = WindowWidgetType::Empty; #ifdef __SIMULATE_IN_RIDE_WINDOW__ - if (ride->SupportsStatus(RideStatus::Simulating)) + if (ride->supportsStatus(RideStatus::simulating)) widgets[WIDX_SIMULATE_LIGHT].type = WindowWidgetType::ImgBtn; #endif - widgets[WIDX_TEST_LIGHT].type = ride->SupportsStatus(RideStatus::Testing) ? WindowWidgetType::ImgBtn + widgets[WIDX_TEST_LIGHT].type = ride->supportsStatus(RideStatus::testing) ? WindowWidgetType::ImgBtn : WindowWidgetType::Empty; widgets[WIDX_OPEN_LIGHT].type = WindowWidgetType::ImgBtn; - widgetHeight = 62; + widgetHeight = widgets[WIDX_PAGE_BACKGROUND].top + 19; if (widgets[WIDX_SIMULATE_LIGHT].type != WindowWidgetType::Empty) { widgets[WIDX_SIMULATE_LIGHT].top = widgetHeight; @@ -2456,9 +2461,9 @@ namespace OpenRCT2::Ui::Windows auto ride = GetRide(rideId); if (ride != nullptr) { - ride->FormatStatusTo(ft); + ride->formatStatusTo(ft); stringId = STR_BLACK_STRING; - if ((ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) || (ride->lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) + if ((ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) || (ride->lifecycleFlags & RIDE_LIFECYCLE_CRASHED)) { stringId = STR_RED_OUTLINED_STRING; } @@ -2476,7 +2481,7 @@ namespace OpenRCT2::Ui::Windows if (vehicle == nullptr) return kStringIdEmpty; - auto& rtd = ride->GetRideTypeDescriptor(); + auto& rtd = ride->getRideTypeDescriptor(); if (vehicle->status != Vehicle::Status::Crashing && vehicle->status != Vehicle::Status::Crashed) { auto trackType = vehicle->GetTrackType(); @@ -2497,7 +2502,7 @@ namespace OpenRCT2::Ui::Windows return kStringIdEmpty; auto stringId = VehicleStatusNames[EnumValue(vehicle->status)]; - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::singleSession) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::singleSession) && vehicle->status <= Vehicle::Status::UnloadingPassengers) { stringId = SingleSessionVehicleStatusNames[EnumValue(vehicle->status)]; @@ -2506,8 +2511,8 @@ namespace OpenRCT2::Ui::Windows ft.Add(stringId); uint16_t speedInMph = ToHumanReadableSpeed(abs(vehicle->velocity)); ft.Add(speedInMph); - const RideComponentName stationName = GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.station); - ft.Add(ride->num_stations > 1 ? stationName.number : stationName.singular); + const RideComponentName stationName = GetRideComponentName(ride->getRideTypeDescriptor().NameConvention.station); + ft.Add(ride->numStations > 1 ? stationName.number : stationName.singular); ft.Add(vehicle->current_station.ToUnderlying() + 1); if (stringId != STR_CRASHING && stringId != STR_CRASHED_0) @@ -2528,10 +2533,10 @@ namespace OpenRCT2::Ui::Windows return kStringIdNone; } - const auto& station = ride->GetStation(*stationIndex); + const auto& station = ride->getStation(*stationIndex); StringId stringId = kStringIdEmpty; // Entrance / exit - if (ride->status == RideStatus::Closed) + if (ride->status == RideStatus::closed) { if (station.Entrance.IsNull()) stringId = STR_NO_ENTRANCE; @@ -2547,7 +2552,7 @@ namespace OpenRCT2::Ui::Windows if (stringId == kStringIdEmpty) { stringId = STR_QUEUE_EMPTY; - uint16_t queueLength = ride->GetStation(*stationIndex).QueueLength; + uint16_t queueLength = ride->getStation(*stationIndex).QueueLength; if (queueLength == 1) stringId = STR_QUEUE_ONE_PERSON; else if (queueLength > 1) @@ -2569,9 +2574,9 @@ namespace OpenRCT2::Ui::Windows auto ride = GetRide(rideId); if (_viewIndex == 0) return GetStatusOverallView(ft); - if (ride != nullptr && _viewIndex <= ride->NumTrains) + if (ride != nullptr && _viewIndex <= ride->numTrains) return GetStatusVehicle(ft); - if (ride != nullptr && ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride != nullptr && ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) return GetStatusOverallView(ft); return GetStatusStation(ft); } @@ -2597,14 +2602,14 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); if (_viewIndex != 0) { - if (_viewIndex > ride->NumTrains) + if (_viewIndex > ride->numTrains) { - ft.Add(GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.station).number); - ft.Add(_viewIndex - ride->NumTrains); + ft.Add(GetRideComponentName(ride->getRideTypeDescriptor().NameConvention.station).number); + ft.Add(_viewIndex - ride->numTrains); } else { - ft.Add(GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.vehicle).number); + ft.Add(GetRideComponentName(ride->getRideTypeDescriptor().NameConvention.vehicle).number); ft.Add(_viewIndex); } } @@ -2656,7 +2661,7 @@ namespace OpenRCT2::Ui::Windows void VehicleResize() { auto bottom = widgets[WIDX_VEHICLE_TRAINS].bottom + 6; - WindowSetResize(*this, 316, bottom, 316, bottom); + WindowSetResize(*this, { kMinimumWindowWidth, bottom }, { kMinimumWindowWidth, bottom }); } void VehicleOnMouseDown(WidgetIndex widgetIndex) @@ -2671,23 +2676,23 @@ namespace OpenRCT2::Ui::Windows ShowVehicleTypeDropdown(&widgets[widgetIndex]); break; case WIDX_VEHICLE_REVERSED_TRAINS_CHECKBOX: - ride->SetReversedTrains(!ride->HasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)); + ride->setReversedTrains(!ride->hasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)); break; case WIDX_VEHICLE_TRAINS_INCREASE: - if (ride->NumTrains < OpenRCT2::Limits::kMaxTrainsPerRide) - ride->SetNumTrains(ride->NumTrains + 1); + if (ride->numTrains < OpenRCT2::Limits::kMaxTrainsPerRide) + ride->setNumTrains(ride->numTrains + 1); break; case WIDX_VEHICLE_TRAINS_DECREASE: - if (ride->NumTrains > 1) - ride->SetNumTrains(ride->NumTrains - 1); + if (ride->numTrains > 1) + ride->setNumTrains(ride->numTrains - 1); break; case WIDX_VEHICLE_CARS_PER_TRAIN_INCREASE: - if (ride->num_cars_per_train < OpenRCT2::Limits::kMaxCarsPerTrain) - ride->SetNumCarsPerVehicle(ride->num_cars_per_train + 1); + if (ride->numCarsPerTrain < OpenRCT2::Limits::kMaxCarsPerTrain) + ride->setNumCarsPerTrain(ride->numCarsPerTrain + 1); break; case WIDX_VEHICLE_CARS_PER_TRAIN_DECREASE: - if (ride->num_cars_per_train > 1) - ride->SetNumCarsPerVehicle(ride->num_cars_per_train - 1); + if (ride->numCarsPerTrain > 1) + ride->setNumCarsPerTrain(ride->numCarsPerTrain - 1); break; } } @@ -2706,7 +2711,7 @@ namespace OpenRCT2::Ui::Windows if (ride != nullptr) { auto newRideType = _vehicleDropdownData[dropdownIndex].SubTypeId; - ride->SetRideEntry(newRideType); + ride->setRideEntry(newRideType); } } break; @@ -2735,30 +2740,30 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter(); ft.Increment(12); - RideComponentType vehicleType = ride->GetRideTypeDescriptor().NameConvention.vehicle; + RideComponentType vehicleType = ride->getRideTypeDescriptor().NameConvention.vehicle; StringId stringId = GetRideComponentName(vehicleType).count; - if (ride->max_trains > 1) + if (ride->maxTrains > 1) { stringId = GetRideComponentName(vehicleType).count_plural; } ft.Add(stringId); - ft.Add(ride->max_trains); + ft.Add(ride->maxTrains); return { fallback, ft }; } case WIDX_VEHICLE_CARS_PER_TRAIN: case WIDX_VEHICLE_CARS_PER_TRAIN_DECREASE: case WIDX_VEHICLE_CARS_PER_TRAIN_INCREASE: { - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return { kStringIdNone, {} }; auto ft = Formatter(); ft.Increment(16); - ft.Add(std::max(uint8_t(1), ride->MaxCarsPerTrain) - rideEntry->zero_cars); + ft.Add(std::max(uint8_t(1), ride->maxCarsPerTrain) - rideEntry->zero_cars); StringId stringId = GetRideComponentName(RideComponentType::Car).singular; - if (ride->MaxCarsPerTrain - rideEntry->zero_cars > 1) + if (ride->maxCarsPerTrain - rideEntry->zero_cars > 1) { stringId = GetRideComponentName(RideComponentType::Car).plural; } @@ -2780,19 +2785,19 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - const auto* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride->getRideEntry(); widgets[WIDX_TITLE].text = STR_ARG_20_STRINGID; // Widget setup - carsPerTrain = ride->num_cars_per_train - rideEntry->zero_cars; + carsPerTrain = ride->numCarsPerTrain - rideEntry->zero_cars; // Vehicle type widgets[WIDX_VEHICLE_TYPE].text = rideEntry->naming.Name; - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); // Trains - if (rideEntry->cars_per_flat_ride > 1 || gameState.Cheats.disableTrainLengthLimit) + if (rideEntry->cars_per_flat_ride > 1 || gameState.cheats.disableTrainLengthLimit) { widgets[WIDX_VEHICLE_TRAINS].type = WindowWidgetType::Spinner; widgets[WIDX_VEHICLE_TRAINS_INCREASE].type = WindowWidgetType::Button; @@ -2806,7 +2811,7 @@ namespace OpenRCT2::Ui::Windows } // Cars per train - if (rideEntry->zero_cars + 1 < rideEntry->max_cars_in_train || gameState.Cheats.disableTrainLengthLimit) + if (rideEntry->zero_cars + 1 < rideEntry->max_cars_in_train || gameState.cheats.disableTrainLengthLimit) { widgets[WIDX_VEHICLE_CARS_PER_TRAIN].type = WindowWidgetType::Spinner; widgets[WIDX_VEHICLE_CARS_PER_TRAIN_INCREASE].type = WindowWidgetType::Button; @@ -2819,11 +2824,11 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_VEHICLE_CARS_PER_TRAIN_DECREASE].type = WindowWidgetType::Empty; } - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::allowReversedTrains) - || (gameState.Cheats.disableTrainLengthLimit && !ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide))) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::allowReversedTrains) + || (gameState.cheats.disableTrainLengthLimit && !ride->getRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide))) { widgets[WIDX_VEHICLE_REVERSED_TRAINS_CHECKBOX].type = WindowWidgetType::Checkbox; - if (ride->HasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)) + if (ride->hasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)) { pressed_widgets |= (1uLL << WIDX_VEHICLE_REVERSED_TRAINS_CHECKBOX); } @@ -2840,23 +2845,23 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter::Common(); ft.Increment(6); ft.Add(carsPerTrain); - RideComponentType vehicleType = ride->GetRideTypeDescriptor().NameConvention.vehicle; + RideComponentType vehicleType = ride->getRideTypeDescriptor().NameConvention.vehicle; stringId = GetRideComponentName(vehicleType).count; - if (ride->NumTrains > 1) + if (ride->numTrains > 1) { stringId = GetRideComponentName(vehicleType).count_plural; } ft.Add(stringId); - ft.Add(ride->NumTrains); + ft.Add(ride->numTrains); ft.Increment(8); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); AnchorBorderWidgets(); WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_10); - if (abs(ride->num_cars_per_train - rideEntry->zero_cars) == 1) + if (abs(ride->numCarsPerTrain - rideEntry->zero_cars) == 1) { widgets[WIDX_VEHICLE_CARS_PER_TRAIN].text = STR_1_CAR_PER_TRAIN; } @@ -2875,12 +2880,11 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; - auto screenCoords = windowPos + ScreenCoordsXY{ 8, 64 }; - + auto screenCoords = windowPos + ScreenCoordsXY{ 8, widgets[WIDX_VEHICLE_TYPE_DROPDOWN].bottom + 5 }; // Description auto ft = Formatter(); ft.Add(rideEntry->naming.Description); @@ -2960,24 +2964,24 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - const auto* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride->getRideEntry(); // Background GfxFillRect(dpi, { { dpi.x, dpi.y }, { dpi.x + dpi.width, dpi.y + dpi.height } }, PALETTE_INDEX_12); Widget* widget = &widgets[WIDX_VEHICLE_TRAINS_PREVIEW]; - int32_t startX = std::max(2, (widget->width() - ((ride->NumTrains - 1) * 36)) / 2 - 25); + int32_t startX = std::max(2, (widget->width() - ((ride->numTrains - 1) * 36)) / 2 - 25); int32_t startY = widget->height() - 4; - bool isReversed = ride->HasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS); - int32_t carIndex = (isReversed) ? ride->num_cars_per_train - 1 : 0; + bool isReversed = ride->hasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS); + int32_t carIndex = (isReversed) ? ride->numCarsPerTrain - 1 : 0; const auto& firstCarEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition( - ride->subtype, ride->num_cars_per_train, carIndex)]; + ride->subtype, ride->numCarsPerTrain, carIndex)]; startY += firstCarEntry.tab_height; // For each train - for (int32_t i = 0; i < ride->NumTrains; i++) + for (int32_t i = 0; i < ride->numTrains; i++) { VehicleDrawInfo trainCarImages[OpenRCT2::Limits::kMaxCarsPerTrain]; VehicleDrawInfo* nextSpriteToDraw = trainCarImages; @@ -2985,13 +2989,13 @@ namespace OpenRCT2::Ui::Windows int32_t y = startY; // For each car in train - static_assert(std::numeric_limitsnum_cars_per_train)>::max() <= std::size(trainCarImages)); - for (int32_t j = 0; j < ride->num_cars_per_train; j++) + static_assert(std::numeric_limitsnumCarsPerTrain)>::max() <= std::size(trainCarImages)); + for (int32_t j = 0; j < ride->numCarsPerTrain; j++) { - carIndex = (isReversed) ? (ride->num_cars_per_train - 1) - j : j; + carIndex = (isReversed) ? (ride->numCarsPerTrain - 1) - j : j; const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition( - ride->subtype, ride->num_cars_per_train, carIndex)]; + ride->subtype, ride->numCarsPerTrain, carIndex)]; x += carEntry.spacing / 17432; y -= (carEntry.spacing / 2) / 17432; @@ -3035,7 +3039,7 @@ namespace OpenRCT2::Ui::Windows y -= (carEntry.spacing / 2) / 17432; } - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::layeredVehiclePreview)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::layeredVehiclePreview)) { VehicleDrawInfo tmp = *(nextSpriteToDraw - 1); *(nextSpriteToDraw - 1) = *(nextSpriteToDraw - 2); @@ -3060,20 +3064,20 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - const auto& operatingSettings = ride->GetRideTypeDescriptor().OperatingSettings; - const auto& gameState = GetGameState(); + const auto& operatingSettings = ride->getRideTypeDescriptor().OperatingSettings; + const auto& gameState = getGameState(); uint8_t maxValue = operatingSettings.MaxValue; - uint8_t minValue = gameState.Cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; + uint8_t minValue = gameState.cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; - if (gameState.Cheats.unlockOperatingLimits) + if (gameState.cheats.unlockOperatingLimits) { maxValue = OpenRCT2::Limits::kCheatsMaxOperatingLimit; } - uint8_t increment = ride->mode == RideMode::Dodgems ? 10 : 1; + uint8_t increment = ride->mode == RideMode::dodgems ? 10 : 1; SetOperatingSetting( - rideId, RideSetSetting::Operation, std::clamp(ride->operation_option + increment, minValue, maxValue)); + rideId, RideSetSetting::Operation, std::clamp(ride->operationOption + increment, minValue, maxValue)); } void ModeTweakDecrease() @@ -3082,19 +3086,19 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - const auto& operatingSettings = ride->GetRideTypeDescriptor().OperatingSettings; - const auto& gameState = GetGameState(); + const auto& operatingSettings = ride->getRideTypeDescriptor().OperatingSettings; + const auto& gameState = getGameState(); uint8_t maxValue = operatingSettings.MaxValue; - uint8_t minValue = gameState.Cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; - if (gameState.Cheats.unlockOperatingLimits) + uint8_t minValue = gameState.cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; + if (gameState.cheats.unlockOperatingLimits) { maxValue = OpenRCT2::Limits::kCheatsMaxOperatingLimit; } - uint8_t decrement = ride->mode == RideMode::Dodgems ? 10 : 1; + uint8_t decrement = ride->mode == RideMode::dodgems ? 10 : 1; SetOperatingSetting( - rideId, RideSetSetting::Operation, std::clamp(ride->operation_option - decrement, minValue, maxValue)); + rideId, RideSetSetting::Operation, std::clamp(ride->operationOption - decrement, minValue, maxValue)); } void ModeDropdown(Widget* widget) @@ -3106,12 +3110,12 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto availableModes = ride->GetAvailableModes(); + auto availableModes = ride->getAvailableModes(); // Create dropdown list auto numAvailableModes = 0; auto checkedIndex = -1; - for (auto i = 0; i < static_cast(RideMode::Count); i++) + for (auto i = 0; i < static_cast(RideMode::count); i++) { if (availableModes & (1uLL << i)) { @@ -3151,7 +3155,7 @@ namespace OpenRCT2::Ui::Windows { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, 5, widget->right - dropdownWidget->left); - Dropdown::SetChecked(ride->depart_flags & RIDE_DEPART_WAIT_FOR_LOAD_MASK, true); + Dropdown::SetChecked(ride->departFlags & RIDE_DEPART_WAIT_FOR_LOAD_MASK, true); } void OperatingOnMouseUp(WidgetIndex widgetIndex) @@ -3178,30 +3182,31 @@ namespace OpenRCT2::Ui::Windows SetPage(widgetIndex - WIDX_TAB_1); break; case WIDX_LOAD_CHECKBOX: - SetOperatingSetting(rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_WAIT_FOR_LOAD); + SetOperatingSetting(rideId, RideSetSetting::Departure, ride->departFlags ^ RIDE_DEPART_WAIT_FOR_LOAD); break; case WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX: SetOperatingSetting( - rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_LEAVE_WHEN_ANOTHER_ARRIVES); + rideId, RideSetSetting::Departure, ride->departFlags ^ RIDE_DEPART_LEAVE_WHEN_ANOTHER_ARRIVES); break; case WIDX_MINIMUM_LENGTH_CHECKBOX: SetOperatingSetting( - rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH); + rideId, RideSetSetting::Departure, ride->departFlags ^ RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH); break; case WIDX_MAXIMUM_LENGTH_CHECKBOX: SetOperatingSetting( - rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_WAIT_FOR_MAXIMUM_LENGTH); + rideId, RideSetSetting::Departure, ride->departFlags ^ RIDE_DEPART_WAIT_FOR_MAXIMUM_LENGTH); break; case WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX: SetOperatingSetting( - rideId, RideSetSetting::Departure, ride->depart_flags ^ RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS); + rideId, RideSetSetting::Departure, ride->departFlags ^ RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS); break; } } void OperatingResize() { - WindowSetResize(*this, 316, 186, 316, 186); + auto bottom = widgets[WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX].bottom + 6; + WindowSetResize(*this, { kMinimumWindowWidth, bottom }, { kMinimumWindowWidth, bottom }); } void OperatingOnMouseDown(WidgetIndex widgetIndex) @@ -3223,26 +3228,26 @@ namespace OpenRCT2::Ui::Windows ModeTweakDecrease(); break; case WIDX_LIFT_HILL_SPEED_INCREASE: - upperBound = GetGameState().Cheats.unlockOperatingLimits + upperBound = getGameState().cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit - : ride->GetRideTypeDescriptor().LiftData.maximum_speed; - lowerBound = GetGameState().Cheats.unlockOperatingLimits + : ride->getRideTypeDescriptor().LiftData.maximum_speed; + lowerBound = getGameState().cheats.unlockOperatingLimits ? 0 - : ride->GetRideTypeDescriptor().LiftData.minimum_speed; + : ride->getRideTypeDescriptor().LiftData.minimum_speed; SetOperatingSetting( rideId, RideSetSetting::LiftHillSpeed, - std::clamp(ride->lift_hill_speed + 1, lowerBound, upperBound)); + std::clamp(ride->liftHillSpeed + 1, lowerBound, upperBound)); break; case WIDX_LIFT_HILL_SPEED_DECREASE: - upperBound = GetGameState().Cheats.unlockOperatingLimits + upperBound = getGameState().cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit - : ride->GetRideTypeDescriptor().LiftData.maximum_speed; - lowerBound = GetGameState().Cheats.unlockOperatingLimits + : ride->getRideTypeDescriptor().LiftData.maximum_speed; + lowerBound = getGameState().cheats.unlockOperatingLimits ? 0 - : ride->GetRideTypeDescriptor().LiftData.minimum_speed; + : ride->getRideTypeDescriptor().LiftData.minimum_speed; SetOperatingSetting( rideId, RideSetSetting::LiftHillSpeed, - std::clamp(ride->lift_hill_speed - 1, lowerBound, upperBound)); + std::clamp(ride->liftHillSpeed - 1, lowerBound, upperBound)); break; case WIDX_MINIMUM_LENGTH: OperatingLengthWindow(WIDX_MINIMUM_LENGTH); @@ -3255,28 +3260,28 @@ namespace OpenRCT2::Ui::Windows lowerBound = 0; SetOperatingSetting( rideId, RideSetSetting::MinWaitingTime, - std::clamp(ride->min_waiting_time + 1, lowerBound, upperBound)); + std::clamp(ride->minWaitingTime + 1, lowerBound, upperBound)); break; case WIDX_MINIMUM_LENGTH_DECREASE: upperBound = OpenRCT2::Limits::kMaxWaitingTime; lowerBound = 0; SetOperatingSetting( rideId, RideSetSetting::MinWaitingTime, - std::clamp(ride->min_waiting_time - 1, lowerBound, upperBound)); + std::clamp(ride->minWaitingTime - 1, lowerBound, upperBound)); break; case WIDX_MAXIMUM_LENGTH_INCREASE: upperBound = OpenRCT2::Limits::kMaxWaitingTime; lowerBound = 0; SetOperatingSetting( rideId, RideSetSetting::MaxWaitingTime, - std::clamp(ride->max_waiting_time + 1, lowerBound, upperBound)); + std::clamp(ride->maxWaitingTime + 1, lowerBound, upperBound)); break; case WIDX_MAXIMUM_LENGTH_DECREASE: upperBound = OpenRCT2::Limits::kMaxWaitingTime; lowerBound = 0; SetOperatingSetting( rideId, RideSetSetting::MaxWaitingTime, - std::clamp(ride->max_waiting_time - 1, lowerBound, upperBound)); + std::clamp(ride->maxWaitingTime - 1, lowerBound, upperBound)); break; case WIDX_MODE_DROPDOWN: ModeDropdown(&widgets[widgetIndex]); @@ -3285,20 +3290,20 @@ namespace OpenRCT2::Ui::Windows LoadDropdown(&widgets[widgetIndex]); break; case WIDX_OPERATE_NUMBER_OF_CIRCUITS_INCREASE: - upperBound = GetGameState().Cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit + upperBound = getGameState().cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : OpenRCT2::Limits::kMaxCircuitsPerRide; lowerBound = 1; SetOperatingSetting( rideId, RideSetSetting::NumCircuits, - std::clamp(ride->num_circuits + 1, lowerBound, upperBound)); + std::clamp(ride->numCircuits + 1, lowerBound, upperBound)); break; case WIDX_OPERATE_NUMBER_OF_CIRCUITS_DECREASE: - upperBound = GetGameState().Cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit + upperBound = getGameState().cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : OpenRCT2::Limits::kMaxCircuitsPerRide; lowerBound = 1; SetOperatingSetting( rideId, RideSetSetting::NumCircuits, - std::clamp(ride->num_circuits - 1, lowerBound, upperBound)); + std::clamp(ride->numCircuits - 1, lowerBound, upperBound)); break; } } @@ -3315,7 +3320,7 @@ namespace OpenRCT2::Ui::Windows ft.Add(lowerBound); ft.Add(upperBound); auto title = (widgetIndex == WIDX_MINIMUM_LENGTH) ? STR_MINIMUM_WAITING_TIME : STR_MAXIMUM_WAITING_TIME; - auto currentValue = (widgetIndex == WIDX_MINIMUM_LENGTH) ? ride->min_waiting_time : ride->max_waiting_time; + auto currentValue = (widgetIndex == WIDX_MINIMUM_LENGTH) ? ride->minWaitingTime : ride->maxWaitingTime; char buffer[5]{}; snprintf(buffer, std::size(buffer), "%u", currentValue); WindowTextInputRawOpen(this, widgetIndex, title, STR_ENTER_VALUE, ft, buffer, 4); @@ -3325,29 +3330,29 @@ namespace OpenRCT2::Ui::Windows { switch (ride.mode) { - case RideMode::PoweredLaunchPasstrough: - case RideMode::PoweredLaunch: - case RideMode::UpwardLaunch: - case RideMode::PoweredLaunchBlockSectioned: - case RideMode::StationToStation: - case RideMode::Dodgems: + case RideMode::poweredLaunchPasstrough: + case RideMode::poweredLaunch: + case RideMode::upwardLaunch: + case RideMode::poweredLaunchBlockSectioned: + case RideMode::stationToStation: + case RideMode::dodgems: return; default: break; } - const auto& operatingSettings = ride.GetRideTypeDescriptor().OperatingSettings; - const auto& gameState = GetGameState(); - int16_t maxValue = gameState.Cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit + const auto& operatingSettings = ride.getRideTypeDescriptor().OperatingSettings; + const auto& gameState = getGameState(); + int16_t maxValue = gameState.cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : operatingSettings.MaxValue; - int16_t minValue = gameState.Cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; + int16_t minValue = gameState.cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; const auto& title = widgets[WIDX_MODE_TWEAK_LABEL].text; Formatter ft; ft.Add(minValue * operatingSettings.OperatingSettingMultiplier); ft.Add(maxValue * operatingSettings.OperatingSettingMultiplier); - uint16_t currentValue = static_cast(ride.operation_option) * operatingSettings.OperatingSettingMultiplier; + uint16_t currentValue = static_cast(ride.operationOption) * operatingSettings.OperatingSettingMultiplier; char buffer[6]{}; snprintf(buffer, std::size(buffer), "%u", currentValue); @@ -3367,10 +3372,10 @@ namespace OpenRCT2::Ui::Windows { case WIDX_MODE_DROPDOWN: { - RideMode rideMode = RideMode::NullMode; - auto availableModes = ride->GetAvailableModes(); + RideMode rideMode = RideMode::nullMode; + auto availableModes = ride->getAvailableModes(); auto modeInDropdownIndex = -1; - for (RideMode rideModeIndex = RideMode::Normal; rideModeIndex < RideMode::Count; rideModeIndex++) + for (RideMode rideModeIndex = RideMode::normal; rideModeIndex < RideMode::count; rideModeIndex++) { if (availableModes & EnumToFlag(rideModeIndex)) { @@ -3382,14 +3387,14 @@ namespace OpenRCT2::Ui::Windows } } } - if (rideMode != RideMode::NullMode) + if (rideMode != RideMode::nullMode) SetOperatingSetting(rideId, RideSetSetting::Mode, static_cast(rideMode)); break; } case WIDX_LOAD_DROPDOWN: SetOperatingSetting( rideId, RideSetSetting::Departure, - (ride->depart_flags & ~RIDE_DEPART_WAIT_FOR_LOAD_MASK) | dropdownIndex); + (ride->departFlags & ~RIDE_DEPART_WAIT_FOR_LOAD_MASK) | dropdownIndex); break; } } @@ -3401,9 +3406,9 @@ namespace OpenRCT2::Ui::Windows InvalidateWidget(WIDX_TAB_3); auto ride = GetRide(rideId); - if (ride != nullptr && ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_OPERATING) + if (ride != nullptr && ride->windowInvalidateFlags & RIDE_INVALIDATE_RIDE_OPERATING) { - ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_OPERATING; + ride->windowInvalidateFlags &= ~RIDE_INVALIDATE_RIDE_OPERATING; Invalidate(); } } @@ -3419,12 +3424,12 @@ namespace OpenRCT2::Ui::Windows if (widgetIndex == WIDX_MODE_TWEAK) { - const auto& operatingSettings = ride->GetRideTypeDescriptor().OperatingSettings; - const auto& gameState = GetGameState(); - uint32_t maxValue = gameState.Cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit + const auto& operatingSettings = ride->getRideTypeDescriptor().OperatingSettings; + const auto& gameState = getGameState(); + uint32_t maxValue = gameState.cheats.unlockOperatingLimits ? OpenRCT2::Limits::kCheatsMaxOperatingLimit : operatingSettings.MaxValue; - uint32_t minValue = gameState.Cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; - auto multiplier = ride->GetRideTypeDescriptor().OperatingSettings.OperatingSettingMultiplier; + uint32_t minValue = gameState.cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; + auto multiplier = ride->getRideTypeDescriptor().OperatingSettings.OperatingSettingMultiplier; try { @@ -3468,7 +3473,7 @@ namespace OpenRCT2::Ui::Windows return; auto ft = Formatter::Common(); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); // Widget setup pressed_widgets &= ~( @@ -3477,7 +3482,7 @@ namespace OpenRCT2::Ui::Windows | (1uLL << WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX)); // Sometimes, only one of the alternatives support lift hill pieces. Make sure to check both. - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); bool hasAlternativeType = rtd.HasFlag(RtdFlag::hasInvertedVariant); if (rtd.TrackPaintFunctions.Regular.SupportsTrackGroup(TrackGroup::liftHill) || (hasAlternativeType && rtd.InvertedTrackPaintFunctions.Regular.SupportsTrackGroup(TrackGroup::liftHill))) @@ -3488,7 +3493,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_LIFT_HILL_SPEED_DECREASE].type = WindowWidgetType::Button; ft.Rewind(); ft.Increment(20); - ft.Add(ride->lift_hill_speed); + ft.Add(ride->liftHillSpeed); } else { @@ -3499,7 +3504,7 @@ namespace OpenRCT2::Ui::Windows } // Number of circuits - if (ride->CanHaveMultipleCircuits()) + if (ride->canHaveMultipleCircuits()) { widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS_LABEL].type = WindowWidgetType::Label; widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS].type = WindowWidgetType::Spinner; @@ -3507,7 +3512,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_OPERATE_NUMBER_OF_CIRCUITS_DECREASE].type = WindowWidgetType::Button; ft.Rewind(); ft.Increment(22); - ft.Add(ride->num_circuits); + ft.Add(ride->numCircuits); } else { @@ -3518,12 +3523,12 @@ namespace OpenRCT2::Ui::Windows } // Leave if another vehicle arrives at station - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation) - && ride->NumTrains > 1 && !ride->IsBlockSectioned()) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation) + && ride->numTrains > 1 && !ride->isBlockSectioned()) { widgets[WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX].type = WindowWidgetType::Checkbox; widgets[WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX].tooltip = STR_LEAVE_IF_ANOTHER_VEHICLE_ARRIVES_TIP; - widgets[WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX].text = ride->GetRideTypeDescriptor().NameConvention.vehicle + widgets[WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX].text = ride->getRideTypeDescriptor().NameConvention.vehicle == RideComponentType::Boat ? STR_LEAVE_IF_ANOTHER_BOAT_ARRIVES : STR_LEAVE_IF_ANOTHER_TRAIN_ARRIVES; @@ -3534,7 +3539,7 @@ namespace OpenRCT2::Ui::Windows } // Synchronise with adjacent stations - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::canSynchroniseWithAdjacentStations)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::canSynchroniseWithAdjacentStations)) { widgets[WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX].type = WindowWidgetType::Checkbox; widgets[WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX].text = STR_SYNCHRONISE_WITH_ADJACENT_STATIONS; @@ -3549,8 +3554,8 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_MODE].text = kRideModeNames[EnumValue(ride->mode)]; // Waiting - widgets[WIDX_LOAD].text = VehicleLoadNames[(ride->depart_flags & RIDE_DEPART_WAIT_FOR_LOAD_MASK)]; - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasLoadOptions)) + widgets[WIDX_LOAD].text = VehicleLoadNames[(ride->departFlags & RIDE_DEPART_WAIT_FOR_LOAD_MASK)]; + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasLoadOptions)) { widgets[WIDX_LOAD_CHECKBOX].type = WindowWidgetType::Checkbox; widgets[WIDX_LOAD].type = WindowWidgetType::DropdownMenu; @@ -3569,11 +3574,11 @@ namespace OpenRCT2::Ui::Windows ft.Rewind(); ft.Increment(10); ft.Add(STR_FORMAT_SECONDS); - ft.Add(ride->min_waiting_time); + ft.Add(ride->minWaitingTime); ft.Add(STR_FORMAT_SECONDS); - ft.Add(ride->max_waiting_time); + ft.Add(ride->maxWaitingTime); - if (ride->depart_flags & RIDE_DEPART_WAIT_FOR_LOAD) + if (ride->departFlags & RIDE_DEPART_WAIT_FOR_LOAD) pressed_widgets |= (1uLL << WIDX_LOAD_CHECKBOX); } else @@ -3593,34 +3598,34 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_MAXIMUM_LENGTH_DECREASE].type = WindowWidgetType::Empty; } - if (ride->depart_flags & RIDE_DEPART_LEAVE_WHEN_ANOTHER_ARRIVES) + if (ride->departFlags & RIDE_DEPART_LEAVE_WHEN_ANOTHER_ARRIVES) pressed_widgets |= (1uLL << WIDX_LEAVE_WHEN_ANOTHER_ARRIVES_CHECKBOX); - if (ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) + if (ride->departFlags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) pressed_widgets |= (1uLL << WIDX_SYNCHRONISE_WITH_ADJACENT_STATIONS_CHECKBOX); - if (ride->depart_flags & RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH) + if (ride->departFlags & RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH) pressed_widgets |= (1uLL << WIDX_MINIMUM_LENGTH_CHECKBOX); - if (ride->depart_flags & RIDE_DEPART_WAIT_FOR_MAXIMUM_LENGTH) + if (ride->departFlags & RIDE_DEPART_WAIT_FOR_MAXIMUM_LENGTH) pressed_widgets |= (1uLL << WIDX_MAXIMUM_LENGTH_CHECKBOX); // Mode specific functionality - auto multiplier = ride->GetRideTypeDescriptor().OperatingSettings.OperatingSettingMultiplier; + auto multiplier = ride->getRideTypeDescriptor().OperatingSettings.OperatingSettingMultiplier; ft.Rewind(); ft.Increment(18); - ft.Add(static_cast(ride->operation_option) * multiplier); + ft.Add(static_cast(ride->operationOption) * multiplier); switch (ride->mode) { - case RideMode::PoweredLaunchPasstrough: - case RideMode::PoweredLaunch: - case RideMode::UpwardLaunch: - case RideMode::PoweredLaunchBlockSectioned: + case RideMode::poweredLaunchPasstrough: + case RideMode::poweredLaunch: + case RideMode::upwardLaunch: + case RideMode::poweredLaunchBlockSectioned: ft.Rewind(); ft.Increment(18); - ft.Add((ride->launch_speed * 9) / 4); + ft.Add((ride->launchSpeed * 9) / 4); format = STR_RIDE_MODE_SPEED_VALUE; caption = STR_LAUNCH_SPEED; tooltip = STR_LAUNCH_SPEED_TIP; break; - case RideMode::StationToStation: + case RideMode::stationToStation: ft.Rewind(); ft.Increment(18); ft.Add((ride->speed * 9) / 4); @@ -3628,27 +3633,27 @@ namespace OpenRCT2::Ui::Windows caption = STR_SPEED; tooltip = STR_SPEED_TIP; break; - case RideMode::Race: + case RideMode::race: ft.Rewind(); ft.Increment(18); - ft.Add(ride->NumLaps); + ft.Add(ride->numLaps); format = STR_NUMBER_OF_LAPS_VALUE; caption = STR_NUMBER_OF_LAPS; tooltip = STR_NUMBER_OF_LAPS_TIP; break; - case RideMode::Dodgems: + case RideMode::dodgems: format = STR_RIDE_MODE_TIME_LIMIT_VALUE; caption = STR_TIME_LIMIT; tooltip = STR_TIME_LIMIT_TIP; break; - case RideMode::Swing: + case RideMode::swing: format = STR_RIDE_MODE_NUMBER_OF_SWINGS_VALUE; caption = STR_NUMBER_OF_SWINGS; tooltip = STR_NUMBER_OF_SWINGS_TIP; break; - case RideMode::Rotation: - case RideMode::ForwardRotation: - case RideMode::BackwardRotation: + case RideMode::rotation: + case RideMode::forwardRotation: + case RideMode::backwardRotation: format = STR_NUMBER_OF_ROTATIONS_VALUE; caption = STR_NUMBER_OF_ROTATIONS; tooltip = STR_NUMBER_OF_ROTATIONS_TIP; @@ -3657,7 +3662,7 @@ namespace OpenRCT2::Ui::Windows format = STR_MAX_PEOPLE_ON_RIDE_VALUE; caption = STR_MAX_PEOPLE_ON_RIDE; tooltip = STR_MAX_PEOPLE_ON_RIDE_TIP; - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) format = 0; break; } @@ -3695,20 +3700,22 @@ namespace OpenRCT2::Ui::Windows return; // Horizontal rule between mode settings and depart settings + auto ruleStart = widgets[WIDX_LOAD_DROPDOWN].top - 8; GfxFillRectInset( dpi, - { windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, 103 }, - windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].right - 5, 104 } }, + { windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, ruleStart }, + windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].right - 5, ruleStart + 1 } }, colours[1], INSET_RECT_FLAG_BORDER_INSET); // Number of block sections - if (ride->IsBlockSectioned()) + if (ride->isBlockSectioned()) { auto ft = Formatter(); - ft.Add(ride->num_block_brakes + ride->num_stations); + ft.Add(ride->numBlockBrakes + ride->numStations); + auto underWidget = ride->mode == RideMode::poweredLaunchBlockSectioned ? WIDX_MODE_TWEAK : WIDX_MODE; DrawTextBasic( - dpi, windowPos + ScreenCoordsXY{ 21, ride->mode == RideMode::PoweredLaunchBlockSectioned ? 89 : 61 }, - STR_BLOCK_SECTIONS, ft, { COLOUR_BLACK }); + dpi, windowPos + ScreenCoordsXY{ 21, widgets[underWidget].bottom + 3 }, STR_BLOCK_SECTIONS, ft, + { COLOUR_BLACK }); } } @@ -3769,7 +3776,8 @@ namespace OpenRCT2::Ui::Windows void MaintenanceResize() { - WindowSetResize(*this, 316, 135, 316, 135); + auto bottom = widgets[WIDX_LOCATE_MECHANIC].bottom + 6; + WindowSetResize(*this, { kMinimumWindowWidth, bottom }, { kMinimumWindowWidth, bottom }); } void MaintenanceOnMouseDown(WidgetIndex widgetIndex) @@ -3778,7 +3786,7 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; @@ -3798,7 +3806,7 @@ namespace OpenRCT2::Ui::Windows { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, 7, widgets[widgetIndex].right - dropdownWidget->left); - Dropdown::SetChecked(ride->inspection_interval, true); + Dropdown::SetChecked(ride->inspectionInterval, true); break; case WIDX_FORCE_BREAKDOWN: @@ -3815,9 +3823,9 @@ namespace OpenRCT2::Ui::Windows assert(j < static_cast(std::size(rideEntry->ride_type))); if (GetRideTypeDescriptor(rideEntry->ride_type[j]).AvailableBreakdowns & static_cast(1 << i)) { - if (i == BREAKDOWN_BRAKES_FAILURE && ride->IsBlockSectioned()) + if (i == BREAKDOWN_BRAKES_FAILURE && ride->isBlockSectioned()) { - if (ride->NumTrains != 1) + if (ride->numTrains != 1) continue; } gDropdownItems[numItems].Format = STR_DROPDOWN_MENU_LABEL; @@ -3836,17 +3844,17 @@ namespace OpenRCT2::Ui::Windows dropdownWidget->height() + 1, colours[1], Dropdown::Flag::StayOpen, numItems); numItems = 1; - int32_t breakdownReason = ride->breakdown_reason_pending; - if (breakdownReason != BREAKDOWN_NONE && (ride->lifecycle_flags & RIDE_LIFECYCLE_BREAKDOWN_PENDING)) + int32_t breakdownReason = ride->breakdownReasonPending; + if (breakdownReason != BREAKDOWN_NONE && (ride->lifecycleFlags & RIDE_LIFECYCLE_BREAKDOWN_PENDING)) { for (int32_t i = 0; i < 8; i++) { if (GetRideTypeDescriptor(rideEntry->ride_type[j]).AvailableBreakdowns & static_cast(1 << i)) { - if (i == BREAKDOWN_BRAKES_FAILURE && ride->IsBlockSectioned()) + if (i == BREAKDOWN_BRAKES_FAILURE && ride->isBlockSectioned()) { - if (ride->NumTrains != 1) + if (ride->numTrains != 1) continue; } if (i == breakdownReason) @@ -3861,7 +3869,7 @@ namespace OpenRCT2::Ui::Windows } } - if ((ride->lifecycle_flags & RIDE_LIFECYCLE_BREAKDOWN_PENDING) == 0) + if ((ride->lifecycleFlags & RIDE_LIFECYCLE_BREAKDOWN_PENDING) == 0) { Dropdown::SetDisabled(0, true); } @@ -3879,7 +3887,7 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; @@ -3893,12 +3901,12 @@ namespace OpenRCT2::Ui::Windows if (dropdownIndex == 0) { Vehicle* vehicle; - switch (ride->breakdown_reason_pending) + switch (ride->breakdownReasonPending) { case BREAKDOWN_SAFETY_CUT_OUT: - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + if (!(ride->lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) break; - for (int32_t i = 0; i < ride->NumTrains; ++i) + for (int32_t i = 0; i < ride->numTrains; ++i) { for (vehicle = GetEntity(ride->vehicles[i]); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) @@ -3913,32 +3921,32 @@ namespace OpenRCT2::Ui::Windows case BREAKDOWN_RESTRAINTS_STUCK_OPEN: case BREAKDOWN_DOORS_STUCK_CLOSED: case BREAKDOWN_DOORS_STUCK_OPEN: - vehicle = GetEntity(ride->vehicles[ride->broken_vehicle]); + vehicle = GetEntity(ride->vehicles[ride->brokenTrain]); if (vehicle != nullptr) { vehicle->ClearFlag(VehicleFlags::CarIsBroken); } break; case BREAKDOWN_VEHICLE_MALFUNCTION: - vehicle = GetEntity(ride->vehicles[ride->broken_vehicle]); + vehicle = GetEntity(ride->vehicles[ride->brokenTrain]); if (vehicle != nullptr) { vehicle->ClearFlag(VehicleFlags::TrainIsBroken); } break; } - ride->lifecycle_flags &= ~(RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN); + ride->lifecycleFlags &= ~(RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN); auto* windowMgr = GetWindowManager(); windowMgr->InvalidateByNumber(WindowClass::Ride, number); break; } - if (ride->lifecycle_flags + if (ride->lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) { ContextShowError(STR_DEBUG_CANT_FORCE_BREAKDOWN, STR_DEBUG_RIDE_ALREADY_BROKEN, {}); } - else if (ride->status == RideStatus::Closed) + else if (ride->status == RideStatus::closed) { ContextShowError(STR_DEBUG_CANT_FORCE_BREAKDOWN, STR_DEBUG_RIDE_IS_CLOSED, {}); } @@ -3958,9 +3966,9 @@ namespace OpenRCT2::Ui::Windows if (GetRideTypeDescriptor(rideEntry->ride_type[j]).AvailableBreakdowns & static_cast(1 << i)) { - if (i == BREAKDOWN_BRAKES_FAILURE && ride->IsBlockSectioned()) + if (i == BREAKDOWN_BRAKES_FAILURE && ride->isBlockSectioned()) { - if (ride->NumTrains != 1) + if (ride->numTrains != 1) continue; } if (numItems == dropdownIndex) @@ -3981,9 +3989,9 @@ namespace OpenRCT2::Ui::Windows InvalidateWidget(WIDX_TAB_4); auto ride = GetRide(rideId); - if (ride != nullptr && ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_MAINTENANCE) + if (ride != nullptr && ride->windowInvalidateFlags & RIDE_INVALIDATE_RIDE_MAINTENANCE) { - ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride->windowInvalidateFlags &= ~RIDE_INVALIDATE_RIDE_MAINTENANCE; Invalidate(); } } @@ -3997,9 +4005,9 @@ namespace OpenRCT2::Ui::Windows return; auto ft = Formatter::Common(); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); - widgets[WIDX_INSPECTION_INTERVAL].text = kRideInspectionIntervalNames[ride->inspection_interval]; + widgets[WIDX_INSPECTION_INTERVAL].text = kRideInspectionIntervalNames[ride->inspectionInterval]; AnchorBorderWidgets(); WindowAlignTabs(this, WIDX_TAB_1, WIDX_TAB_10); @@ -4013,8 +4021,8 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_FORCE_BREAKDOWN].type = WindowWidgetType::Empty; } - if (ride->GetRideTypeDescriptor().AvailableBreakdowns == 0 - || !(ride->lifecycle_flags & RIDE_LIFECYCLE_EVER_BEEN_OPENED)) + if (ride->getRideTypeDescriptor().AvailableBreakdowns == 0 + || !(ride->lifecycleFlags & RIDE_LIFECYCLE_EVER_BEEN_OPENED)) { disabled_widgets |= (1uLL << WIDX_REFURBISH_RIDE); widgets[WIDX_REFURBISH_RIDE].tooltip = STR_CANT_REFURBISH_NOT_NEEDED; @@ -4032,7 +4040,7 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - uint16_t reliability = ride->reliability_percentage; + uint16_t reliability = ride->reliabilityPercentage; WidgetProgressBarSetNewPercentage(widgets[WIDX_RELIABILITY_BAR], std::max(10, reliability)); uint16_t downTime = ride->downtime; @@ -4044,7 +4052,7 @@ namespace OpenRCT2::Ui::Windows // Locate mechanic button image Widget* widget = &widgets[WIDX_LOCATE_MECHANIC]; auto screenCoords = windowPos + ScreenCoordsXY{ widget->left, widget->top }; - auto image = ImageId(SPR_MECHANIC, COLOUR_BLACK, GetGameState().StaffMechanicColour); + auto image = ImageId(SPR_MECHANIC, COLOUR_BLACK, getGameState().staffMechanicColour); GfxDrawSprite(dpi, image, screenCoords); // Inspection label @@ -4068,32 +4076,32 @@ namespace OpenRCT2::Ui::Windows // Last inspection StringId stringId; - if (ride->last_inspection <= 1) + if (ride->lastInspection <= 1) stringId = STR_TIME_SINCE_LAST_INSPECTION_MINUTE; - else if (ride->last_inspection <= 240) + else if (ride->lastInspection <= 240) stringId = STR_TIME_SINCE_LAST_INSPECTION_MINUTES; else stringId = STR_TIME_SINCE_LAST_INSPECTION_MORE_THAN_4_HOURS; ft = Formatter(); - ft.Add(ride->last_inspection); + ft.Add(ride->lastInspection); DrawTextBasic(dpi, screenCoords, stringId, ft); screenCoords.y += 12; // Last / current breakdown - if (ride->breakdown_reason == BREAKDOWN_NONE) + if (ride->breakdownReason == BREAKDOWN_NONE) return; - stringId = (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) ? STR_CURRENT_BREAKDOWN : STR_LAST_BREAKDOWN; + stringId = (ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) ? STR_CURRENT_BREAKDOWN : STR_LAST_BREAKDOWN; ft = Formatter(); - ft.Add(RideBreakdownReasonNames[ride->breakdown_reason]); + ft.Add(RideBreakdownReasonNames[ride->breakdownReason]); DrawTextBasic(dpi, screenCoords, stringId, ft); screenCoords.y += 12; // Mechanic status - if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) { - switch (ride->mechanic_status) + switch (ride->mechanicStatus) { case RIDE_MECHANIC_STATUS_CALLING: { @@ -4149,9 +4157,9 @@ namespace OpenRCT2::Ui::Windows { // Get station flags (shops don't have them) auto stationObjFlags = 0; - if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (!ride.getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) { - auto stationObj = ride.GetStationObject(); + auto stationObj = ride.getStationObject(); if (stationObj != nullptr) { stationObjFlags = stationObj->Flags; @@ -4161,13 +4169,13 @@ namespace OpenRCT2::Ui::Windows switch (trackColour) { case 0: - return (stationObjFlags & STATION_OBJECT_FLAGS::HAS_PRIMARY_COLOUR) - || ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrackColourMain); + return (stationObjFlags & StationObjectFlags::hasPrimaryColour) + || ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasTrackColourMain); case 1: - return (stationObjFlags & STATION_OBJECT_FLAGS::HAS_SECONDARY_COLOUR) - || ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrackColourAdditional); + return (stationObjFlags & StationObjectFlags::hasSecondaryColour) + || ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasTrackColourAdditional); case 2: - return ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrackColourSupports); + return ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasTrackColourSupports); default: return 0; } @@ -4221,14 +4229,14 @@ namespace OpenRCT2::Ui::Windows SetPage(widgetIndex - WIDX_TAB_1); break; case WIDX_PAINT_INDIVIDUAL_AREA: - ToolSet(*this, WIDX_PAINT_INDIVIDUAL_AREA, Tool::PaintDown); + ToolSet(*this, WIDX_PAINT_INDIVIDUAL_AREA, Tool::paintDown); break; case WIDX_SELL_ITEM_RANDOM_COLOUR_CHECKBOX: { auto ride = GetRide(rideId); if (ride != nullptr) { - const bool currentlyEnabled = ride->HasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS); + const bool currentlyEnabled = ride->hasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS); auto rideSetAppearanceAction = RideSetAppearanceAction( rideId, RideSetAppearanceType::SellingItemColourIsRandom, currentlyEnabled ? 0 : 1, 0); GameActions::Execute(&rideSetAppearanceAction); @@ -4241,15 +4249,15 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; bool allowChangingTrimColour = false; bool allowChangingTertiaryColour = false; - for (int32_t i = 0; i < ride->num_cars_per_train; i++) + for (int32_t i = 0; i < ride->numCarsPerTrain; i++) { - uint8_t vehicleTypeIndex = RideEntryGetVehicleAtPosition(ride->subtype, ride->num_cars_per_train, i); + uint8_t vehicleTypeIndex = RideEntryGetVehicleAtPosition(ride->subtype, ride->numCarsPerTrain, i); if (rideEntry->Cars[vehicleTypeIndex].flags & CAR_ENTRY_FLAG_ENABLE_TRIM_COLOUR) { @@ -4261,9 +4269,9 @@ namespace OpenRCT2::Ui::Windows } } - int32_t numItems = ride->NumTrains; + int32_t numItems = ride->numTrains; if (ride->vehicleColourSettings != VehicleColourSettings::perTrain) - numItems = ride->num_cars_per_train; + numItems = ride->numCarsPerTrain; for (auto i = 0; i < numItems; i++) { @@ -4293,7 +4301,8 @@ namespace OpenRCT2::Ui::Windows void ColourResize() { - WindowSetResize(*this, 316, 207, 316, 207); + auto bottom = widgets[WIDX_VEHICLE_PREVIEW].bottom + 6; + WindowSetResize(*this, { kMinimumWindowWidth, bottom }, { kMinimumWindowWidth, bottom }); } void ColourOnMouseDown(WidgetIndex widgetIndex) @@ -4306,7 +4315,7 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; @@ -4332,15 +4341,15 @@ namespace OpenRCT2::Ui::Windows } case WIDX_TRACK_MAIN_COLOUR: WindowDropdownShowColour( - this, &widgets[widgetIndex], colours[1], ride->track_colour[colourSchemeIndex].main); + this, &widgets[widgetIndex], colours[1], ride->trackColours[colourSchemeIndex].main); break; case WIDX_TRACK_ADDITIONAL_COLOUR: WindowDropdownShowColour( - this, &widgets[widgetIndex], colours[1], ride->track_colour[colourSchemeIndex].additional); + this, &widgets[widgetIndex], colours[1], ride->trackColours[colourSchemeIndex].additional); break; case WIDX_TRACK_SUPPORT_COLOUR: WindowDropdownShowColour( - this, &widgets[widgetIndex], colours[1], ride->track_colour[colourSchemeIndex].supports); + this, &widgets[widgetIndex], colours[1], ride->trackColours[colourSchemeIndex].supports); break; case WIDX_MAZE_STYLE_DROPDOWN: { @@ -4354,7 +4363,7 @@ namespace OpenRCT2::Ui::Windows { windowPos.x + dropdownWidget->left, windowPos.y + dropdownWidget->top }, dropdownWidget->height() + 1, colours[1], 0, Dropdown::Flag::StayOpen, 4, widgets[widgetIndex].right - dropdownWidget->left); - Dropdown::SetChecked(ride->track_colour[colourSchemeIndex].supports, true); + Dropdown::SetChecked(ride->trackColours[colourSchemeIndex].supports, true); break; } case WIDX_ENTRANCE_STYLE_DROPDOWN: @@ -4363,7 +4372,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_VEHICLE_COLOUR_SCHEME_DROPDOWN: { // Train, boat, ... - auto vehicleTypeName = GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.vehicle).singular; + auto vehicleTypeName = GetRideComponentName(ride->getRideTypeDescriptor().NameConvention.vehicle).singular; auto numDropdownItems = 2; gDropdownItems[0].Format = STR_DROPDOWN_MENU_LABEL; @@ -4388,9 +4397,9 @@ namespace OpenRCT2::Ui::Windows } case WIDX_VEHICLE_COLOUR_INDEX_DROPDOWN: { - numItems = ride->NumTrains; + numItems = ride->numTrains; if (ride->vehicleColourSettings != VehicleColourSettings::perTrain) - numItems = ride->num_cars_per_train; + numItems = ride->numCarsPerTrain; stringId = ride->vehicleColourSettings == VehicleColourSettings::perTrain ? STR_RIDE_COLOUR_TRAIN_OPTION : STR_RIDE_COLOUR_VEHICLE_OPTION; @@ -4400,7 +4409,7 @@ namespace OpenRCT2::Ui::Windows if (ride->vehicleColourSettings == VehicleColourSettings::perCar) { const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition( - ride->subtype, ride->num_cars_per_train, i)]; + ride->subtype, ride->numCarsPerTrain, i)]; if (!carEntry.isVisible()) { continue; @@ -4410,7 +4419,7 @@ namespace OpenRCT2::Ui::Windows int64_t vehicleIndex = dropdownIndex + 1; gDropdownItems[dropdownIndex].Format = STR_DROPDOWN_MENU_LABEL; gDropdownItems[dropdownIndex].Args = (vehicleIndex << 32) - | ((GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.vehicle).capitalised) << 16) + | ((GetRideComponentName(ride->getRideTypeDescriptor().NameConvention.vehicle).capitalised) << 16) | stringId; dropdownIndex++; } @@ -4492,7 +4501,7 @@ namespace OpenRCT2::Ui::Windows rideSetAppearanceAction.SetCallback([objIndex](const GameAction*, const GameActions::Result* res) { if (res->Error != GameActions::Status::Ok) return; - GetGameState().LastEntranceStyle = objIndex; + getGameState().lastEntranceStyle = objIndex; }); GameActions::Execute(&rideSetAppearanceAction); break; @@ -4572,21 +4581,21 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; widgets[WIDX_TITLE].text = STR_ARG_16_STRINGID; auto ft = Formatter::Common(); ft.Increment(16); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); // Track colours int32_t colourScheme = _rideColour; - trackColour = ride->track_colour[colourScheme]; + trackColour = ride->trackColours[colourScheme]; // Maze style - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) { widgets[WIDX_MAZE_STYLE].type = WindowWidgetType::DropdownMenu; @@ -4600,7 +4609,7 @@ namespace OpenRCT2::Ui::Windows } // Track, multiple colour schemes - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::supportsMultipleColourSchemes)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::supportsMultipleColourSchemes)) { widgets[WIDX_TRACK_COLOUR_SCHEME].type = WindowWidgetType::DropdownMenu; widgets[WIDX_TRACK_COLOUR_SCHEME_DROPDOWN].type = WindowWidgetType::Button; @@ -4636,10 +4645,10 @@ namespace OpenRCT2::Ui::Windows } // Selling item random colour checkbox - if (ride->HasRecolourableShopItems()) + if (ride->hasRecolourableShopItems()) { widgets[WIDX_SELL_ITEM_RANDOM_COLOUR_CHECKBOX].type = WindowWidgetType::Checkbox; - if (ride->HasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS)) + if (ride->hasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS)) { pressed_widgets |= (1uLL << WIDX_SELL_ITEM_RANDOM_COLOUR_CHECKBOX); } @@ -4672,14 +4681,14 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_TRACK_PREVIEW].type = WindowWidgetType::Empty; // Entrance style - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasEntranceAndExit)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasEntranceAndExit)) { widgets[WIDX_ENTRANCE_PREVIEW].type = WindowWidgetType::Spinner; widgets[WIDX_ENTRANCE_STYLE].type = WindowWidgetType::DropdownMenu; widgets[WIDX_ENTRANCE_STYLE_DROPDOWN].type = WindowWidgetType::Button; auto stringId = kStringIdNone; - auto stationObj = ride->GetStationObject(); + auto stationObj = ride->getStationObject(); if (stationObj != nullptr) { stringId = stationObj->NameStringId; @@ -4694,8 +4703,8 @@ namespace OpenRCT2::Ui::Windows } // Vehicle colours - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::noVehicles) - && ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasVehicleColours)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::noVehicles) + && ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasVehicleColours)) { if (ride->vehicleColourSettings == VehicleColourSettings::same) { @@ -4716,9 +4725,9 @@ namespace OpenRCT2::Ui::Windows bool allowChangingTrimColour = false; bool allowChangingTertiaryColour = false; - for (int32_t i = 0; i < ride->num_cars_per_train; i++) + for (int32_t i = 0; i < ride->numCarsPerTrain; i++) { - uint8_t vehicleTypeIndex = RideEntryGetVehicleAtPosition(ride->subtype, ride->num_cars_per_train, i); + uint8_t vehicleTypeIndex = RideEntryGetVehicleAtPosition(ride->subtype, ride->numCarsPerTrain, i); if (rideEntry->Cars[vehicleTypeIndex].flags & CAR_ENTRY_FLAG_ENABLE_TRIM_COLOUR) { @@ -4752,8 +4761,8 @@ namespace OpenRCT2::Ui::Windows } // Vehicle colour scheme type - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::vehicleIsIntegral) - && (ride->num_cars_per_train | ride->NumTrains) > 1) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::vehicleIsIntegral) + && (ride->numCarsPerTrain | ride->numTrains) > 1) { widgets[WIDX_VEHICLE_COLOUR_SCHEME].type = WindowWidgetType::DropdownMenu; widgets[WIDX_VEHICLE_COLOUR_SCHEME_DROPDOWN].type = WindowWidgetType::Button; @@ -4766,8 +4775,8 @@ namespace OpenRCT2::Ui::Windows ft.Rewind(); ft.Increment(6); ft.Add(VehicleColourSchemeNames[EnumValue(ride->vehicleColourSettings)]); - ft.Add(GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.vehicle).singular); - ft.Add(GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.vehicle).capitalised); + ft.Add(GetRideComponentName(ride->getRideTypeDescriptor().NameConvention.vehicle).singular); + ft.Add(GetRideComponentName(ride->getRideTypeDescriptor().NameConvention.vehicle).capitalised); ft.Add(carIndexToDropdownIndex(_vehicleIndex) + 1); // Vehicle index @@ -4827,23 +4836,23 @@ namespace OpenRCT2::Ui::Windows { windowPos + ScreenCoordsXY{ trackPreviewWidget.right - 1, trackPreviewWidget.bottom - 1 } } }, PALETTE_INDEX_12); - auto trackColour = ride->track_colour[_rideColour]; + auto trackColour = ride->trackColours[_rideColour]; // - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr || rideEntry->shop_item[0] == ShopItem::None) { auto screenCoords = windowPos + ScreenCoordsXY{ trackPreviewWidget.left, trackPreviewWidget.top }; // Track - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) { GfxDrawSprite(dpi, ImageId(MazeOptions[trackColour.supports].sprite), screenCoords); } else { - auto typeDescriptor = ride->GetRideTypeDescriptor(); + auto typeDescriptor = ride->getRideTypeDescriptor(); int32_t spriteIndex = typeDescriptor.ColourPreview.Track; if (spriteIndex != 0) { @@ -4866,11 +4875,11 @@ namespace OpenRCT2::Ui::Windows ShopItem shopItem = rideEntry->shop_item[1] == ShopItem::None ? rideEntry->shop_item[0] : rideEntry->shop_item[1]; - if (ride->HasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS)) + if (ride->hasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS)) { colour_t spriteColour = COLOUR_BLACK; // Limit update rate of preview to avoid making people dizzy. - if ((GetGameState().CurrentTicks % 64) == 0) + if ((getGameState().currentTicks % 64) == 0) { spriteColour++; if (spriteColour >= kColourNumNormal) @@ -4884,12 +4893,12 @@ namespace OpenRCT2::Ui::Windows else { GfxDrawSprite( - dpi, ImageId(GetShopItemDescriptor(shopItem).Image, ride->track_colour[0].main), screenCoords); + dpi, ImageId(GetShopItemDescriptor(shopItem).Image, ride->trackColours[0].main), screenCoords); } } // Entrance preview - trackColour = ride->track_colour[0]; + trackColour = ride->trackColours[0]; const auto& entrancePreviewWidget = widgets[WIDX_ENTRANCE_PREVIEW]; if (entrancePreviewWidget.type != WindowWidgetType::Empty) { @@ -4900,7 +4909,7 @@ namespace OpenRCT2::Ui::Windows { GfxClear(clippedDpi, PALETTE_INDEX_12); - auto stationObj = ride->GetStationObject(); + auto stationObj = ride->getStationObject(); if (stationObj != nullptr && stationObj->BaseImageId != kImageIndexUndefined) { auto imageId = ImageId(stationObj->BaseImageId, trackColour.main, trackColour.additional); @@ -4912,7 +4921,7 @@ namespace OpenRCT2::Ui::Windows GfxDrawSprite(clippedDpi, imageId.WithIndexOffset(4), { 34, 20 }); // Glass - if (stationObj->Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT) + if (stationObj->Flags & StationObjectFlags::isTransparent) { auto glassImageId = ImageId(stationObj->BaseImageId + 20).WithTransparency(trackColour.main); GfxDrawSprite(clippedDpi, glassImageId, { 34, 20 }); @@ -4930,7 +4939,7 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; @@ -4948,7 +4957,7 @@ namespace OpenRCT2::Ui::Windows : rideEntry->TabCar; const auto& carEntry = rideEntry->Cars[RideEntryGetVehicleAtPosition( - ride->subtype, ride->num_cars_per_train, trainCarIndex)]; + ride->subtype, ride->numCarsPerTrain, trainCarIndex)]; screenCoords.y += carEntry.tab_height; @@ -4972,9 +4981,9 @@ namespace OpenRCT2::Ui::Windows auto ride = GetRide(rideId); if (ride != nullptr) { - int32_t activateMusic = (ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC) ? 0 : 1; + int32_t activateMusic = (ride->lifecycleFlags & RIDE_LIFECYCLE_MUSIC) ? 0 : 1; SetOperatingSetting(rideId, RideSetSetting::Music, activateMusic); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MUSIC; + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MUSIC; } } @@ -5012,10 +5021,11 @@ namespace OpenRCT2::Ui::Windows return; // Expand the window when music is playing - auto isMusicActivated = (ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC) != 0; - auto minHeight = isMusicActivated ? 214 : 81; - auto maxHeight = isMusicActivated ? 450 : 81; - WindowSetResize(*this, 316, minHeight, 500, maxHeight); + auto isMusicActivated = (ride->lifecycleFlags & RIDE_LIFECYCLE_MUSIC) != 0; + auto standardHeight = widgets[WIDX_MUSIC_DROPDOWN].bottom + 6; + auto minHeight = isMusicActivated ? standardHeight + 133 : standardHeight; + auto maxHeight = isMusicActivated ? standardHeight + 369 : standardHeight; + WindowSetResize(*this, { kMinimumWindowWidth, minHeight }, { 500, maxHeight }); } static std::string GetMusicString(ObjectEntryIndex musicObjectIndex) @@ -5069,7 +5079,7 @@ namespace OpenRCT2::Ui::Windows } } - if (GetGameState().Cheats.unlockOperatingLimits || musicObj->SupportsRideType(ride->type)) + if (getGameState().cheats.unlockOperatingLimits || musicObj->SupportsRideType(ride->type)) { musicOrder.push_back(i); } @@ -5120,9 +5130,9 @@ namespace OpenRCT2::Ui::Windows OnPrepareDraw(); InvalidateWidget(WIDX_TAB_6); - if (auto ride = GetRide(rideId); ride != nullptr && ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_MUSIC) + if (auto ride = GetRide(rideId); ride != nullptr && ride->windowInvalidateFlags & RIDE_INVALIDATE_RIDE_MUSIC) { - ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_MUSIC; + ride->windowInvalidateFlags &= ~RIDE_INVALIDATE_RIDE_MUSIC; Invalidate(); OnResize(); OnPrepareDraw(); @@ -5146,7 +5156,7 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return size; - auto musicObj = ride->GetMusicObject(); + auto musicObj = ride->getMusicObject(); if (musicObj == nullptr) return size; @@ -5179,7 +5189,7 @@ namespace OpenRCT2::Ui::Windows return; auto ft = Formatter::Common(); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); // Align music dropdown widgets[WIDX_MUSIC].right = width - 8; @@ -5188,14 +5198,14 @@ namespace OpenRCT2::Ui::Windows // Set selected music StringId musicName = kStringIdNone; - auto musicObj = ride->GetMusicObject(); + auto musicObj = ride->getMusicObject(); if (musicObj != nullptr) { musicName = musicObj->NameStringId; } widgets[WIDX_MUSIC].text = musicName; - auto isMusicActivated = (ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC) != 0; + auto isMusicActivated = (ride->lifecycleFlags & RIDE_LIFECYCLE_MUSIC) != 0; bool hasPreviewImage = musicObj != nullptr && musicObj->HasPreview(); WidgetSetVisible(*this, WIDX_MUSIC_DATA, isMusicActivated); @@ -5239,7 +5249,7 @@ namespace OpenRCT2::Ui::Windows return; // Draw music data only when music is activated - auto isMusicActivated = (ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC) != 0; + auto isMusicActivated = (ride->lifecycleFlags & RIDE_LIFECYCLE_MUSIC) != 0; if (!isMusicActivated) return; @@ -5248,7 +5258,7 @@ namespace OpenRCT2::Ui::Windows DrawTextWrapped(dpi, trackLabelPos, width, STR_MUSIC_OBJECT_TRACK_HEADER, {}, { TextAlignment::LEFT }); // Do we have a preview image to draw? - auto musicObj = ride->GetMusicObject(); + auto musicObj = ride->getMusicObject(); bool hasPreview = musicObj != nullptr && musicObj->HasPreview(); if (!hasPreview) return; @@ -5274,14 +5284,14 @@ namespace OpenRCT2::Ui::Windows return; // Only draw track listing when music is activated - auto isMusicActivated = (ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC) != 0; + auto isMusicActivated = (ride->lifecycleFlags & RIDE_LIFECYCLE_MUSIC) != 0; if (!isMusicActivated) return; uint8_t paletteIndex = ColourMapA[colours[1].colour].mid_light; GfxClear(dpi, paletteIndex); - auto* musicObj = ride->GetMusicObject(); + auto* musicObj = ride->getMusicObject(); if (musicObj == nullptr) return; @@ -5333,7 +5343,7 @@ namespace OpenRCT2::Ui::Windows CancelScenerySelection(); } - while (ToolSet(*this, WIDX_BACKGROUND, Tool::Crosshair)) + while (ToolSet(*this, WIDX_BACKGROUND, Tool::crosshair)) ; gTrackDesignSaveRideIndex = rideId; @@ -5371,9 +5381,9 @@ namespace OpenRCT2::Ui::Windows } } - static void TrackDesignCallback(int32_t result, [[maybe_unused]] const utf8* path) + static void TrackDesignCallback(ModalResult result, [[maybe_unused]] const utf8* path) { - if (result == MODAL_RESULT_OK) + if (result == ModalResult::ok) { TrackRepositoryScan(); } @@ -5385,7 +5395,7 @@ namespace OpenRCT2::Ui::Windows TrackDesignState tds{}; Ride* ride = GetRide(rideId); - _trackDesign = ride->SaveToTrackDesign(tds); + _trackDesign = ride->saveToTrackDesign(tds); if (!_trackDesign) { return; @@ -5405,9 +5415,10 @@ namespace OpenRCT2::Ui::Windows } } - auto trackName = ride->GetName(); + auto trackName = ride->getName(); auto intent = Intent(WindowClass::Loadsave); - intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_TRACK); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::track); intent.PutExtra(INTENT_EXTRA_TRACK_DESIGN, _trackDesign.get()); intent.PutExtra(INTENT_EXTRA_PATH, trackName); intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(&TrackDesignCallback)); @@ -5456,7 +5467,7 @@ namespace OpenRCT2::Ui::Windows void MeasurementsResize() { - WindowSetResize(*this, 316, 234, 316, 234); + WindowSetResize(*this, { kMinimumWindowWidth, 234 }, { kMinimumWindowWidth, 234 }); } void MeasurementsOnMouseDown(WidgetIndex widgetIndex) @@ -5475,7 +5486,7 @@ namespace OpenRCT2::Ui::Windows { windowPos.x + widgets[widgetIndex].left, windowPos.y + widgets[widgetIndex].top }, widgets[widgetIndex].height() + 1, colours[1], Dropdown::Flag::StayOpen, 2); gDropdownDefaultIndex = 0; - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { // Disable saving without scenery if we're a flat ride Dropdown::SetDisabled(0, true); @@ -5568,7 +5579,7 @@ namespace OpenRCT2::Ui::Windows return; auto ft = Formatter::Common(); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); widgets[WIDX_SAVE_TRACK_DESIGN].tooltip = STR_SAVE_TRACK_DESIGN_NOT_POSSIBLE; widgets[WIDX_SAVE_TRACK_DESIGN].type = WindowWidgetType::Empty; @@ -5588,7 +5599,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_SAVE_TRACK_DESIGN].type = WindowWidgetType::FlatBtn; disabled_widgets |= (1uLL << WIDX_SAVE_TRACK_DESIGN); - if (ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_TESTED) { if (!ride->ratings.isNull()) { @@ -5629,7 +5640,7 @@ namespace OpenRCT2::Ui::Windows auto screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 4 }; - if (ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_TESTED) { // Excitement StringId ratingName = GetRatingName(ride->ratings.excitement); @@ -5670,9 +5681,9 @@ namespace OpenRCT2::Ui::Windows dpi, { screenCoords - ScreenCoordsXY{ 0, 6 }, screenCoords + ScreenCoordsXY{ 303, -5 } }, colours[1], INSET_RECT_FLAG_BORDER_INSET); - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_NO_RAW_STATS)) + if (!(ride->lifecycleFlags & RIDE_LIFECYCLE_NO_RAW_STATS)) { - if (ride->GetRideTypeDescriptor().specialType == RtdSpecialType::miniGolf) + if (ride->getRideTypeDescriptor().specialType == RtdSpecialType::miniGolf) { // Holes ft = Formatter(); @@ -5684,13 +5695,13 @@ namespace OpenRCT2::Ui::Windows { // Max speed ft = Formatter(); - ft.Add(ToHumanReadableSpeed(ride->max_speed)); + ft.Add(ToHumanReadableSpeed(ride->maxSpeed)); DrawTextBasic(dpi, screenCoords, STR_MAX_SPEED, ft); screenCoords.y += kListRowHeight; // Average speed ft = Formatter(); - ft.Add(ToHumanReadableSpeed(ride->average_speed)); + ft.Add(ToHumanReadableSpeed(ride->averageSpeed)); DrawTextBasic(dpi, screenCoords, STR_AVERAGE_SPEED, ft); screenCoords.y += kListRowHeight; @@ -5700,10 +5711,10 @@ namespace OpenRCT2::Ui::Windows // TODO: STR_RIDE_TIME only takes up to 4 stations modify to take more // also if modified may need to be split into multiple format strings // as formatter cannot take more than 256 bytes - for (int32_t i = 0; i < std::min(ride->num_stations, 4); i++) + for (int32_t i = 0; i < std::min(ride->numStations, 4); i++) { StationIndex stationIndex = StationIndex::FromUnderlying(numTimes); - auto time = ride->GetStation(stationIndex).SegmentTime; + auto time = ride->getStation(stationIndex).SegmentTime; if (time != 0) { ft.Add(STR_RIDE_TIME_ENTRY_WITH_SEPARATOR); @@ -5739,10 +5750,10 @@ namespace OpenRCT2::Ui::Windows ft = Formatter(); int32_t numLengths = 0; // TODO: see above STR_RIDE_LENGTH is also only able to display max 4 - for (int32_t i = 0; i < std::min(ride->num_stations, 4); i++) + for (int32_t i = 0; i < std::min(ride->numStations, 4); i++) { StationIndex stationIndex = StationIndex::FromUnderlying(i); - auto length = ride->GetStation(stationIndex).SegmentLength; + auto length = ride->getStation(stationIndex).SegmentLength; if (length != 0) { length >>= 16; @@ -5775,29 +5786,29 @@ namespace OpenRCT2::Ui::Windows screenCoords.y += kListRowHeight; - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasGForces)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasGForces)) { // Max. positive vertical G's stringId = STR_MAX_POSITIVE_VERTICAL_G; ft = Formatter(); - ft.Add(ride->max_positive_vertical_g); + ft.Add(ride->maxPositiveVerticalG); DrawTextBasic(dpi, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Max. negative vertical G's - stringId = ride->max_negative_vertical_g <= kRideGForcesRedNegVertical + stringId = ride->maxNegativeVerticalG <= kRideGForcesRedNegVertical ? STR_MAX_NEGATIVE_VERTICAL_G_RED : STR_MAX_NEGATIVE_VERTICAL_G; ft = Formatter(); - ft.Add(ride->max_negative_vertical_g); + ft.Add(ride->maxNegativeVerticalG); DrawTextBasic(dpi, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; // Max lateral G's - stringId = ride->max_lateral_g > kRideGForcesRedLateral ? STR_MAX_LATERAL_G_RED : STR_MAX_LATERAL_G; + stringId = ride->maxLateralG > kRideGForcesRedLateral ? STR_MAX_LATERAL_G_RED : STR_MAX_LATERAL_G; ft = Formatter(); - ft.Add(ride->max_lateral_g); + ft.Add(ride->maxLateralG); DrawTextBasic(dpi, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; @@ -5808,7 +5819,7 @@ namespace OpenRCT2::Ui::Windows screenCoords.y += kListRowHeight; } - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasDrops)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasDrops)) { ft = Formatter(); ft.Add(ride->getNumDrops()); @@ -5816,14 +5827,14 @@ namespace OpenRCT2::Ui::Windows screenCoords.y += kListRowHeight; // Highest drop height - auto highestDropHeight = (ride->highest_drop_height * 3) / 4; + auto highestDropHeight = (ride->highestDropHeight * 3) / 4; ft = Formatter(); ft.Add(highestDropHeight); DrawTextBasic(dpi, screenCoords, STR_HIGHEST_DROP_HEIGHT, ft); screenCoords.y += kListRowHeight; } - if (ride->GetRideTypeDescriptor().specialType != RtdSpecialType::miniGolf) + if (ride->getRideTypeDescriptor().specialType != RtdSpecialType::miniGolf) { // Inversions if (ride->inversions != 0) @@ -5892,7 +5903,7 @@ namespace OpenRCT2::Ui::Windows void GraphsResize() { - WindowSetResize(*this, 316, 182, std::numeric_limits::max(), 450); + WindowSetResize(*this, { kMinimumWindowWidth, 182 }, { std::numeric_limits::max(), 450 }); } void GraphsOnMouseDown(WidgetIndex widgetIndex) @@ -5933,7 +5944,7 @@ namespace OpenRCT2::Ui::Windows if (ride != nullptr) { RideMeasurement* measurement{}; - std::tie(measurement, std::ignore) = ride->GetMeasurement(); + std::tie(measurement, std::ignore) = ride->getMeasurement(); x = measurement == nullptr ? 0 : measurement->current_item - ((widget->width() / 4) * 3); } } @@ -5955,7 +5966,7 @@ namespace OpenRCT2::Ui::Windows if (ride != nullptr) { RideMeasurement* measurement{}; - std::tie(measurement, std::ignore) = ride->GetMeasurement(); + std::tie(measurement, std::ignore) = ride->getMeasurement(); if (measurement != nullptr) { size.width = std::max(size.width, measurement->num_items); @@ -5976,12 +5987,12 @@ namespace OpenRCT2::Ui::Windows auto ride = GetRide(rideId); if (ride != nullptr) { - auto [measurement, message] = ride->GetMeasurement(); + auto [measurement, message] = ride->getMeasurement(); if (measurement != nullptr && (measurement->flags & RIDE_MEASUREMENT_FLAG_RUNNING)) { auto ft = Formatter(); ft.Increment(2); - ft.Add(GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.vehicle).number); + ft.Add(GetRideComponentName(ride->getRideTypeDescriptor().NameConvention.vehicle).number); ft.Add(measurement->vehicle_index + 1); return { fallback, ft }; } @@ -6005,7 +6016,7 @@ namespace OpenRCT2::Ui::Windows return; auto ft = Formatter::Common(); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); // Set pressed graph button type pressed_widgets &= ~(1uLL << WIDX_GRAPH_VELOCITY); @@ -6015,7 +6026,7 @@ namespace OpenRCT2::Ui::Windows pressed_widgets |= (1LL << (WIDX_GRAPH_VELOCITY + list_information_type)); // Hide graph buttons that are not applicable - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasGForces)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasGForces)) { widgets[WIDX_GRAPH_VERTICAL].type = WindowWidgetType::Button; widgets[WIDX_GRAPH_LATERAL].type = WindowWidgetType::Button; @@ -6064,7 +6075,7 @@ namespace OpenRCT2::Ui::Windows return; } - auto [measurement, message] = ride->GetMeasurement(); + auto [measurement, message] = ride->getMeasurement(); if (measurement == nullptr) { @@ -6229,8 +6240,8 @@ namespace OpenRCT2::Ui::Windows static void UpdateSamePriceThroughoutFlags(ShopItem shop_item) { - const auto& gameState = GetGameState(); - const auto existingFlags = gameState.SamePriceThroughoutPark; + const auto& gameState = getGameState(); + const auto existingFlags = gameState.samePriceThroughoutPark; auto newFlags = existingFlags; if (GetShopItemDescriptor(shop_item).IsPhoto()) @@ -6256,7 +6267,7 @@ namespace OpenRCT2::Ui::Windows return; ShopItem shopItem; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::toilet) { shopItem = ShopItem::Admission; @@ -6294,7 +6305,7 @@ namespace OpenRCT2::Ui::Windows auto shop_item = rideEntry->shop_item[1]; if (shop_item == ShopItem::None) - shop_item = ride->GetRideTypeDescriptor().PhotoItem; + shop_item = ride->getRideTypeDescriptor().PhotoItem; UpdateSamePriceThroughoutFlags(shop_item); @@ -6361,8 +6372,8 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return false; - auto rideEntry = ride->GetRideEntry(); - const auto& rtd = ride->GetRideTypeDescriptor(); + auto rideEntry = ride->getRideEntry(); + const auto& rtd = ride->getRideTypeDescriptor(); return Park::RidePricesUnlocked() || rtd.specialType == RtdSpecialType::toilet || (rideEntry != nullptr && rideEntry->shop_item[0] != ShopItem::None); } @@ -6444,7 +6455,8 @@ namespace OpenRCT2::Ui::Windows void IncomeResize() { - WindowSetResize(*this, 316, 194, 316, 194); + auto newHeight = 194; + WindowSetResize(*this, { kMinimumWindowWidth, newHeight }, { kMinimumWindowWidth, newHeight }); } void IncomeOnMouseDown(WidgetIndex widgetIndex) @@ -6473,9 +6485,9 @@ namespace OpenRCT2::Ui::Windows InvalidateWidget(WIDX_TAB_9); auto ride = GetRide(rideId); - if (ride != nullptr && ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_INCOME) + if (ride != nullptr && ride->windowInvalidateFlags & RIDE_INVALIDATE_RIDE_INCOME) { - ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_INCOME; + ride->windowInvalidateFlags &= ~RIDE_INVALIDATE_RIDE_INCOME; Invalidate(); } } @@ -6516,9 +6528,9 @@ namespace OpenRCT2::Ui::Windows auto ft = Formatter::Common(); ft.Increment(18); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; @@ -6530,7 +6542,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_PRIMARY_PRICE].tooltip = kStringIdNone; // If ride prices are locked, do not allow setting the price, unless we're dealing with a shop or toilet. - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (!Park::RidePricesUnlocked() && rideEntry->shop_item[0] == ShopItem::None && rtd.specialType != RtdSpecialType::toilet) { @@ -6562,8 +6574,8 @@ namespace OpenRCT2::Ui::Windows } // Get secondary item - auto secondaryItem = ride->GetRideTypeDescriptor().PhotoItem; - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO)) + auto secondaryItem = ride->getRideTypeDescriptor().PhotoItem; + if (!(ride->lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO)) { if ((secondaryItem = rideEntry->shop_item[1]) != ShopItem::None) { @@ -6620,7 +6632,7 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; @@ -6649,8 +6661,8 @@ namespace OpenRCT2::Ui::Windows screenCoords.y += 44; // Secondary item profit / loss per item sold - secondaryItem = ride->GetRideTypeDescriptor().PhotoItem; - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO)) + secondaryItem = ride->getRideTypeDescriptor().PhotoItem; + if (!(ride->lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO)) secondaryItem = rideEntry->shop_item[1]; if (secondaryItem != ShopItem::None) @@ -6673,18 +6685,18 @@ namespace OpenRCT2::Ui::Windows screenCoords.y += 18; // Income per hour - if (ride->income_per_hour != kMoney64Undefined) + if (ride->incomePerHour != kMoney64Undefined) { auto ft = Formatter(); - ft.Add(ride->income_per_hour); + ft.Add(ride->incomePerHour); DrawTextBasic(dpi, screenCoords, STR_INCOME_PER_HOUR, ft); screenCoords.y += kListRowHeight; } // Running cost per hour - money64 costPerHour = ride->upkeep_cost * 16; - stringId = ride->upkeep_cost == kMoney64Undefined ? STR_RUNNING_COST_UNKNOWN : STR_RUNNING_COST_PER_HOUR; + money64 costPerHour = ride->upkeepCost * 16; + stringId = ride->upkeepCost == kMoney64Undefined ? STR_RUNNING_COST_UNKNOWN : STR_RUNNING_COST_PER_HOUR; auto ft = Formatter(); ft.Add(costPerHour); DrawTextBasic(dpi, screenCoords, stringId, ft); @@ -6702,7 +6714,7 @@ namespace OpenRCT2::Ui::Windows // Total profit ft = Formatter(); - ft.Add(ride->total_profit); + ft.Add(ride->totalProfit); DrawTextBasic(dpi, screenCoords, STR_TOTAL_PROFIT, ft); } @@ -6733,7 +6745,7 @@ namespace OpenRCT2::Ui::Windows { auto intent = Intent(WindowClass::GuestList); intent.PutExtra( - INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsThinkingAboutRide)); + INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::guestsThinkingAboutRide)); intent.PutExtra(INTENT_EXTRA_RIDE_ID, number); ContextOpenIntent(&intent); break; @@ -6741,7 +6753,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_SHOW_GUESTS_ON_RIDE: { auto intent = Intent(WindowClass::GuestList); - intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsOnRide)); + intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::guestsOnRide)); intent.PutExtra(INTENT_EXTRA_RIDE_ID, number); ContextOpenIntent(&intent); break; @@ -6749,7 +6761,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_SHOW_GUESTS_QUEUING: { auto intent = Intent(WindowClass::GuestList); - intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsInQueue)); + intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::guestsInQueue)); intent.PutExtra(INTENT_EXTRA_RIDE_ID, number); ContextOpenIntent(&intent); break; @@ -6760,7 +6772,7 @@ namespace OpenRCT2::Ui::Windows void CustomerResize() { flags |= WF_RESIZABLE; - WindowSetResize(*this, 316, 163, 316, 163); + WindowSetResize(*this, { kMinimumWindowWidth, 163 }, { kMinimumWindowWidth, 163 }); } void CustomerUpdate() @@ -6773,9 +6785,9 @@ namespace OpenRCT2::Ui::Windows InvalidateWidget(WIDX_TAB_10); auto ride = GetRide(rideId); - if (ride != nullptr && ride->window_invalidate_flags & RIDE_INVALIDATE_RIDE_CUSTOMER) + if (ride != nullptr && ride->windowInvalidateFlags & RIDE_INVALIDATE_RIDE_CUSTOMER) { - ride->window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_CUSTOMER; + ride->windowInvalidateFlags &= ~RIDE_INVALIDATE_RIDE_CUSTOMER; Invalidate(); } } @@ -6788,10 +6800,10 @@ namespace OpenRCT2::Ui::Windows if (ride != nullptr) { auto ft = Formatter::Common(); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); widgets[WIDX_SHOW_GUESTS_THOUGHTS].type = WindowWidgetType::FlatBtn; - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) { widgets[WIDX_SHOW_GUESTS_ON_RIDE].type = WindowWidgetType::Empty; widgets[WIDX_SHOW_GUESTS_QUEUING].type = WindowWidgetType::Empty; @@ -6824,10 +6836,10 @@ namespace OpenRCT2::Ui::Windows + ScreenCoordsXY{ widgets[WIDX_PAGE_BACKGROUND].left + 4, widgets[WIDX_PAGE_BACKGROUND].top + 4 }; // Customers currently on ride - if (ride->IsRide()) + if (ride->isRide()) { auto ft = Formatter(); - ft.Add(ride->num_riders); + ft.Add(ride->numRiders); DrawTextBasic(dpi, screenCoords, STR_CUSTOMERS_ON_RIDE, ft); screenCoords.y += kListRowHeight; } @@ -6871,9 +6883,9 @@ namespace OpenRCT2::Ui::Windows screenCoords.y += kListRowHeight; // Queue time - if (ride->IsRide()) + if (ride->isRide()) { - queueTime = ride->GetMaxQueueTime(); + queueTime = ride->getMaxQueueTime(); stringId = queueTime == 1 ? STR_QUEUE_TIME_MINUTE : STR_QUEUE_TIME_MINUTES; ft = Formatter(); ft.Add(queueTime); @@ -6882,40 +6894,40 @@ namespace OpenRCT2::Ui::Windows } // Primary shop items sold - shopItem = ride->GetRideEntry()->shop_item[0]; + shopItem = ride->getRideEntry()->shop_item[0]; if (shopItem != ShopItem::None) { ft = Formatter(); ft.Add(GetShopItemDescriptor(shopItem).Naming.Plural); - ft.Add(ride->no_primary_items_sold); + ft.Add(ride->numPrimaryItemsSold); DrawTextBasic(dpi, screenCoords, STR_ITEMS_SOLD, ft); screenCoords.y += kListRowHeight; } // Secondary shop items sold / on-ride photos sold - shopItem = (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) ? ride->GetRideTypeDescriptor().PhotoItem - : ride->GetRideEntry()->shop_item[1]; + shopItem = (ride->lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) ? ride->getRideTypeDescriptor().PhotoItem + : ride->getRideEntry()->shop_item[1]; if (shopItem != ShopItem::None) { ft = Formatter(); ft.Add(GetShopItemDescriptor(shopItem).Naming.Plural); - ft.Add(ride->no_secondary_items_sold); + ft.Add(ride->numSecondaryItemsSold); DrawTextBasic(dpi, screenCoords, STR_ITEMS_SOLD, ft); screenCoords.y += kListRowHeight; } // Total customers ft = Formatter(); - ft.Add(ride->total_customers); + ft.Add(ride->totalCustomers); DrawTextBasic(dpi, screenCoords, STR_TOTAL_CUSTOMERS, ft); screenCoords.y += kListRowHeight; // Guests favourite - if (ride->IsRide()) + if (ride->isRide()) { ft = Formatter(); - ft.Add(ride->guests_favourite); - stringId = ride->guests_favourite == 1 ? STR_FAVOURITE_RIDE_OF_GUEST : STR_FAVOURITE_RIDE_OF_GUESTS; + ft.Add(ride->guestsFavourite); + stringId = ride->guestsFavourite == 1 ? STR_FAVOURITE_RIDE_OF_GUEST : STR_FAVOURITE_RIDE_OF_GUESTS; DrawTextBasic(dpi, screenCoords, stringId, ft); screenCoords.y += kListRowHeight; } @@ -6923,7 +6935,7 @@ namespace OpenRCT2::Ui::Windows // Age // If the ride has a build date that is in the future, show it as built this year. - int16_t age = std::max(DateGetYear(ride->GetAge()), 0); + int16_t age = std::max(DateGetYear(ride->getAge()), 0); stringId = age == 0 ? STR_BUILT_THIS_YEAR : age == 1 ? STR_BUILT_LAST_YEAR : STR_BUILT_YEARS_AGO; ft = Formatter(); ft.Add(age); @@ -6940,7 +6952,7 @@ namespace OpenRCT2::Ui::Windows static RideWindow* WindowRideOpen(const Ride& ride) { auto* windowMgr = GetWindowManager(); - return windowMgr->Create(WindowClass::Ride, 316, 207, WF_10 | WF_RESIZABLE, ride); + return windowMgr->Create(WindowClass::Ride, kMinimumWindowWidth, 207, WF_10 | WF_RESIZABLE, ride); } /** @@ -6961,7 +6973,7 @@ namespace OpenRCT2::Ui::Windows w = WindowRideOpen(ride); w->SetViewIndex(0); } - else if (w->GetViewIndex() >= (1 + ride.NumTrains + ride.num_stations)) + else if (w->GetViewIndex() >= (1 + ride.numTrains + ride.numStations)) { w->SetViewIndex(0); } @@ -6989,7 +7001,7 @@ namespace OpenRCT2::Ui::Windows if (ride.type >= RIDE_TYPE_COUNT) return nullptr; - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) return RideMainOpen(ride); auto* windowMgr = GetWindowManager(); @@ -7007,13 +7019,13 @@ namespace OpenRCT2::Ui::Windows // View for (int32_t i = stationIndex.ToUnderlying(); i >= 0; i--) { - if (ride.GetStations()[i].Start.IsNull()) + if (ride.getStations()[i].Start.IsNull()) { stationIndex = StationIndex::FromUnderlying(stationIndex.ToUnderlying() - 1); } } - w->SetViewIndex(1 + ride.NumTrains + stationIndex.ToUnderlying()); + w->SetViewIndex(1 + ride.numTrains + stationIndex.ToUnderlying()); return w; } @@ -7144,7 +7156,7 @@ namespace OpenRCT2::Ui::Windows auto ride = vehicle.GetRide(); auto viewVehicleIndex = w->GetViewIndex() - 1; - if (ride == nullptr || viewVehicleIndex < 0 || viewVehicleIndex >= ride->NumTrains) + if (ride == nullptr || viewVehicleIndex < 0 || viewVehicleIndex >= ride->numTrains) return; if (vehicle.Id != ride->vehicles[viewVehicleIndex]) diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index 5397dc4c25..dd6fd264d4 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -50,7 +50,6 @@ #include #include #include -#include #include #include #include @@ -256,13 +255,13 @@ namespace OpenRCT2::Ui::Windows _currentColourScheme = RideColourScheme::main; _currentSeatRotationAngle = 4; - _currentlySelectedTrack = currentRide->GetRideTypeDescriptor().StartTrackPiece; + _currentlySelectedTrack = currentRide->getRideTypeDescriptor().StartTrackPiece; _currentTrackPitchEnd = TrackPitch::None; _currentTrackRollEnd = TrackRoll::None; _currentTrackHasLiftHill = false; _currentTrackAlternative.clearAll(); - if (currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::startConstructionInverted)) + if (currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::startConstructionInverted)) _currentTrackAlternative.set(AlternativeTrackFlag::inverted); _previousTrackRollEnd = TrackRoll::None; @@ -270,7 +269,7 @@ namespace OpenRCT2::Ui::Windows _currentTrackPieceDirection = 0; _rideConstructionState = RideConstructionState::Place; - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); _autoOpeningShop = false; _autoRotatingShop = true; _trackPlaceCtrlState = false; @@ -305,27 +304,27 @@ namespace OpenRCT2::Ui::Windows if (RideTryGetOriginElement(*currentRide, nullptr)) { // Auto open shops if required. - if (currentRide->mode == RideMode::ShopStall && Config::Get().general.AutoOpenShops) + if (currentRide->mode == RideMode::shopStall && Config::Get().general.AutoOpenShops) { // HACK: Until we find a good a way to defer the game command for opening the shop, stop this // from getting stuck in an infinite loop as opening the currentRide will try to close this window if (!_autoOpeningShop) { _autoOpeningShop = true; - auto gameAction = RideSetStatusAction(currentRide->id, RideStatus::Open); + auto gameAction = RideSetStatusAction(currentRide->id, RideStatus::open); GameActions::Execute(&gameAction); _autoOpeningShop = false; } } - currentRide->SetToDefaultInspectionInterval(); + currentRide->setToDefaultInspectionInterval(); auto intent = Intent(WindowClass::Ride); intent.PutExtra(INTENT_EXTRA_RIDE_ID, currentRide->id.ToUnderlying()); ContextOpenIntent(&intent); } else { - auto gameAction = RideDemolishAction(currentRide->id, RIDE_MODIFY_DEMOLISH); + auto gameAction = RideDemolishAction(currentRide->id, RideModifyType::demolish); gameAction.SetFlags(GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED); GameActions::Execute(&gameAction); } @@ -341,11 +340,16 @@ namespace OpenRCT2::Ui::Windows { return; } - const auto& rtd = currentRide->GetRideTypeDescriptor(); + const auto& rtd = currentRide->getRideTypeDescriptor(); const auto currentTrackDrawerDescriptor = getCurrentTrackDrawerDescriptor(rtd); uint64_t disabledWidgets = 0; + if (_rideConstructionState == RideConstructionState::Place) + { + disabledWidgets |= (1uLL << WIDX_CONSTRUCT); + } + if (_currentlySelectedTrack.isTrackType) { disabledWidgets |= (1uLL << WIDX_SLOPE_GROUPBOX) | (1uLL << WIDX_BANKING_GROUPBOX) @@ -413,7 +417,7 @@ namespace OpenRCT2::Ui::Windows if (!IsTrackEnabled(TrackGroup::slope) && !IsTrackEnabled(TrackGroup::slopeSteepDown) && !IsTrackEnabled(TrackGroup::slopeSteepUp)) { - if (!currentRide->GetRideTypeDescriptor().SupportsTrackGroup(TrackGroup::reverseFreefall)) + if (!currentRide->getRideTypeDescriptor().SupportsTrackGroup(TrackGroup::reverseFreefall)) { // Disable all slopes disabledWidgets |= (1uLL << WIDX_SLOPE_GROUPBOX) | (1uLL << WIDX_SLOPE_DOWN_STEEP) @@ -434,8 +438,8 @@ namespace OpenRCT2::Ui::Windows disabledWidgets |= (1uLL << WIDX_SLOPE_DOWN) | (1uLL << WIDX_SLOPE_UP); } } - if (currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::upInclineRequiresLift) - && !GetGameState().Cheats.enableAllDrawableTrackPieces) + if (currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::upInclineRequiresLift) + && !getGameState().cheats.enableAllDrawableTrackPieces) { // Disable lift hill toggle and banking if current track piece is uphill if (_previousTrackPitchEnd == TrackPitch::Up25 || _previousTrackPitchEnd == TrackPitch::Up60 @@ -669,6 +673,12 @@ namespace OpenRCT2::Ui::Windows { disabledWidgets |= (1uLL << WIDX_CHAIN_LIFT); } + // Ensures that you can build an "unbanking turn", but not select a turn that start banked and + // turns to level (as that does not exist). + if (_currentTrackRollEnd != TrackRoll::None && _currentTrackPitchEnd != TrackPitch::None) + { + disabledWidgets |= (1uLL << WIDX_LEVEL); + } } if (_currentTrackPitchEnd == TrackPitch::Up90 || _previousTrackPitchEnd == TrackPitch::Up90) { @@ -767,7 +777,7 @@ namespace OpenRCT2::Ui::Windows { disabledWidgets |= (1uLL << WIDX_SLOPE_DOWN); } - if ((_currentTrackHasLiftHill) && !GetGameState().Cheats.enableChainLiftOnAllTrack) + if ((_currentTrackHasLiftHill) && !getGameState().cheats.enableChainLiftOnAllTrack) { if (_currentTrackPitchEnd != TrackPitch::None && !IsTrackEnabled(TrackGroup::liftHillCurve)) { @@ -799,7 +809,7 @@ namespace OpenRCT2::Ui::Windows } disabledWidgets |= (1uLL << WIDX_LEFT_CURVE_LARGE) | (1uLL << WIDX_RIGHT_CURVE_LARGE) | (1uLL << WIDX_SLOPE_DOWN_STEEP); - if (currentRide->GetRideTypeDescriptor().SupportsTrackGroup(TrackGroup::reverseFreefall)) + if (currentRide->getRideTypeDescriptor().SupportsTrackGroup(TrackGroup::reverseFreefall)) { disabledWidgets |= (1uLL << WIDX_STRAIGHT) | (1uLL << WIDX_RIGHT_CURVE) | (1uLL << WIDX_RIGHT_CURVE_SMALL) | (1uLL << WIDX_LEFT_CURVE_SMALL) | (1uLL << WIDX_LEFT_CURVE); @@ -813,7 +823,7 @@ namespace OpenRCT2::Ui::Windows } disabledWidgets |= (1uLL << WIDX_LEFT_CURVE_LARGE) | (1uLL << WIDX_RIGHT_CURVE_LARGE) | (1uLL << WIDX_SLOPE_UP_STEEP); - if (currentRide->GetRideTypeDescriptor().SupportsTrackGroup(TrackGroup::reverseFreefall)) + if (currentRide->getRideTypeDescriptor().SupportsTrackGroup(TrackGroup::reverseFreefall)) { disabledWidgets |= (1uLL << WIDX_STRAIGHT) | (1uLL << WIDX_RIGHT_CURVE) | (1uLL << WIDX_RIGHT_CURVE_SMALL) | (1uLL << WIDX_LEFT_CURVE_SMALL) | (1uLL << WIDX_LEFT_CURVE); @@ -861,8 +871,8 @@ namespace OpenRCT2::Ui::Windows if (_currentlySelectedTrack == TrackCurve::LeftSmall || _currentlySelectedTrack == TrackCurve::RightSmall) { if (_currentTrackPitchEnd == TrackPitch::None && _previousTrackRollEnd != TrackRoll::None - && (!currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::upInclineRequiresLift) - || GetGameState().Cheats.enableAllDrawableTrackPieces)) + && (!currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::upInclineRequiresLift) + || getGameState().cheats.enableAllDrawableTrackPieces)) { disabledWidgets &= ~(1uLL << WIDX_SLOPE_UP); } @@ -926,7 +936,7 @@ namespace OpenRCT2::Ui::Windows } // If chain lift cheat is enabled then show the chain lift widget no matter what - if (GetGameState().Cheats.enableChainLiftOnAllTrack) + if (getGameState().cheats.enableChainLiftOnAllTrack) { disabledWidgets &= ~(1uLL << WIDX_CHAIN_LIFT); } @@ -956,7 +966,7 @@ namespace OpenRCT2::Ui::Windows // Close construction window if currentRide is not closed, // editing currentRide while open will cause many issues until properly handled - if (currentRide->status != RideStatus::Closed && currentRide->status != RideStatus::Simulating) + if (currentRide->status != RideStatus::closed && currentRide->status != RideStatus::simulating) { Close(); return; @@ -1034,8 +1044,8 @@ namespace OpenRCT2::Ui::Windows auto currentRide = GetRide(_currentRideIndex); if (currentRide != nullptr) { - auto status = currentRide->status == RideStatus::Simulating ? RideStatus::Closed - : RideStatus::Simulating; + auto status = currentRide->status == RideStatus::simulating ? RideStatus::closed + : RideStatus::simulating; auto gameAction = RideSetStatusAction(currentRide->id, status); GameActions::Execute(&gameAction); } @@ -1252,7 +1262,7 @@ namespace OpenRCT2::Ui::Windows { _currentTrackRollEnd = TrackRoll::None; } - if (currentRide->GetRideTypeDescriptor().SupportsTrackGroup(TrackGroup::reverseFreefall)) + if (currentRide->getRideTypeDescriptor().SupportsTrackGroup(TrackGroup::reverseFreefall)) { if (_rideConstructionState == RideConstructionState::Front && _currentlySelectedTrack == TrackCurve::None) @@ -1347,7 +1357,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_CHAIN_LIFT: RideConstructionInvalidateCurrentTrack(); _currentTrackHasLiftHill = !_currentTrackHasLiftHill; - if ((_currentTrackHasLiftHill) && !GetGameState().Cheats.enableChainLiftOnAllTrack) + if ((_currentTrackHasLiftHill) && !getGameState().cheats.enableChainLiftOnAllTrack) _currentTrackAlternative.unset(AlternativeTrackFlag::alternativePieces); _currentTrackPrice = kMoney64Undefined; WindowRideConstructionUpdateActiveElements(); @@ -1400,7 +1410,7 @@ namespace OpenRCT2::Ui::Windows { auto trackSpeedIncrement = kDefaultSpeedIncrement; auto trackSpeedMinimum = kDefaultMinimumSpeed; - if (GetGameState().Cheats.unlockOperatingLimits) + if (getGameState().cheats.unlockOperatingLimits) { trackSpeedMinimum = 0; } @@ -1431,7 +1441,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_O_TRACK: RideConstructionInvalidateCurrentTrack(); _currentTrackAlternative.set(AlternativeTrackFlag::alternativePieces); - if (!GetGameState().Cheats.enableChainLiftOnAllTrack) + if (!getGameState().cheats.enableChainLiftOnAllTrack) _currentTrackHasLiftHill = false; _currentTrackPrice = kMoney64Undefined; WindowRideConstructionUpdateActiveElements(); @@ -1538,10 +1548,10 @@ namespace OpenRCT2::Ui::Windows StringId stringId = STR_RIDE_CONSTRUCTION_SPECIAL; if (_currentlySelectedTrack.isTrackType) { - const auto& rtd = currentRide->GetRideTypeDescriptor(); + const auto& rtd = currentRide->getRideTypeDescriptor(); const auto& ted = GetTrackElementDescriptor(_currentlySelectedTrack.trackType); stringId = ted.description; - if (stringId == STR_RAPIDS && rtd.Category != RIDE_CATEGORY_WATER) + if (stringId == STR_RAPIDS && rtd.Category != RideCategory::water) { stringId = STR_LOG_BUMPS; } @@ -1568,10 +1578,10 @@ namespace OpenRCT2::Ui::Windows // Simulate button auto& simulateWidget = widgets[WIDX_SIMULATE]; simulateWidget.type = WindowWidgetType::Empty; - if (currentRide->SupportsStatus(RideStatus::Simulating)) + if (currentRide->supportsStatus(RideStatus::simulating)) { simulateWidget.type = WindowWidgetType::FlatBtn; - if (currentRide->status == RideStatus::Simulating) + if (currentRide->status == RideStatus::simulating) { pressed_widgets |= (1uLL << WIDX_SIMULATE); } @@ -1582,7 +1592,7 @@ namespace OpenRCT2::Ui::Windows } // Set window title arguments - currentRide->FormatNameTo(ft); + currentRide->formatNameTo(ft); } static void OnDrawUpdateCoveredPieces(const TrackDrawerDescriptor& trackDrawerDescriptor, std::span widgets) @@ -1650,7 +1660,7 @@ namespace OpenRCT2::Ui::Windows DrawTextBasic(dpi, screenCoords, STR_BUILD_THIS, {}, { TextAlignment::CENTRE }); screenCoords.y += 11; - if (_currentTrackPrice != kMoney64Undefined && !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (_currentTrackPrice != kMoney64Undefined && !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(_currentTrackPrice); @@ -1671,7 +1681,7 @@ namespace OpenRCT2::Ui::Windows hold_down_widgets = (1u << WIDX_CONSTRUCT) | (1u << WIDX_DEMOLISH) | (1u << WIDX_NEXT_SECTION) | (1u << WIDX_PREVIOUS_SECTION); - if (rtd.HasFlag(RtdFlag::isShopOrFacility) || !currentRide->HasStation()) + if (rtd.HasFlag(RtdFlag::isShopOrFacility) || !currentRide->hasStation()) { widgets[WIDX_ENTRANCE_EXIT_GROUPBOX].type = WindowWidgetType::Empty; widgets[WIDX_ENTRANCE].type = WindowWidgetType::Empty; @@ -1788,17 +1798,17 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_SLOPE_UP_STEEP].type = WindowWidgetType::FlatBtn; } - const auto& gameState = GetGameState(); - if (currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::upInclineRequiresLift) + const auto& gameState = getGameState(); + if (currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::upInclineRequiresLift) && (_currentTrackPitchEnd == TrackPitch::Up25 || _currentTrackPitchEnd == TrackPitch::Up60) - && !gameState.Cheats.enableAllDrawableTrackPieces) + && !gameState.cheats.enableAllDrawableTrackPieces) { _currentTrackHasLiftHill = true; } if ((IsTrackEnabled(TrackGroup::liftHill) && !_currentlySelectedTrack.isTrackType) - || (gameState.Cheats.enableChainLiftOnAllTrack - && currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack))) + || (gameState.cheats.enableChainLiftOnAllTrack + && currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack))) { widgets[WIDX_CHAIN_LIFT].type = WindowWidgetType::FlatBtn; } @@ -1887,25 +1897,27 @@ namespace OpenRCT2::Ui::Windows } } + auto top = 118 + widgets[WIDX_TITLE].bottom; + auto bottom = top + 23; widgets[WIDX_BANKING_GROUPBOX].image = ImageId(STR_RIDE_CONSTRUCTION_ROLL_BANKING); widgets[WIDX_BANK_LEFT].image = ImageId(SPR_RIDE_CONSTRUCTION_LEFT_BANK); widgets[WIDX_BANK_LEFT].tooltip = STR_RIDE_CONSTRUCTION_ROLL_FOR_LEFT_CURVE_TIP; widgets[WIDX_BANK_LEFT].left = 69; widgets[WIDX_BANK_LEFT].right = 92; - widgets[WIDX_BANK_LEFT].top = 132; - widgets[WIDX_BANK_LEFT].bottom = 155; + widgets[WIDX_BANK_LEFT].top = top; + widgets[WIDX_BANK_LEFT].bottom = bottom; widgets[WIDX_BANK_STRAIGHT].image = ImageId(SPR_RIDE_CONSTRUCTION_NO_BANK); widgets[WIDX_BANK_STRAIGHT].tooltip = STR_RIDE_CONSTRUCTION_NO_ROLL_TIP; widgets[WIDX_BANK_STRAIGHT].left = 93; widgets[WIDX_BANK_STRAIGHT].right = 116; - widgets[WIDX_BANK_STRAIGHT].top = 132; - widgets[WIDX_BANK_STRAIGHT].bottom = 155; + widgets[WIDX_BANK_STRAIGHT].top = top; + widgets[WIDX_BANK_STRAIGHT].bottom = bottom; widgets[WIDX_BANK_RIGHT].image = ImageId(SPR_RIDE_CONSTRUCTION_RIGHT_BANK); widgets[WIDX_BANK_RIGHT].tooltip = STR_RIDE_CONSTRUCTION_ROLL_FOR_RIGHT_CURVE_TIP; widgets[WIDX_BANK_RIGHT].left = 117; widgets[WIDX_BANK_RIGHT].right = 140; - widgets[WIDX_BANK_RIGHT].top = 132; - widgets[WIDX_BANK_RIGHT].bottom = 155; + widgets[WIDX_BANK_RIGHT].top = top; + widgets[WIDX_BANK_RIGHT].bottom = bottom; widgets[WIDX_BANK_LEFT].type = WindowWidgetType::Empty; widgets[WIDX_BANK_STRAIGHT].type = WindowWidgetType::Empty; widgets[WIDX_BANK_RIGHT].type = WindowWidgetType::Empty; @@ -1960,7 +1972,8 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].type = WindowWidgetType::Button; widgets[WIDX_SPEED_SETTING_SPINNER_DOWN].text = STR_NUMERIC_DOWN; - ResizeSpinner(WIDX_SPEED_SETTING_SPINNER, { 12, 138 }, { 85, kSpinnerHeight }); + auto spinnerStart = 124 + widgets[WIDX_TITLE].bottom; + ResizeSpinner(WIDX_SPEED_SETTING_SPINNER, { 12, spinnerStart }, { 85, kSpinnerHeight }); hold_down_widgets |= (1uLL << WIDX_SPEED_SETTING_SPINNER_UP) | (1uLL << WIDX_SPEED_SETTING_SPINNER_DOWN); } @@ -2285,7 +2298,7 @@ namespace OpenRCT2::Ui::Windows if (NetworkGetMode() != NETWORK_MODE_NONE) { - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_TRACK_PLACE_ACTION_QUEUED; + _currentTrackSelectionFlags.set(TrackSelectionFlag::trackPlaceActionQueued); } const auto resultData = res.GetData(); @@ -2339,7 +2352,7 @@ namespace OpenRCT2::Ui::Windows Direction currentDirection = _currentTrackPieceDirection; OpenRCT2::TrackElemType type = _currentTrackPieceType; auto newCoords = GetTrackElementOriginAndApplyChanges( - { _currentTrackBegin, static_cast(direction & 3) }, type, 0, &tileElement, 0); + { _currentTrackBegin, static_cast(direction & 3) }, type, 0, &tileElement, {}); if (!newCoords.has_value()) { WindowRideConstructionUpdateActiveElements(); @@ -2370,7 +2383,7 @@ namespace OpenRCT2::Ui::Windows direction = _currentTrackPieceDirection; type = _currentTrackPieceType; newCoords = GetTrackElementOriginAndApplyChanges( - { _currentTrackBegin, static_cast(direction & 3) }, type, 0, &tileElement, 0); + { _currentTrackBegin, static_cast(direction & 3) }, type, 0, &tileElement, {}); if (!newCoords.has_value()) { @@ -2398,7 +2411,7 @@ namespace OpenRCT2::Ui::Windows if (currentRide != nullptr) { // When flat rides are deleted, the window should be reset so the currentRide can be placed again. - const auto& rtd = currentRide->GetRideTypeDescriptor(); + const auto& rtd = currentRide->getRideTypeDescriptor(); if (rtd.HasFlag(RtdFlag::isFlatRide) && !rtd.HasFlag(RtdFlag::isShopOrFacility)) { RideInitialiseConstructionWindow(*currentRide); @@ -2423,7 +2436,7 @@ namespace OpenRCT2::Ui::Windows void EntranceClick() { - if (ToolSet(*this, WIDX_ENTRANCE, Tool::Crosshair)) + if (ToolSet(*this, WIDX_ENTRANCE, Tool::crosshair)) { auto currentRide = GetRide(_currentRideIndex); if (currentRide != nullptr && !RideTryGetOriginElement(*currentRide, nullptr)) @@ -2436,7 +2449,7 @@ namespace OpenRCT2::Ui::Windows gRideEntranceExitPlaceType = ENTRANCE_TYPE_RIDE_ENTRANCE; gRideEntranceExitPlaceRideIndex = _currentRideIndex; gRideEntranceExitPlaceStationIndex = StationIndex::FromUnderlying(0); - InputSetFlag(INPUT_FLAG_6, true); + gInputFlags.set(InputFlag::unk6); RideConstructionInvalidateCurrentTrack(); if (_rideConstructionState != RideConstructionState::EntranceExit) { @@ -2449,7 +2462,7 @@ namespace OpenRCT2::Ui::Windows void ExitClick() { - if (ToolSet(*this, WIDX_EXIT, Tool::Crosshair)) + if (ToolSet(*this, WIDX_EXIT, Tool::crosshair)) { auto currentRide = GetRide(_currentRideIndex); if (!RideTryGetOriginElement(*currentRide, nullptr)) @@ -2462,7 +2475,7 @@ namespace OpenRCT2::Ui::Windows gRideEntranceExitPlaceType = ENTRANCE_TYPE_RIDE_EXIT; gRideEntranceExitPlaceRideIndex = _currentRideIndex; gRideEntranceExitPlaceStationIndex = StationIndex::FromUnderlying(0); - InputSetFlag(INPUT_FLAG_6, true); + gInputFlags.set(InputFlag::unk6); RideConstructionInvalidateCurrentTrack(); if (_rideConstructionState != RideConstructionState::EntranceExit) { @@ -2477,7 +2490,7 @@ namespace OpenRCT2::Ui::Windows { _currentTrackPitchEnd = slope; _currentTrackPrice = kMoney64Undefined; - if (_rideConstructionState == RideConstructionState::Front && !GetGameState().Cheats.enableChainLiftOnAllTrack) + if (_rideConstructionState == RideConstructionState::Front && !getGameState().cheats.enableChainLiftOnAllTrack) { switch (slope) { @@ -2499,7 +2512,7 @@ namespace OpenRCT2::Ui::Windows if (GetTrackElementOriginAndApplyChanges( { _currentTrackBegin, static_cast(_currentTrackPieceDirection & 3) }, _currentTrackPieceType, 0, - &tileElement, 0) + &tileElement, {}) != std::nullopt) { auto trackSetBrakeSpeed = TrackSetBrakeSpeedAction( @@ -2539,8 +2552,8 @@ namespace OpenRCT2::Ui::Windows auto currentRide = GetRide(_currentRideIndex); if (currentRide != nullptr) { - const auto& rtd = currentRide->GetRideTypeDescriptor(); - if (rtd.Category != RIDE_CATEGORY_WATER) + const auto& rtd = currentRide->getRideTypeDescriptor(); + if (rtd.Category != RideCategory::water) trackPieceStringId = STR_LOG_BUMPS; } } @@ -2573,7 +2586,7 @@ namespace OpenRCT2::Ui::Windows { GetTrackElementOriginAndApplyChanges( { _currentTrackBegin, static_cast(_currentTrackPieceDirection & 3) }, _currentTrackPieceType, - seatRotation, nullptr, TRACK_ELEMENT_SET_SEAT_ROTATION); + seatRotation, nullptr, { TrackElementSetFlag::seatRotation }); WindowRideConstructionUpdateActiveElements(); } @@ -2585,7 +2598,7 @@ namespace OpenRCT2::Ui::Windows gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; CoordsXYZD entranceOrExitCoords = RideGetEntranceOrExitPositionFromScreenPosition(screenCoords); - if (gRideEntranceExitPlaceDirection == INVALID_DIRECTION) + if (gRideEntranceExitPlaceDirection == kInvalidDirection) return; auto rideEntranceExitPlaceAction = RideEntranceExitPlaceAction( @@ -2604,7 +2617,7 @@ namespace OpenRCT2::Ui::Windows if (currentRide != nullptr && RideAreAllPossibleEntrancesAndExitsBuilt(*currentRide).Successful) { ToolCancel(); - if (!currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (!currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { windowMgr->CloseByClass(WindowClass::RideConstruction); } @@ -2619,7 +2632,7 @@ namespace OpenRCT2::Ui::Windows : WC_RIDE_CONSTRUCTION__WIDX_EXIT; ToolCancel(); - ToolSet(*this, newToolWidgetIndex, Tool::Crosshair); + ToolSet(*this, newToolWidgetIndex, Tool::crosshair); } }); auto res = GameActions::Execute(&rideEntranceExitPlaceAction); @@ -2677,10 +2690,10 @@ namespace OpenRCT2::Ui::Windows return; } - auto& gameState = GetGameState(); - auto preserveMapSize = gameState.MapSize; + auto& gameState = getGameState(); + auto preserveMapSize = gameState.mapSize; - gameState.MapSize = { kMaximumMapSizeTechnical, kMaximumMapSizeTechnical }; + gameState.mapSize = { kMaximumMapSizeTechnical, kMaximumMapSizeTechnical }; // Setup non changing parts of the temporary track tile element tempTrackTileElement.SetType(TileElementType::Track); @@ -2696,9 +2709,9 @@ namespace OpenRCT2::Ui::Windows tempTrackTileElement.AsTrack()->SetRideIndex(rideIndex); const auto& ted = GetTrackElementDescriptor(trackType); - const auto* rideEntry = currentRide->GetRideEntry(); + const auto* rideEntry = currentRide->getRideEntry(); auto clearanceHeight = (rideEntry != nullptr) ? rideEntry->Clearance - : currentRide->GetRideTypeDescriptor().Heights.ClearanceHeight; + : currentRide->getRideTypeDescriptor().Heights.ClearanceHeight; for (uint8_t i = 0; i < ted.numSequences; i++) { @@ -2746,7 +2759,7 @@ namespace OpenRCT2::Ui::Windows MapSetTileElement(southTileCoords, backupTileElementArrays[4]); } - gameState.MapSize = preserveMapSize; + gameState.mapSize = preserveMapSize; PaintSessionArrange(*session); PaintDrawStructs(*session); @@ -2815,7 +2828,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); - const auto& rtd = currentRide->GetRideTypeDescriptor(); + const auto& rtd = currentRide->getRideTypeDescriptor(); switch (rtd.ConstructionWindowContext) { case RideConstructionWindowContext::Maze: @@ -2896,7 +2909,7 @@ namespace OpenRCT2::Ui::Windows _currentTrackBegin.z = trackPos.z; _currentTrackPieceDirection = next_track.element->GetDirection(); _currentTrackPieceType = next_track.element->AsTrack()->GetTrackType(); - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); _rideConstructionState = RideConstructionState::Selected; _rideConstructionNextArrowPulse = 0; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; @@ -2942,7 +2955,7 @@ namespace OpenRCT2::Ui::Windows _currentTrackBegin.z = trackBeginEnd.begin_z; _currentTrackPieceDirection = trackBeginEnd.begin_direction; _currentTrackPieceType = trackBeginEnd.begin_element->AsTrack()->GetTrackType(); - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); _rideConstructionState = RideConstructionState::Selected; _rideConstructionNextArrowPulse = 0; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; @@ -3084,7 +3097,7 @@ namespace OpenRCT2::Ui::Windows { WindowRideConstructionUpdateEnabledTrackPieces(); if (auto currentRide = GetRide(_currentRideIndex); - !currentRide || currentRide->GetRideTypeDescriptor().specialType == RtdSpecialType::maze) + !currentRide || currentRide->getRideTypeDescriptor().specialType == RtdSpecialType::maze) { return; } @@ -3103,7 +3116,7 @@ namespace OpenRCT2::Ui::Windows TileElement* tileElement; if (GetTrackElementOriginAndApplyChanges( { _currentTrackBegin, static_cast(_currentTrackPieceDirection & 3) }, _currentTrackPieceType, 0, - &tileElement, 0) + &tileElement, {}) != std::nullopt) { _selectedTrackType = tileElement->AsTrack()->GetTrackType(); @@ -3128,11 +3141,11 @@ namespace OpenRCT2::Ui::Windows if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; - auto trackDrawerDescriptor = getCurrentTrackDrawerDescriptor(ride->GetRideTypeDescriptor()); + auto trackDrawerDescriptor = getCurrentTrackDrawerDescriptor(ride->getRideTypeDescriptor()); UpdateEnabledRideGroups(trackDrawerDescriptor); } @@ -3148,17 +3161,17 @@ namespace OpenRCT2::Ui::Windows SelectedLiftAndInverted liftHillAndAlternativeState{}; CoordsXYZ trackPos{}; - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK_PLACE_ACTION_QUEUED) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::trackPlaceActionQueued)) { return; } // Recheck if area is fine for new track. // Set by footpath placement - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_RECHECK) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::recheck)) { RideConstructionInvalidateCurrentTrack(); - _currentTrackSelectionFlags &= ~TRACK_SELECTION_FLAG_RECHECK; + _currentTrackSelectionFlags.unset(TrackSelectionFlag::recheck); } switch (_rideConstructionState) @@ -3167,7 +3180,7 @@ namespace OpenRCT2::Ui::Windows case RideConstructionState::Back: { // place ghost piece - if (!(_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK)) + if (!_currentTrackSelectionFlags.has(TrackSelectionFlag::track)) { if (WindowRideConstructionUpdateState( &type, &direction, &rideIndex, &liftHillAndAlternativeState, &trackPos, nullptr)) @@ -3196,7 +3209,7 @@ namespace OpenRCT2::Ui::Windows break; _rideConstructionNextArrowPulse = curTime + kArrowPulseDuration; - _currentTrackSelectionFlags ^= TRACK_SELECTION_FLAG_ARROW; + _currentTrackSelectionFlags.flip(TrackSelectionFlag::arrow); trackPos = _currentTrackBegin; direction = _currentTrackPieceDirection; type = _currentTrackPieceType; @@ -3208,7 +3221,7 @@ namespace OpenRCT2::Ui::Windows gMapSelectArrowPosition = trackPos; gMapSelectArrowDirection = direction; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ARROW) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::arrow)) gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE_ARROW; MapInvalidateTileFull(trackPos); break; @@ -3220,13 +3233,13 @@ namespace OpenRCT2::Ui::Windows break; _rideConstructionNextArrowPulse = curTime + kArrowPulseDuration; - _currentTrackSelectionFlags ^= TRACK_SELECTION_FLAG_ARROW; + _currentTrackSelectionFlags.flip(TrackSelectionFlag::arrow); direction = _currentTrackPieceDirection & 3; type = _currentTrackPieceType; - uint16_t flags = _currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ARROW ? TRACK_ELEMENT_SET_HIGHLIGHT_TRUE - : TRACK_ELEMENT_SET_HIGHLIGHT_FALSE; + auto flag = _currentTrackSelectionFlags.has(TrackSelectionFlag::arrow) ? TrackElementSetFlag::highlightOn + : TrackElementSetFlag::highlightOff; auto newCoords = GetTrackElementOriginAndApplyChanges( - { _currentTrackBegin, static_cast(direction) }, type, 0, nullptr, flags); + { _currentTrackBegin, static_cast(direction) }, type, 0, nullptr, { flag }); if (!newCoords.has_value()) { RideConstructionRemoveGhosts(); @@ -3243,7 +3256,7 @@ namespace OpenRCT2::Ui::Windows break; _rideConstructionNextArrowPulse = curTime + kArrowPulseDuration; - _currentTrackSelectionFlags ^= TRACK_SELECTION_FLAG_ARROW; + _currentTrackSelectionFlags.flip(TrackSelectionFlag::arrow); trackPos = CoordsXYZ{ _currentTrackBegin.x & 0xFFE0, _currentTrackBegin.y & 0xFFE0, _currentTrackBegin.z + 15 }; gMapSelectArrowPosition = trackPos; gMapSelectArrowDirection = 4; @@ -3258,7 +3271,7 @@ namespace OpenRCT2::Ui::Windows } } gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ARROW) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::arrow)) gMapSelectFlags |= MAP_SELECT_FLAG_ENABLE_ARROW; MapInvalidateTileFull(trackPos); break; @@ -3318,7 +3331,7 @@ namespace OpenRCT2::Ui::Windows return; } - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType != RtdSpecialType::maze) { auto* windowMgr = GetWindowManager(); @@ -3366,7 +3379,7 @@ namespace OpenRCT2::Ui::Windows _currentTrackBegin.x = mapCoords->x; _currentTrackBegin.y = mapCoords->y; _currentTrackBegin.z = z; - if ((_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK) && _currentTrackBegin == _previousTrackPiece) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::track) && _currentTrackBegin == _previousTrackPiece) { MapInvalidateMapSelectionTiles(); return; @@ -3421,7 +3434,7 @@ namespace OpenRCT2::Ui::Windows } if (_autoRotatingShop && _rideConstructionState == RideConstructionState::Place - && ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + && ride->getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) { PathElement* pathsByDir[kNumOrthogonalDirections]; @@ -3501,7 +3514,7 @@ namespace OpenRCT2::Ui::Windows gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_CONSTRUCT; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; CoordsXYZD entranceOrExitCoords = RideGetEntranceOrExitPositionFromScreenPosition(screenCoords); - if (gRideEntranceExitPlaceDirection == INVALID_DIRECTION) + if (gRideEntranceExitPlaceDirection == kInvalidDirection) { RideConstructionInvalidateCurrentTrack(); return; @@ -3517,7 +3530,7 @@ namespace OpenRCT2::Ui::Windows entranceOrExitCoords.direction = DirectionReverse(gRideEntranceExitPlaceDirection); StationIndex stationNum = gRideEntranceExitPlaceStationIndex; - if (!(_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT) + if (!_currentTrackSelectionFlags.has(TrackSelectionFlag::entranceOrExit) || entranceOrExitCoords != gRideEntranceExitGhostPosition || stationNum != gRideEntranceExitGhostStationIndex) { auto ride = GetRide(_currentRideIndex); @@ -3599,7 +3612,7 @@ namespace OpenRCT2::Ui::Windows // FIX not sure exactly why it starts trial and error place from a lower Z, but it causes issues with disable // clearance - if (!GetGameState().Cheats.disableClearanceChecks && z > kMinimumLandZ) + if (!getGameState().cheats.disableClearanceChecks && z > kMinimumLandZ) { z -= kLandHeightStep; } @@ -3612,7 +3625,7 @@ namespace OpenRCT2::Ui::Windows // search for z value to build at, up to max ride height int numAttempts = (z <= MAX_TRACK_HEIGHT ? ((MAX_TRACK_HEIGHT - z) / kCoordsZStep + 1) : 2); - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) { for (int32_t zAttempts = 0; zAttempts < numAttempts; ++zAttempts) @@ -3621,7 +3634,7 @@ namespace OpenRCT2::Ui::Windows _currentTrackBegin.x = mapCoords.x; _currentTrackBegin.y = mapCoords.y; _currentTrackBegin.z = z; - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); auto intent = Intent(INTENT_ACTION_UPDATE_MAZE_CONSTRUCTION); ContextBroadcastIntent(&intent); @@ -3662,8 +3675,8 @@ namespace OpenRCT2::Ui::Windows w = windowMgr->FindByClass(WindowClass::RideConstruction); if (w != nullptr) { - ToolSet(*w, WIDX_CONSTRUCT, Tool::Crosshair); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*w, WIDX_CONSTRUCT, Tool::crosshair); + gInputFlags.set(InputFlag::unk6); _trackPlaceCtrlState = false; _trackPlaceShiftState = false; } @@ -3689,7 +3702,7 @@ namespace OpenRCT2::Ui::Windows _currentTrackBegin.x = mapCoords.x; _currentTrackBegin.y = mapCoords.y; _currentTrackBegin.z = z; - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); WindowRideConstructionUpdateActiveElements(); auto* windowMgr = GetWindowManager(); @@ -4633,7 +4646,7 @@ namespace OpenRCT2::Ui::Windows { _currentTrackBegin.z = floor2(piecePos.z, kCoordsZStep); _rideConstructionState = RideConstructionState::Front; - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); _currentTrackPieceDirection = piecePos.direction & 3; auto savedSelectedTrack = _currentlySelectedTrack; auto savedPreviousTrackPitchEnd = _previousTrackPitchEnd; @@ -4687,7 +4700,7 @@ namespace OpenRCT2::Ui::Windows _currentTrackBegin = piecePos; _currentTrackPieceDirection = piecePos.direction; _currentTrackPieceType = type; - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); if (_rideConstructionState2 == RideConstructionState::Front) { RideSelectNextSection(); @@ -4719,7 +4732,7 @@ namespace OpenRCT2::Ui::Windows return kMoney64Undefined; RideConstructionRemoveGhosts(); - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) { int32_t flags = GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST; @@ -4731,7 +4744,7 @@ namespace OpenRCT2::Ui::Windows return kMoney64Undefined; _unkF440C5 = { trackPos, static_cast(trackDirection) }; - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_TRACK; + _currentTrackSelectionFlags.set(TrackSelectionFlag::track); ViewportSetVisibility(ViewportVisibility::UndergroundViewOff); if (_currentTrackPitchEnd != TrackPitch::None) ViewportSetVisibility(ViewportVisibility::TrackHeights); @@ -4751,7 +4764,7 @@ namespace OpenRCT2::Ui::Windows int16_t zBegin{}, zEnd{}; const auto& ted = GetTrackElementDescriptor(trackType); const TrackCoordinates& coords = ted.coordinates; - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { zBegin = coords.zBegin; zEnd = coords.zEnd; @@ -4762,7 +4775,7 @@ namespace OpenRCT2::Ui::Windows } _unkF440C5 = { trackPos.x, trackPos.y, trackPos.z + zBegin, static_cast(trackDirection) }; - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_TRACK; + _currentTrackSelectionFlags.set(TrackSelectionFlag::track); const auto resultData = res.GetData(); const auto visiblity = (resultData.GroundFlags & ELEMENT_IS_UNDERGROUND) ? ViewportVisibility::UndergroundViewOn @@ -4966,7 +4979,7 @@ namespace OpenRCT2::Ui::Windows } } - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); const auto trackDrawerDescriptor = getCurrentTrackDrawerDescriptor(rtd); if (trackDrawerDescriptor.HasCoveredPieces() && _currentTrackAlternative.has(AlternativeTrackFlag::alternativePieces)) { @@ -4978,7 +4991,7 @@ namespace OpenRCT2::Ui::Windows if (coveredVariant != TrackElemType::None && (availableGroups.get(EnumValue(ted.definition.group)))) { trackType = coveredVariant; - if (!GetGameState().Cheats.enableChainLiftOnAllTrack) + if (!getGameState().cheats.enableChainLiftOnAllTrack) liftHillAndInvertedState.unset(LiftHillAndInverted::liftHill); } } @@ -5028,7 +5041,7 @@ namespace OpenRCT2::Ui::Windows turnOffLiftHill = true; } - if (turnOffLiftHill && !GetGameState().Cheats.enableChainLiftOnAllTrack) + if (turnOffLiftHill && !getGameState().cheats.enableChainLiftOnAllTrack) { liftHillAndInvertedState.unset(LiftHillAndInverted::liftHill); _currentTrackHasLiftHill = false; @@ -5068,7 +5081,7 @@ namespace OpenRCT2::Ui::Windows void RideRestoreProvisionalTrackPiece() { - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::track)) { RideId rideIndex; int32_t direction; @@ -5093,7 +5106,7 @@ namespace OpenRCT2::Ui::Windows { auto rideIndex = _currentRideIndex; auto ride = GetRide(rideIndex); - if (ride == nullptr || !(_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK)) + if (ride == nullptr || !_currentTrackSelectionFlags.has(TrackSelectionFlag::track)) { return; } @@ -5102,7 +5115,7 @@ namespace OpenRCT2::Ui::Windows int32_t y = _unkF440C5.y; int32_t z = _unkF440C5.z; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) { const int32_t flags = GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST; diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index 6ba40441cc..c46e3788aa 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -176,13 +176,12 @@ namespace OpenRCT2::Ui::Windows { SetWidgets(_rideListWidgets); WindowInitScrollWidgets(*this); + WindowSetResize(*this, { 340, 240 }, { 400, 700 }); + page = PAGE_RIDES; selected_list_item = -1; frame_no = 0; - min_width = 340; - min_height = 240; - max_width = 400; - max_height = 700; + RefreshList(); list_information_type = 0; @@ -211,7 +210,8 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_SORT].left = width - 60; widgets[WIDX_SORT].right = width - 60 + 54; - ResizeDropdown(WIDX_CURRENT_INFORMATION_TYPE, { 150, 46 }, { width - 216, kDropdownHeight }); + auto dropdownStart = widgets[WIDX_CURRENT_INFORMATION_TYPE].top; + ResizeDropdown(WIDX_CURRENT_INFORMATION_TYPE, { 150, dropdownStart }, { width - 216, kDropdownHeight }); // Refreshing the list can be a very intensive operation // owing to its use of ride_has_any_track_elements(). @@ -301,7 +301,7 @@ namespace OpenRCT2::Ui::Windows int32_t selectedIndex = -1; for (int32_t type = INFORMATION_TYPE_STATUS; type <= lastType; type++) { - if ((GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if ((getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { if (ride_info_type_money_mapping[type]) { @@ -419,7 +419,7 @@ namespace OpenRCT2::Ui::Windows const auto selectedRideId = _rideList[index].Id; if (_quickDemolishMode && NetworkGetMode() != NETWORK_MODE_CLIENT) { - auto gameAction = RideDemolishAction(selectedRideId, RIDE_MODIFY_DEMOLISH); + auto gameAction = RideDemolishAction(selectedRideId, RideModifyType::demolish); GameActions::Execute(&gameAction); RefreshList(); } @@ -491,10 +491,10 @@ namespace OpenRCT2::Ui::Windows { auto c = static_cast(page); allClosed = std::none_of(rideManager.begin(), rideManager.end(), [c](const Ride& rideRef) { - return rideRef.GetClassification() == c && rideRef.status == RideStatus::Open; + return rideRef.getClassification() == c && rideRef.status == RideStatus::open; }); allOpen = std::none_of(rideManager.begin(), rideManager.end(), [c](const Ride& rideRef) { - return rideRef.GetClassification() == c && rideRef.status != RideStatus::Open; + return rideRef.getClassification() == c && rideRef.status != RideStatus::open; }); } @@ -569,7 +569,7 @@ namespace OpenRCT2::Ui::Windows // Ride name auto ft = Formatter(); - ridePtr->FormatNameTo(ft); + ridePtr->formatNameTo(ft); DrawTextEllipsised(dpi, { 0, y - 1 }, 159, format, ft); // Ride information @@ -582,11 +582,11 @@ namespace OpenRCT2::Ui::Windows case INFORMATION_TYPE_STATUS: formatSecondaryEnabled = false; ft.Rewind(); - ridePtr->FormatStatusTo(ft); + ridePtr->formatStatusTo(ft); // Make test red and bold if broken down or crashed - if ((ridePtr->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) - || (ridePtr->lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) + if ((ridePtr->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) + || (ridePtr->lifecycleFlags & RIDE_LIFECYCLE_CRASHED)) { format = STR_RED_OUTLINED_STRING; } @@ -617,14 +617,14 @@ namespace OpenRCT2::Ui::Windows break; case INFORMATION_TYPE_TOTAL_CUSTOMERS: formatSecondary = STR_RIDE_LIST_TOTAL_CUSTOMERS_LABEL; - ft.Add(ridePtr->total_customers); + ft.Add(ridePtr->totalCustomers); break; case INFORMATION_TYPE_TOTAL_PROFIT: formatSecondary = 0; - if (ridePtr->total_profit != kMoney64Undefined) + if (ridePtr->totalProfit != kMoney64Undefined) { formatSecondary = STR_RIDE_LIST_TOTAL_PROFIT_LABEL; - ft.Add(ridePtr->total_profit); + ft.Add(ridePtr->totalProfit); } break; case INFORMATION_TYPE_CUSTOMERS: @@ -633,7 +633,7 @@ namespace OpenRCT2::Ui::Windows break; case INFORMATION_TYPE_AGE: { - const auto age = DateGetYear(ridePtr->GetAge()); + const auto age = DateGetYear(ridePtr->getAge()); switch (age) { case 0: @@ -651,23 +651,23 @@ namespace OpenRCT2::Ui::Windows } case INFORMATION_TYPE_INCOME: formatSecondary = 0; - if (ridePtr->income_per_hour != kMoney64Undefined) + if (ridePtr->incomePerHour != kMoney64Undefined) { formatSecondary = STR_RIDE_LIST_INCOME_LABEL; - ft.Add(ridePtr->income_per_hour); + ft.Add(ridePtr->incomePerHour); } break; case INFORMATION_TYPE_RUNNING_COST: formatSecondary = STR_RIDE_LIST_RUNNING_COST_UNKNOWN; - if (ridePtr->upkeep_cost != kMoney64Undefined) + if (ridePtr->upkeepCost != kMoney64Undefined) { formatSecondary = STR_RIDE_LIST_RUNNING_COST_LABEL; - ft.Add(ridePtr->upkeep_cost * 16); + ft.Add(ridePtr->upkeepCost * 16); } break; case INFORMATION_TYPE_QUEUE_LENGTH: { - const auto queueLength = ridePtr->GetTotalQueueLength(); + const auto queueLength = ridePtr->getTotalQueueLength(); ft.Add(queueLength); if (queueLength == 1) @@ -686,7 +686,7 @@ namespace OpenRCT2::Ui::Windows } case INFORMATION_TYPE_QUEUE_TIME: { - const auto maxQueueTime = ridePtr->GetMaxQueueTime(); + const auto maxQueueTime = ridePtr->getMaxQueueTime(); ft.Add(maxQueueTime); if (maxQueueTime > 1) @@ -700,7 +700,7 @@ namespace OpenRCT2::Ui::Windows break; } case INFORMATION_TYPE_RELIABILITY: - ft.Add(ridePtr->reliability_percentage); + ft.Add(ridePtr->reliabilityPercentage); formatSecondary = STR_RELIABILITY_LABEL; break; case INFORMATION_TYPE_DOWN_TIME: @@ -709,11 +709,11 @@ namespace OpenRCT2::Ui::Windows break; case INFORMATION_TYPE_GUESTS_FAVOURITE: formatSecondary = 0; - if (ridePtr->IsRide()) + if (ridePtr->isRide()) { - ft.Add(ridePtr->guests_favourite); - formatSecondary = ridePtr->guests_favourite == 1 ? STR_GUESTS_FAVOURITE_LABEL - : STR_GUESTS_FAVOURITE_PLURAL_LABEL; + ft.Add(ridePtr->guestsFavourite); + formatSecondary = ridePtr->guestsFavourite == 1 ? STR_GUESTS_FAVOURITE_LABEL + : STR_GUESTS_FAVOURITE_PLURAL_LABEL; } break; case INFORMATION_TYPE_EXCITEMENT: @@ -822,20 +822,20 @@ namespace OpenRCT2::Ui::Windows _rideList.clear(); for (auto& rideRef : GetRideManager()) { - if (rideRef.GetClassification() != static_cast(page) - || (rideRef.status == RideStatus::Closed && !RideHasAnyTrackElements(rideRef))) + if (rideRef.getClassification() != static_cast(page) + || (rideRef.status == RideStatus::closed && !RideHasAnyTrackElements(rideRef))) { continue; } - if (rideRef.window_invalidate_flags & RIDE_INVALIDATE_RIDE_LIST) + if (rideRef.windowInvalidateFlags & RIDE_INVALIDATE_RIDE_LIST) { - rideRef.window_invalidate_flags &= ~RIDE_INVALIDATE_RIDE_LIST; + rideRef.windowInvalidateFlags &= ~RIDE_INVALIDATE_RIDE_LIST; } RideListEntry entry{}; entry.Id = rideRef.id; - entry.Name = rideRef.GetName(); + entry.Name = rideRef.getName(); _rideList.push_back(std::move(entry)); } @@ -862,12 +862,12 @@ namespace OpenRCT2::Ui::Windows break; case INFORMATION_TYPE_TOTAL_CUSTOMERS: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.total_customers <= otherRide.total_customers; + return thisRide.totalCustomers <= otherRide.totalCustomers; }); break; case INFORMATION_TYPE_TOTAL_PROFIT: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.total_profit <= otherRide.total_profit; + return thisRide.totalProfit <= otherRide.totalProfit; }); break; case INFORMATION_TYPE_CUSTOMERS: @@ -877,32 +877,32 @@ namespace OpenRCT2::Ui::Windows break; case INFORMATION_TYPE_AGE: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.build_date <= otherRide.build_date; + return thisRide.buildDate <= otherRide.buildDate; }); break; case INFORMATION_TYPE_INCOME: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.income_per_hour <= otherRide.income_per_hour; + return thisRide.incomePerHour <= otherRide.incomePerHour; }); break; case INFORMATION_TYPE_RUNNING_COST: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.upkeep_cost <= otherRide.upkeep_cost; + return thisRide.upkeepCost <= otherRide.upkeepCost; }); break; case INFORMATION_TYPE_QUEUE_LENGTH: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.GetTotalQueueLength() <= otherRide.GetTotalQueueLength(); + return thisRide.getTotalQueueLength() <= otherRide.getTotalQueueLength(); }); break; case INFORMATION_TYPE_QUEUE_TIME: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.GetMaxQueueTime() <= otherRide.GetMaxQueueTime(); + return thisRide.getMaxQueueTime() <= otherRide.getMaxQueueTime(); }); break; case INFORMATION_TYPE_RELIABILITY: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.reliability_percentage <= otherRide.reliability_percentage; + return thisRide.reliabilityPercentage <= otherRide.reliabilityPercentage; }); break; case INFORMATION_TYPE_DOWN_TIME: @@ -912,7 +912,7 @@ namespace OpenRCT2::Ui::Windows break; case INFORMATION_TYPE_GUESTS_FAVOURITE: SortListByPredicate([](const Ride& thisRide, const Ride& otherRide) -> bool { - return thisRide.guests_favourite <= otherRide.guests_favourite; + return thisRide.guestsFavourite <= otherRide.guestsFavourite; }); break; case INFORMATION_TYPE_EXCITEMENT: @@ -948,10 +948,10 @@ namespace OpenRCT2::Ui::Windows { for (auto& rideRef : GetRideManager()) { - if (rideRef.status != RideStatus::Closed - && rideRef.GetClassification() == static_cast(page)) + if (rideRef.status != RideStatus::closed + && rideRef.getClassification() == static_cast(page)) { - auto gameAction = RideSetStatusAction(rideRef.id, RideStatus::Closed); + auto gameAction = RideSetStatusAction(rideRef.id, RideStatus::closed); GameActions::Execute(&gameAction); } } @@ -962,9 +962,9 @@ namespace OpenRCT2::Ui::Windows { for (auto& rideRef : GetRideManager()) { - if (rideRef.status != RideStatus::Open && rideRef.GetClassification() == static_cast(page)) + if (rideRef.status != RideStatus::open && rideRef.getClassification() == static_cast(page)) { - auto gameAction = RideSetStatusAction(rideRef.id, RideStatus::Open); + auto gameAction = RideSetStatusAction(rideRef.id, RideStatus::open); GameActions::Execute(&gameAction); } } diff --git a/src/openrct2-ui/windows/SavePrompt.cpp b/src/openrct2-ui/windows/SavePrompt.cpp index 215c5b916c..e23fb73b44 100644 --- a/src/openrct2-ui/windows/SavePrompt.cpp +++ b/src/openrct2-ui/windows/SavePrompt.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -74,9 +73,9 @@ namespace OpenRCT2::Ui::Windows { STR_NEW_GAME, STR_SAVE_BEFORE_QUITTING }, }; - static void WindowSavePromptCallback(int32_t result, const utf8* path) + static void WindowSavePromptCallback(ModalResult result, const utf8* path) { - if (result == MODAL_RESULT_OK) + if (result == ModalResult::ok) { GameLoadOrQuitNoSavePrompt(); } @@ -95,7 +94,7 @@ namespace OpenRCT2::Ui::Windows void OnOpen() override { - bool canSave = !(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)); + bool canSave = !(isInTrackDesignerOrManager()); if (canSave) SetWidgets(_savePromptWidgets); @@ -117,11 +116,11 @@ namespace OpenRCT2::Ui::Windows if (canSave) { StringId stringId = window_save_prompt_labels[EnumValue(_promptMode)][0]; - if (stringId == STR_LOAD_GAME_PROMPT_TITLE && gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (stringId == STR_LOAD_GAME_PROMPT_TITLE && gLegacyScene == LegacyScene::scenarioEditor) { stringId = STR_LOAD_LANDSCAPE_PROMPT_TITLE; } - else if (stringId == STR_QUIT_GAME_PROMPT_TITLE && gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + else if (stringId == STR_QUIT_GAME_PROMPT_TITLE && gLegacyScene == LegacyScene::scenarioEditor) { stringId = STR_QUIT_SCENARIO_EDITOR; } @@ -145,7 +144,8 @@ namespace OpenRCT2::Ui::Windows void OnMouseUp(WidgetIndex widgetIndex) override { - if (gScreenFlags & (SCREEN_FLAGS_TITLE_DEMO | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (gLegacyScene == LegacyScene::titleSequence || gLegacyScene == LegacyScene::trackDesigner + || gLegacyScene == LegacyScene::trackDesignsManager) { switch (widgetIndex) { @@ -166,11 +166,12 @@ namespace OpenRCT2::Ui::Windows { std::unique_ptr intent; - if (gScreenFlags & (SCREEN_FLAGS_EDITOR)) + if (isInEditorMode()) { intent = std::make_unique(WindowClass::Loadsave); - intent->PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE); - intent->PutExtra(INTENT_EXTRA_PATH, GetGameState().ScenarioName); + intent->PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); + intent->PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::landscape); + intent->PutExtra(INTENT_EXTRA_PATH, getGameState().scenarioName); } else { @@ -205,13 +206,13 @@ namespace OpenRCT2::Ui::Windows WindowBase* SavePromptOpen() { PromptMode prompt_mode = gSavePromptMode; - if (prompt_mode == PromptMode::Quit) + if (prompt_mode == PromptMode::quit) { - prompt_mode = PromptMode::SaveBeforeQuit; + prompt_mode = PromptMode::saveBeforeQuit; } // do not show save prompt if we're in the title demo and click on load game - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) { GameLoadOrQuitNoSavePrompt(); return nullptr; @@ -249,7 +250,7 @@ namespace OpenRCT2::Ui::Windows int32_t width = WW_SAVE; int32_t height = WH_SAVE; - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (isInTrackDesignerOrManager()) { width = WW_QUIT; height = WH_QUIT; diff --git a/src/openrct2-ui/windows/ScenarioSelect.cpp b/src/openrct2-ui/windows/ScenarioSelect.cpp index 501b89f722..08bde9f6bb 100644 --- a/src/openrct2-ui/windows/ScenarioSelect.cpp +++ b/src/openrct2-ui/windows/ScenarioSelect.cpp @@ -13,15 +13,20 @@ #include #include #include +#include +#include +#include #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -31,17 +36,18 @@ namespace OpenRCT2::Ui::Windows { - static constexpr StringId kWindowTitle = STR_SELECT_SCENARIO; - static constexpr int32_t kWindowWidth = 734; - static constexpr int32_t kWindowHeight = 384; + static constexpr int32_t kInitialNumUnlockedScenarios = 5; + static constexpr uint8_t kNumTabs = 10; + static constexpr int32_t kPreviewPaneWidth = 179; static constexpr int32_t kSidebarWidth = 180; - static constexpr int32_t kTabWidth = 92; static constexpr int32_t kTabHeight = 34; - static constexpr int32_t kTrueFontSize = 24; static constexpr int32_t kWidgetsStart = 17; static constexpr int32_t kTabsStart = kWidgetsStart; - static constexpr int32_t kInitialNumUnlockedScenarios = 5; - constexpr uint8_t kNumTabs = 10; + static constexpr int32_t kTabWidth = 92; + static constexpr int32_t kTrueFontSize = 24; + static constexpr int32_t kWindowHeight = 384; + static constexpr int32_t kWindowWidth = 734; + static constexpr StringId kWindowTitle = STR_SELECT_SCENARIO; enum class ListItemType : uint8_t { @@ -117,6 +123,7 @@ namespace OpenRCT2::Ui::Windows std::function _callback; std::vector _listItems; const ScenarioIndexEntry* _highlightedScenario = nullptr; + ParkPreview _preview; public: ScenarioSelectWindow(std::function callback) @@ -150,9 +157,12 @@ namespace OpenRCT2::Ui::Windows if (widgetIndex >= WIDX_TAB1 && widgetIndex <= WIDX_TAB10) { selected_tab = widgetIndex - 4; - _highlightedScenario = nullptr; Config::Get().interface.ScenarioselectLastTab = selected_tab; Config::Save(); + + _highlightedScenario = nullptr; + _preview = {}; + InitialiseListItems(); Invalidate(); OnResize(); @@ -162,10 +172,69 @@ namespace OpenRCT2::Ui::Windows } } + void LoadPreview() + { + _preview = {}; + + if (_highlightedScenario == nullptr) + return; + + auto& path = _highlightedScenario->Path; + auto fs = FileStream(path, FileMode::open); + + ClassifiedFileInfo info; + if (!TryClassifyFile(&fs, &info) || info.Type != FileType::park) + { + // TODO: try loading a preview from a 'scenario meta' object file + return; + } + + try + { + auto& objectRepository = GetContext()->GetObjectRepository(); + auto parkImporter = ParkImporter::CreateParkFile(objectRepository); + parkImporter->LoadFromStream(&fs, false, true, path.c_str()); + _preview = parkImporter->GetParkPreview(); + } + catch (const std::exception& e) + { + LOG_ERROR("Could not get preview:", e.what()); + _preview = {}; + return; + } + } + + ScreenCoordsXY DrawPreview(DrawPixelInfo& dpi, ScreenCoordsXY screenPos) + { + // Find minimap image to draw, if available + PreviewImage* image = nullptr; + for (auto& candidate : _preview.images) + { + if (candidate.type == PreviewImageType::miniMap) + { + image = &candidate; + break; + } + } + + if (image == nullptr) + return screenPos; + + // Draw frame + auto startFrameX = width - (kPreviewPaneWidth / 2) - (image->width / 2); + auto frameStartPos = ScreenCoordsXY(windowPos.x + startFrameX, screenPos.y + 15); + auto frameEndPos = frameStartPos + ScreenCoordsXY(image->width + 1, image->height + 1); + GfxFillRectInset(dpi, { frameStartPos, frameEndPos }, colours[1], INSET_RECT_F_60 | INSET_RECT_FLAG_FILL_MID_LIGHT); + + // Draw image, if available + auto imagePos = frameStartPos + ScreenCoordsXY(1, 1); + drawPreviewImage(*image, dpi, imagePos); + + return frameEndPos; + } + void OnDraw(DrawPixelInfo& dpi) override { - const ScenarioIndexEntry* scenario; - DrawWidgets(dpi); StringId format = STR_WINDOW_COLOUR_2_STRINGID; @@ -185,7 +254,7 @@ namespace OpenRCT2::Ui::Windows continue; auto ft = Formatter(); - if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.scenarioSelectMode == ScenarioSelectMode::origin) { ft.Add(kScenarioOriginStringIds[i]); } @@ -199,7 +268,7 @@ namespace OpenRCT2::Ui::Windows } // Return if no scenario highlighted - scenario = _highlightedScenario; + auto* scenario = _highlightedScenario; if (scenario == nullptr) { if (_showLockedInformation) @@ -242,7 +311,10 @@ namespace OpenRCT2::Ui::Windows ft.Add(scenario->Name.c_str()); DrawTextEllipsised( dpi, screenPos + ScreenCoordsXY{ 85, 0 }, 170, STR_WINDOW_COLOUR_2_STRINGID, ft, { TextAlignment::CENTRE }); - screenPos.y += 15; + + // Draw preview + auto previewEnd = DrawPreview(dpi, screenPos); + screenPos.y = previewEnd.y + 15; // Scenario details ft = Formatter(); @@ -289,7 +361,7 @@ namespace OpenRCT2::Ui::Windows ResizeFrameWithPage(); const int32_t bottomMargin = Config::Get().general.DebuggingTools ? 17 : 5; - widgets[WIDX_SCENARIOLIST].right = width - 179; + widgets[WIDX_SCENARIOLIST].right = width - kPreviewPaneWidth; widgets[WIDX_SCENARIOLIST].bottom = height - bottomMargin; } @@ -353,6 +425,7 @@ namespace OpenRCT2::Ui::Windows if (_highlightedScenario != selected) { _highlightedScenario = selected; + LoadPreview(); Invalidate(); } else if (_showLockedInformation != originalShowLockedInformation) @@ -538,7 +611,12 @@ namespace OpenRCT2::Ui::Windows std::optional megaParkListItemIndex = std::nullopt; int32_t numUnlocks = kInitialNumUnlockedScenarios; - uint8_t currentHeading = UINT8_MAX; + union + { + uint8_t raw = UINT8_MAX; + ScenarioCategory category; + ScenarioSource source; + } currentHeading{}; for (size_t i = 0; i < numScenarios; i++) { const ScenarioIndexEntry* scenario = ScenarioRepositoryGetByIndex(i); @@ -548,35 +626,35 @@ namespace OpenRCT2::Ui::Windows // Category heading StringId headingStringId = kStringIdNone; - if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.scenarioSelectMode == ScenarioSelectMode::origin) { - if (selected_tab != static_cast(ScenarioSource::Real) && currentHeading != scenario->Category) + if (selected_tab != EnumValue(ScenarioSource::Real) && currentHeading.category != scenario->Category) { - currentHeading = scenario->Category; - headingStringId = kScenarioCategoryStringIds[currentHeading]; + currentHeading.category = scenario->Category; + headingStringId = kScenarioCategoryStringIds[currentHeading.raw]; } } else { - if (selected_tab <= SCENARIO_CATEGORY_EXPERT) + if (selected_tab <= EnumValue(ScenarioCategory::expert)) { - if (currentHeading != static_cast(scenario->SourceGame)) + if (currentHeading.source != scenario->SourceGame) { - currentHeading = static_cast(scenario->SourceGame); - headingStringId = kScenarioOriginStringIds[currentHeading]; + currentHeading.source = scenario->SourceGame; + headingStringId = kScenarioOriginStringIds[currentHeading.raw]; } } - else if (selected_tab == SCENARIO_CATEGORY_OTHER) + else if (selected_tab == EnumValue(ScenarioCategory::other)) { - int32_t category = scenario->Category; - if (category <= SCENARIO_CATEGORY_REAL) + auto category = scenario->Category; + if (category <= ScenarioCategory::real) { - category = SCENARIO_CATEGORY_OTHER; + category = ScenarioCategory::other; } - if (currentHeading != category) + if (currentHeading.category != category) { - currentHeading = category; - headingStringId = kScenarioCategoryStringIds[category]; + currentHeading.category = category; + headingStringId = kScenarioCategoryStringIds[currentHeading.raw]; } } } @@ -654,7 +732,7 @@ namespace OpenRCT2::Ui::Windows bool IsScenarioVisible(const ScenarioIndexEntry& scenario) const { - if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.scenarioSelectMode == ScenarioSelectMode::origin) { if (static_cast(scenario.SourceGame) != selected_tab) { @@ -663,12 +741,12 @@ namespace OpenRCT2::Ui::Windows } else { - int32_t category = scenario.Category; - if (category > SCENARIO_CATEGORY_OTHER) + auto category = scenario.Category; + if (category > ScenarioCategory::other) { - category = SCENARIO_CATEGORY_OTHER; + category = ScenarioCategory::other; } - if (category != selected_tab) + if (EnumValue(category) != selected_tab) { return false; } @@ -678,7 +756,7 @@ namespace OpenRCT2::Ui::Windows bool IsLockingEnabled() const { - if (Config::Get().general.ScenarioSelectMode != SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.scenarioSelectMode != ScenarioSelectMode::origin) return false; if (!Config::Get().general.ScenarioUnlockingEnabled) return false; @@ -695,18 +773,18 @@ namespace OpenRCT2::Ui::Windows for (size_t i = 0; i < numScenarios; i++) { const ScenarioIndexEntry* scenario = ScenarioRepositoryGetByIndex(i); - if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.scenarioSelectMode == ScenarioSelectMode::origin) { showPages |= 1 << static_cast(scenario->SourceGame); } else { - int32_t category = scenario->Category; - if (category > SCENARIO_CATEGORY_OTHER) + auto category = scenario->Category; + if (category > ScenarioCategory::other) { - category = SCENARIO_CATEGORY_OTHER; + category = ScenarioCategory::other; } - showPages |= 1 << category; + showPages |= 1 << EnumValue(category); } } @@ -723,7 +801,7 @@ namespace OpenRCT2::Ui::Windows } } - int32_t y = kTabsStart; + int32_t y = widgets[WIDX_TAB1].top; for (int32_t i = 0; i < kNumTabs; i++) { auto& widget = widgets[i + WIDX_TAB1]; diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 03b43f8e3d..56bb99659b 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -517,11 +517,11 @@ namespace OpenRCT2::Ui::Windows if (gWindowSceneryEyedropperEnabled) { - gCurrentToolId = Tool::Crosshair; + gCurrentToolId = Tool::crosshair; } else if (_sceneryPaintEnabled) { - gCurrentToolId = Tool::PaintDown; + gCurrentToolId = Tool::paintDown; } else { @@ -531,7 +531,7 @@ namespace OpenRCT2::Ui::Windows { if (tabSelectedScenery.SceneryType == SCENERY_TYPE_BANNER) { - gCurrentToolId = Tool::EntranceDown; + gCurrentToolId = Tool::entranceDown; } else if (tabSelectedScenery.SceneryType == SCENERY_TYPE_LARGE) { @@ -556,7 +556,7 @@ namespace OpenRCT2::Ui::Windows } else { - gCurrentToolId = Tool::Arrow; + gCurrentToolId = Tool::arrow; } } } @@ -691,7 +691,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_SCENERY_ROTATE_OBJECTS_BUTTON].type = WindowWidgetType::FlatBtn; } - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) + if (gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode) { widgets[WIDX_RESTRICT_SCENERY].type = WindowWidgetType::Button; if (IsSceneryItemRestricted(tabSelectedScenery)) @@ -782,13 +782,14 @@ namespace OpenRCT2::Ui::Windows const auto lastTabWidget = &widgets[WIDX_SCENERY_TAB_1 + lastTabIndex]; windowWidth = std::max(windowWidth, lastTabWidget->right + 3); + auto tabTop = widgets[WIDX_SCENERY_TITLE].bottom + 3; if (GetSceneryTabInfoForMisc() != nullptr) { auto miscTabWidget = &widgets[WIDX_SCENERY_TAB_1 + _tabEntries.size() - 2]; miscTabWidget->left = windowWidth - 2 * TabWidth - 6; miscTabWidget->right = windowWidth - TabWidth - 7; - miscTabWidget->top = InitTabPosY; - miscTabWidget->bottom = InitTabPosY + TabHeight; + miscTabWidget->top = tabTop; + miscTabWidget->bottom = tabTop + TabHeight; } if (_tabEntries.back().IsAll()) @@ -796,8 +797,8 @@ namespace OpenRCT2::Ui::Windows auto allTabWidget = &widgets[WIDX_SCENERY_TAB_1 + _tabEntries.size() - 1]; allTabWidget->left = windowWidth - TabWidth - 6; allTabWidget->right = windowWidth - 7; - allTabWidget->top = InitTabPosY; - allTabWidget->bottom = InitTabPosY + TabHeight; + allTabWidget->top = tabTop; + allTabWidget->bottom = tabTop + TabHeight; } } @@ -841,7 +842,7 @@ namespace OpenRCT2::Ui::Windows } auto [name, price] = GetNameAndPrice(selectedSceneryEntry); - if (price != kMoney64Undefined && !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (price != kMoney64Undefined && !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(price); @@ -2365,7 +2366,7 @@ namespace OpenRCT2::Ui::Windows void Sub6E1F34UpdateScreenCoordsAndButtonsPressed(bool canRaiseItem, ScreenCoordsXY& screenPos) { - if (!canRaiseItem && !GetGameState().Cheats.disableSupportLimits) + if (!canRaiseItem && !getGameState().cheats.disableSupportLimits) { gSceneryCtrlPressed = false; gSceneryShiftPressed = false; @@ -3298,8 +3299,8 @@ namespace OpenRCT2::Ui::Windows else { auto* toolWindow = ContextOpenWindow(WindowClass::Scenery); - ToolSet(*toolWindow, WIDX_SCENERY_BACKGROUND, Tool::Arrow); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*toolWindow, WIDX_SCENERY_BACKGROUND, Tool::arrow); + gInputFlags.set(InputFlag::unk6); } } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/ServerList.cpp b/src/openrct2-ui/windows/ServerList.cpp index 8fbe786e40..678a71c5b5 100644 --- a/src/openrct2-ui/windows/ServerList.cpp +++ b/src/openrct2-ui/windows/ServerList.cpp @@ -30,11 +30,11 @@ namespace OpenRCT2::Ui::Windows { - #define WWIDTH_MIN 500 - #define WHEIGHT_MIN 300 - #define WWIDTH_MAX 1200 - #define WHEIGHT_MAX 800 - #define ITEM_HEIGHT (3 + 9 + 3) + static constexpr int32_t kWindowWidthMin = 500; + static constexpr int32_t kWindowHeightMin = 288; + static constexpr int32_t kWindowWidthMax = 1200; + static constexpr int32_t kWindowHeightMax = 788; + static constexpr int32_t kItemHeight = (3 + 9 + 3); constexpr size_t MaxPlayerNameLength = 32; @@ -64,9 +64,7 @@ namespace OpenRCT2::Ui::Windows // clang-format off static constexpr Widget _serverListWidgets[] = { - MakeWidget({ 0, 0}, {341, 91}, WindowWidgetType::Frame, WindowColour::Primary ), // panel / background - MakeWidget({ 1, 1}, {338, 14}, WindowWidgetType::Caption, WindowColour::Primary, STR_SERVER_LIST, STR_WINDOW_TITLE_TIP), // title bar - MakeWidget({327, 2}, { 11, 12}, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP), // close x button + WINDOW_SHIM(STR_SERVER_LIST, 340, 90), MakeWidget({100, 20}, {245, 12}, WindowWidgetType::TextBox, WindowColour::Secondary ), // player name text box MakeWidget({ 6, 37}, {489, 226}, WindowWidgetType::Scroll, WindowColour::Secondary ), // server list MakeWidget({ 6, 53}, {101, 14}, WindowWidgetType::Button, WindowColour::Secondary, STR_FETCH_SERVERS ), // fetch servers button @@ -98,18 +96,14 @@ namespace OpenRCT2::Ui::Windows SetWidgets(_serverListWidgets); widgets[WIDX_PLAYER_NAME_INPUT].string = const_cast(_playerName.c_str()); InitScrollWidgets(); + no_list_items = 0; selected_list_item = -1; frame_no = 0; - min_width = 320; - min_height = 90; - max_width = min_width; - max_height = min_height; - page = 0; list_information_type = 0; - WindowSetResize(*this, WWIDTH_MIN, WHEIGHT_MIN, WWIDTH_MAX, WHEIGHT_MAX); + WindowSetResize(*this, { kWindowWidthMin, kWindowHeightMin }, { kWindowWidthMax, kWindowHeightMax }); no_list_items = static_cast(_serverList.GetCount()); @@ -166,7 +160,7 @@ namespace OpenRCT2::Ui::Windows void OnResize() override { - WindowSetResize(*this, WWIDTH_MIN, WHEIGHT_MIN, WWIDTH_MAX, WHEIGHT_MAX); + WindowSetResize(*this, { kWindowWidthMin, kWindowHeightMin }, { kWindowWidthMax, kWindowHeightMax }); } void OnDropdown(WidgetIndex widgetIndex, int32_t selectedIndex) override @@ -215,7 +209,7 @@ namespace OpenRCT2::Ui::Windows ScreenSize OnScrollGetSize(int32_t scrollIndex) override { - return { 0, no_list_items * ITEM_HEIGHT }; + return { 0, no_list_items * kItemHeight }; } void OnScrollMouseDown(int32_t scrollIndex, const ScreenCoordsXY& screenCoords) override @@ -248,7 +242,7 @@ namespace OpenRCT2::Ui::Windows { auto& listWidget = widgets[WIDX_LIST]; - int32_t itemIndex = screenCoords.y / ITEM_HEIGHT; + int32_t itemIndex = screenCoords.y / kItemHeight; bool showNetworkVersionTooltip = false; if (itemIndex < 0 || itemIndex >= no_list_items) { @@ -356,7 +350,7 @@ namespace OpenRCT2::Ui::Windows if (highlighted) { GfxFilterRect( - dpi, { 0, screenCoords.y, listWidgetWidth, screenCoords.y + ITEM_HEIGHT }, + dpi, { 0, screenCoords.y, listWidgetWidth, screenCoords.y + kItemHeight }, FilterPaletteID::PaletteDarken1); _version = serverDetails.Version; } @@ -428,7 +422,7 @@ namespace OpenRCT2::Ui::Windows screenCoords.x = right - numPlayersStringWidth; DrawText(dpi, screenCoords + ScreenCoordsXY{ 0, 3 }, { colours[1] }, players); - screenCoords.y += ITEM_HEIGHT; + screenCoords.y += kItemHeight; } } @@ -553,7 +547,7 @@ namespace OpenRCT2::Ui::Windows return window; window = windowMgr->Create( - WindowClass::ServerList, WWIDTH_MIN, WHEIGHT_MIN, WF_10 | WF_RESIZABLE | WF_CENTRE_SCREEN); + WindowClass::ServerList, kWindowWidthMin, kWindowHeightMin, WF_10 | WF_RESIZABLE | WF_CENTRE_SCREEN); return window; } diff --git a/src/openrct2-ui/windows/ServerStart.cpp b/src/openrct2-ui/windows/ServerStart.cpp index 4bd5750a35..8858520ba0 100644 --- a/src/openrct2-ui/windows/ServerStart.cpp +++ b/src/openrct2-ui/windows/ServerStart.cpp @@ -47,9 +47,7 @@ namespace OpenRCT2::Ui::Windows // clang-format off static constexpr Widget _windowServerStartWidgets[] = { - MakeWidget({ 0, 0 }, { WW, WH }, WindowWidgetType::Frame, WindowColour::Primary), // panel / background - MakeWidget({ 1, 1 }, { 298, 14 }, WindowWidgetType::Caption, WindowColour::Primary, STR_START_SERVER,STR_WINDOW_TITLE_TIP), // title bar - MakeWidget({ WW - 13, 2 }, { 11, 12 }, WindowWidgetType::CloseBox, WindowColour::Primary, STR_CLOSE_X,STR_CLOSE_WINDOW_TIP), // close x button + WINDOW_SHIM(STR_START_SERVER, WW, WH), MakeWidget({ 120, 20 }, { 173, 13 }, WindowWidgetType::TextBox, WindowColour::Secondary), // port text box MakeWidget({ 120, 36 }, { 173, 13 }, WindowWidgetType::TextBox, WindowColour::Secondary), // name text box MakeWidget({ 120, 52 }, { 173, 13 }, WindowWidgetType::TextBox, WindowColour::Secondary), // description text box @@ -73,13 +71,11 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_DESCRIPTION_INPUT].string = _description; widgets[WIDX_GREETING_INPUT].string = _greeting; widgets[WIDX_PASSWORD_INPUT].string = _password; - InitScrollWidgets(); - frame_no = 0; - min_width = width; - min_height = height; - max_width = min_width; - max_height = min_height; + InitScrollWidgets(); + WindowSetResize(*this, { width, height }, { width, height }); + + frame_no = 0; page = 0; list_information_type = 0; @@ -138,7 +134,8 @@ namespace OpenRCT2::Ui::Windows case WIDX_LOAD_SERVER: NetworkSetPassword(_password); auto intent = Intent(WindowClass::Loadsave); - intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::park); intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(LoadSaveCallback)); ContextOpenIntent(&intent); break; @@ -271,9 +268,9 @@ namespace OpenRCT2::Ui::Windows } } - static void LoadSaveCallback(int32_t result, const utf8* path) + static void LoadSaveCallback(ModalResult result, const utf8* path) { - if (result == MODAL_RESULT_OK) + if (result == ModalResult::ok) { GameNotifyMapChange(); GetContext()->LoadParkFromFile(path); diff --git a/src/openrct2-ui/windows/ShortcutKeys.cpp b/src/openrct2-ui/windows/ShortcutKeys.cpp index 420b400e47..ac759fb9ac 100644 --- a/src/openrct2-ui/windows/ShortcutKeys.cpp +++ b/src/openrct2-ui/windows/ShortcutKeys.cpp @@ -190,10 +190,7 @@ namespace OpenRCT2::Ui::Windows InitialiseWidgets(); InitialiseList(); - min_width = WW; - min_height = WH; - max_width = WW_SC_MAX; - max_height = WH_SC_MAX; + WindowSetResize(*this, { WW, WH }, { WW_SC_MAX, WH_SC_MAX }); } void OnClose() override @@ -204,7 +201,7 @@ namespace OpenRCT2::Ui::Windows void OnResize() override { - WindowSetResize(*this, min_width, min_height, max_width, max_height); + WindowSetResize(*this, { min_width, min_height }, { max_width, max_height }); } void OnUpdate() override diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index 5e4220b3b4..b48cb9f891 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -391,7 +391,7 @@ namespace OpenRCT2::Ui::Windows WindowBase* wind = windowMgr->FindByNumber(WindowClass::Peep, peepnum); if (wind != nullptr) { - ToolSet(*wind, WC_STAFF__WIDX_PICKUP, Tool::Picker); + ToolSet(*wind, WC_STAFF__WIDX_PICKUP, Tool::picker); } }); GameActions::Execute(&pickupAction); @@ -605,36 +605,14 @@ namespace OpenRCT2::Ui::Windows void OverviewResize() { - min_width = WW; - max_width = 500; - min_height = WH; - max_height = 450; - - if (width < min_width) - { - width = min_width; - Invalidate(); - } - if (width > max_width) - { - Invalidate(); - width = max_width; - } - if (height < min_height) - { - height = min_height; - Invalidate(); - } - if (height > max_height) - { - Invalidate(); - height = max_height; - } + WindowSetResize(*this, { WW, WH }, { 500, 450 }); if (viewport != nullptr) { - int32_t newWidth = width - 30; - int32_t newHeight = height - 62; + auto widget = widgets[WIDX_VIEWPORT]; + auto newWidth = widget.width() - 1; + auto newHeight = widget.height() - 1; + viewport->pos = windowPos + ScreenCoordsXY{ widget.left + 1, widget.top + 1 }; // Update the viewport size if (viewport->width != newWidth || viewport->height != newHeight) @@ -932,31 +910,7 @@ namespace OpenRCT2::Ui::Windows void OptionsResize() { - min_width = 190; - max_width = 190; - min_height = 126; - max_height = 126; - - if (width < min_width) - { - width = min_width; - Invalidate(); - } - if (width > max_width) - { - Invalidate(); - width = max_width; - } - if (height < min_height) - { - height = min_height; - Invalidate(); - } - if (height > max_height) - { - Invalidate(); - height = max_height; - } + WindowSetResize(*this, { 190, 126 }, { 190, 126 }); } void OptionsUpdate() @@ -977,7 +931,7 @@ namespace OpenRCT2::Ui::Windows auto screenCoords = windowPos + ScreenCoordsXY{ widgets[WIDX_RESIZE].left + 4, widgets[WIDX_RESIZE].top + 4 }; - if (!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(GetStaffWage(staff->AssignedStaffType)); @@ -1035,31 +989,7 @@ namespace OpenRCT2::Ui::Windows void StatsResize() { - min_width = 190; - max_width = 190; - min_height = 126; - max_height = 126; - - if (width < min_width) - { - width = min_width; - Invalidate(); - } - if (width > max_width) - { - Invalidate(); - width = max_width; - } - if (height < min_height) - { - height = min_height; - Invalidate(); - } - if (height > max_height) - { - Invalidate(); - height = max_height; - } + WindowSetResize(*this, { 190, 126 }, { 190, 126 }); } void StatsUpdate() @@ -1119,18 +1049,22 @@ namespace OpenRCT2::Ui::Windows ToolCancel(); } - void SetPage(int32_t pageNum) + void SetPage(int32_t newPage) { CancelTools(); - int32_t listen = 0; - if (page == WINDOW_STAFF_OVERVIEW && viewport != nullptr) + bool listen = false; + if (page == WINDOW_STAFF_OVERVIEW && newPage == WINDOW_STAFF_OVERVIEW && viewport != nullptr) { - if (!(viewport->flags & VIEWPORT_FLAG_SOUND_ON)) - listen = 1; + viewport->flags ^= VIEWPORT_FLAG_SOUND_ON; + listen = (viewport->flags & VIEWPORT_FLAG_SOUND_ON) != 0; } - page = pageNum; + // Skip setting page if we're already on this page, unless we're initialising the window + if (newPage == page && !widgets.empty()) + return; + + page = newPage; frame_no = 0; pressed_widgets = 0; hold_down_widgets = 0; diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index d412cc9d02..ffc89ece0c 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -122,12 +122,9 @@ namespace OpenRCT2::Ui::Windows { SetWidgets(_staffListWidgets); WindowInitScrollWidgets(*this); + WindowSetResize(*this, { WW, WH }, { MAX_WW, MAX_WH }); widgets[WIDX_STAFF_LIST_UNIFORM_COLOUR_PICKER].type = WindowWidgetType::Empty; - min_width = WW; - min_height = WH; - max_width = MAX_WW; - max_height = MAX_WH; RefreshList(); } @@ -151,7 +148,7 @@ namespace OpenRCT2::Ui::Windows break; } case WIDX_STAFF_LIST_SHOW_PATROL_AREA_BUTTON: - if (!ToolSet(*this, WIDX_STAFF_LIST_SHOW_PATROL_AREA_BUTTON, Tool::Crosshair)) + if (!ToolSet(*this, WIDX_STAFF_LIST_SHOW_PATROL_AREA_BUTTON, Tool::crosshair)) { ShowGridlines(); SetPatrolAreaToRender(GetSelectedStaffType()); @@ -170,18 +167,6 @@ namespace OpenRCT2::Ui::Windows void OnResize() override { - min_width = WW; - min_height = WH; - if (width < min_width) - { - width = min_width; - Invalidate(); - } - if (height < min_height) - { - height = min_height; - Invalidate(); - } ResizeFrameWithPage(); } @@ -296,11 +281,12 @@ namespace OpenRCT2::Ui::Windows DrawWidgets(dpi); DrawTabImages(dpi); - if (!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { auto ft = Formatter(); ft.Add(GetStaffWage(GetSelectedStaffType())); - DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ width - 155, 32 }, STR_COST_PER_MONTH, ft); + auto y = widgets[WIDX_STAFF_LIST_TITLE].bottom + 17; + DrawTextBasic(dpi, windowPos + ScreenCoordsXY{ width - 155, y }, STR_COST_PER_MONTH, ft); } if (GetSelectedStaffType() != StaffType::Entertainer) @@ -584,7 +570,7 @@ namespace OpenRCT2::Ui::Windows auto* wind = ContextOpenIntent(&intent); if (wind != nullptr) { - ToolSet(*wind, WC_STAFF__WIDX_PICKUP, Tool::Picker); + ToolSet(*wind, WC_STAFF__WIDX_PICKUP, Tool::picker); } }); GameActions::Execute(&pickupAction); @@ -608,10 +594,10 @@ namespace OpenRCT2::Ui::Windows void DrawTabImages(DrawPixelInfo& dpi) const { - const auto& gameState = GetGameState(); - DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_HANDYMEN, AnimationPeepType::Handyman, gameState.StaffHandymanColour); - DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_MECHANICS, AnimationPeepType::Mechanic, gameState.StaffMechanicColour); - DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_SECURITY, AnimationPeepType::Security, gameState.StaffSecurityColour); + const auto& gameState = getGameState(); + DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_HANDYMEN, AnimationPeepType::Handyman, gameState.staffHandymanColour); + DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_MECHANICS, AnimationPeepType::Mechanic, gameState.staffMechanicColour); + DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_SECURITY, AnimationPeepType::Security, gameState.staffSecurityColour); DrawTabImage(dpi, WINDOW_STAFF_LIST_TAB_ENTERTAINERS, AnimationPeepType::Entertainer); } diff --git a/src/openrct2-ui/windows/TextInput.cpp b/src/openrct2-ui/windows/TextInput.cpp index dbca27e43a..404bf0b78a 100644 --- a/src/openrct2-ui/windows/TextInput.cpp +++ b/src/openrct2-ui/windows/TextInput.cpp @@ -172,7 +172,7 @@ namespace OpenRCT2::Ui::Windows int32_t newHeight = CalculateWindowHeight(_buffer.data()); if (newHeight != height) { - WindowSetResize(*this, WW, newHeight, WW, newHeight); + WindowSetResize(*this, { WW, newHeight }, { WW, newHeight }); } widgets[WIDX_OKAY].top = newHeight - 22; @@ -198,8 +198,7 @@ namespace OpenRCT2::Ui::Windows { DrawWidgets(dpi); - ScreenCoordsXY screenCoords; - screenCoords.y = windowPos.y + 25; + auto screenCoords = windowPos + ScreenCoordsXY{ WW / 2, widgets[WIDX_TITLE].bottom + 13 }; int32_t no_lines = 0; @@ -207,14 +206,12 @@ namespace OpenRCT2::Ui::Windows { auto ft = Formatter(); ft.Add(_description.c_str()); - DrawTextWrapped( - dpi, { windowPos.x + WW / 2, screenCoords.y }, WW, STR_STRING, ft, { colours[1], TextAlignment::CENTRE }); + DrawTextWrapped(dpi, screenCoords, WW, STR_STRING, ft, { colours[1], TextAlignment::CENTRE }); } else { DrawTextWrapped( - dpi, { windowPos.x + WW / 2, screenCoords.y }, WW, _descriptionStringId, _descriptionArgs, - { colours[1], TextAlignment::CENTRE }); + dpi, screenCoords, WW, _descriptionStringId, _descriptionArgs, { colours[1], TextAlignment::CENTRE }); } screenCoords.y += 25; diff --git a/src/openrct2-ui/windows/Themes.cpp b/src/openrct2-ui/windows/Themes.cpp index 012b4a2a5d..a21143b55a 100644 --- a/src/openrct2-ui/windows/Themes.cpp +++ b/src/openrct2-ui/windows/Themes.cpp @@ -266,102 +266,29 @@ namespace OpenRCT2::Ui::Windows SetWidgets(_themesWidgets); WindowThemesInitVars(); - WindowInitScrollWidgets(*this); + WindowSetResize(*this, { 320, 107 }, { 320, 107 }); + list_information_type = 0; _classIndex = -1; _buttonIndex = -1; - min_width = 320; - min_height = 107; - max_width = 320; - max_height = 107; } void OnResize() override { if (_selected_tab == WINDOW_THEMES_TAB_SETTINGS) { - min_width = 320; - min_height = 107; - max_width = 320; - max_height = 107; - - if (width < min_width) - { - width = min_width; + if (WindowSetResize(*this, { 320, 107 }, { 320, 107 })) GfxInvalidateScreen(); - } - if (height < min_height) - { - height = min_height; - GfxInvalidateScreen(); - } - if (width > max_width) - { - width = max_width; - GfxInvalidateScreen(); - } - if (height > max_height) - { - height = max_height; - GfxInvalidateScreen(); - } } else if (_selected_tab == WINDOW_THEMES_TAB_FEATURES) { - min_width = 320; - min_height = 122; - max_width = 320; - max_height = 122; - - if (width < min_width) - { - width = min_width; + if (WindowSetResize(*this, { 320, 122 }, { 320, 122 })) GfxInvalidateScreen(); - } - if (height < min_height) - { - height = min_height; - GfxInvalidateScreen(); - } - if (width > max_width) - { - width = max_width; - GfxInvalidateScreen(); - } - if (height > max_height) - { - height = max_height; - GfxInvalidateScreen(); - } } else { - min_width = 320; - min_height = 270; - max_width = 320; - max_height = 450; - - if (width < min_width) - { - width = min_width; - Invalidate(); - } - if (height < min_height) - { - height = min_height; - Invalidate(); - } - if (width > max_width) - { - width = max_width; - Invalidate(); - } - if (height > max_height) - { - height = max_height; - Invalidate(); - } + WindowSetResize(*this, { 320, 270 }, { 320, 450 }); } ResizeFrameWithPage(); diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index 1ba6e89a6a..cb3f5a2c32 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -513,17 +513,14 @@ static uint64_t PageDisabledWidgets[] = { public: void OnOpen() override { - min_width = MIN_WW; - min_height = MIN_WH; - max_width = MAX_WW; - max_height = MAX_WH; + WindowSetResize(*this, { MIN_WW, MIN_WH }, { MAX_WW, MAX_WH }); windowTileInspectorSelectedIndex = -1; SetPage(TileInspectorPage::Default); WindowInitScrollWidgets(*this); _tileSelected = false; - ToolSet(*this, WIDX_BACKGROUND, Tool::Crosshair); + ToolSet(*this, WIDX_BACKGROUND, Tool::crosshair); } void OnUpdate() override @@ -1248,7 +1245,7 @@ static uint64_t PageDisabledWidgets[] = { if (rideTile != nullptr) { ft = Formatter(); - rideTile->FormatNameTo(ft); + rideTile->formatNameTo(ft); DrawTextBasic( dpi, screenCoords + ScreenCoordsXY{ 0, 11 }, STR_TILE_INSPECTOR_TRACK_RIDE_NAME, ft, { colours[1] }); @@ -1767,6 +1764,10 @@ static uint64_t PageDisabledWidgets[] = { private: void SetPage(const TileInspectorPage p) { + // Skip setting page if we're already on this page, unless we're initialising the window + if (tileInspectorPage == p && !widgets.empty()) + return; + Invalidate(); // subtract current page height, then add new page height if (tileInspectorPage != TileInspectorPage::Default) diff --git a/src/openrct2-ui/windows/TitleExit.cpp b/src/openrct2-ui/windows/TitleExit.cpp index f765f7d29e..ac9321a943 100644 --- a/src/openrct2-ui/windows/TitleExit.cpp +++ b/src/openrct2-ui/windows/TitleExit.cpp @@ -58,6 +58,6 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); return windowMgr->Create( WindowClass::TitleExit, ScreenCoordsXY(ContextGetWidth() - 40, ContextGetHeight() - 64), 40, 64, - WF_STICK_TO_BACK | WF_TRANSPARENT); + WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/TitleLogo.cpp b/src/openrct2-ui/windows/TitleLogo.cpp index 00f57bc76f..19b34036a3 100644 --- a/src/openrct2-ui/windows/TitleLogo.cpp +++ b/src/openrct2-ui/windows/TitleLogo.cpp @@ -73,7 +73,7 @@ namespace OpenRCT2::Ui::Windows if (window == nullptr) { window = windowMgr->Create( - WindowClass::TitleLogo, ScreenCoordsXY(0, 0), WW, WH, WF_STICK_TO_BACK | WF_TRANSPARENT); + WindowClass::TitleLogo, ScreenCoordsXY(0, 0), WW, WH, WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR); } return window; } diff --git a/src/openrct2-ui/windows/TitleMenu.cpp b/src/openrct2-ui/windows/TitleMenu.cpp index 737f7ef528..c046b7a135 100644 --- a/src/openrct2-ui/windows/TitleMenu.cpp +++ b/src/openrct2-ui/windows/TitleMenu.cpp @@ -246,7 +246,7 @@ namespace OpenRCT2::Ui::Windows auto context = OpenRCT2::GetContext(); auto env = context->GetPlatformEnvironment(); auto uiContext = context->GetUiContext(); - uiContext->OpenFolder(env->GetDirectoryPath(OpenRCT2::DIRBASE::USER)); + uiContext->OpenFolder(env->GetDirectoryPath(OpenRCT2::DirBase::user)); break; } default: @@ -290,6 +290,6 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); return windowMgr->Create( WindowClass::TitleMenu, ScreenCoordsXY(0, ContextGetHeight() - 182), 0, windowHeight, - WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_BACKGROUND); + WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/TitleOptions.cpp b/src/openrct2-ui/windows/TitleOptions.cpp index 5358c56fd8..8c96a37bda 100644 --- a/src/openrct2-ui/windows/TitleOptions.cpp +++ b/src/openrct2-ui/windows/TitleOptions.cpp @@ -59,7 +59,7 @@ namespace OpenRCT2::Ui::Windows { window = windowMgr->Create( WindowClass::TitleOptions, ScreenCoordsXY(ContextGetWidth() - 80, 0), 80, 15, - WF_STICK_TO_BACK | WF_TRANSPARENT); + WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR); } return window; diff --git a/src/openrct2-ui/windows/TitleVersion.cpp b/src/openrct2-ui/windows/TitleVersion.cpp index 3e9735d89e..df500fac83 100644 --- a/src/openrct2-ui/windows/TitleVersion.cpp +++ b/src/openrct2-ui/windows/TitleVersion.cpp @@ -46,7 +46,7 @@ namespace OpenRCT2::Ui::Windows { window = windowMgr->Create( WindowClass::TitleVersion, ScreenCoordsXY(kTextOffset, ContextGetHeight() - 30), WW, WH, - WF_STICK_TO_BACK | WF_TRANSPARENT); + WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR); } return window; } diff --git a/src/openrct2-ui/windows/Tooltip.cpp b/src/openrct2-ui/windows/Tooltip.cpp index f00a89a8be..e802b2f374 100644 --- a/src/openrct2-ui/windows/Tooltip.cpp +++ b/src/openrct2-ui/windows/Tooltip.cpp @@ -150,7 +150,7 @@ namespace OpenRCT2::Ui::Windows gTooltipCloseTimeout = 0; gTooltipWidget.window_classification = WindowClass::Null; InputSetState(InputState::Normal); - InputSetFlag(INPUT_FLAG_4, false); + gInputFlags.unset(InputFlag::unk4); } void WindowTooltipShow(const OpenRCT2String& message, ScreenCoordsXY screenCoords) @@ -162,7 +162,8 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); windowMgr->Create( - std::move(tooltipWindow), WindowClass::Tooltip, windowPos, width, height, WF_TRANSPARENT | WF_STICK_TO_FRONT); + std::move(tooltipWindow), WindowClass::Tooltip, windowPos, width, height, + WF_TRANSPARENT | WF_STICK_TO_FRONT | WF_NO_TITLE_BAR); } void WindowTooltipOpen(WindowBase* widgetWindow, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index 944c36729c..431297b18d 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -40,7 +40,6 @@ #include #include #include -#include #include #include #include @@ -426,16 +425,16 @@ namespace OpenRCT2::Ui::Windows // New game is only available in the normal game. Skip one position to avoid incorrect mappings in the menus // of the other modes. - if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR)) + if (gLegacyScene == LegacyScene::scenarioEditor) selectedIndex += 1; // Quicksave is only available in the normal game. Skip one position to avoid incorrect mappings in the // menus of the other modes. - if (gScreenFlags & (SCREEN_FLAGS_SCENARIO_EDITOR) && selectedIndex > DDIDX_LOAD_GAME) + if (gLegacyScene == LegacyScene::scenarioEditor && selectedIndex > DDIDX_LOAD_GAME) selectedIndex += 1; // Track designer and track designs manager start with Screenshot, not Load/save - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (isInTrackDesignerOrManager()) selectedIndex += DDIDX_SCREENSHOT; // The "Update available" menu item is only available when there is one @@ -447,7 +446,7 @@ namespace OpenRCT2::Ui::Windows case DDIDX_NEW_GAME: { auto loadOrQuitAction = LoadOrQuitAction( - LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeNewGame); + LoadOrQuitModes::OpenSavePrompt, PromptMode::saveBeforeNewGame); GameActions::Execute(&loadOrQuitAction); break; } @@ -462,11 +461,12 @@ namespace OpenRCT2::Ui::Windows SaveGame(); break; case DDIDX_SAVE_GAME_AS: - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) { auto intent = Intent(WindowClass::Loadsave); - intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_LANDSCAPE); - intent.PutExtra(INTENT_EXTRA_PATH, GetGameState().ScenarioName); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::landscape); + intent.PutExtra(INTENT_EXTRA_PATH, getGameState().scenarioName); ContextOpenIntent(&intent); } else @@ -506,7 +506,7 @@ namespace OpenRCT2::Ui::Windows windowMgr->CloseByClass(WindowClass::ManageTrackDesign); windowMgr->CloseByClass(WindowClass::TrackDeletePrompt); auto loadOrQuitAction = LoadOrQuitAction( - LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeQuit); + LoadOrQuitModes::OpenSavePrompt, PromptMode::saveBeforeQuit); GameActions::Execute(&loadOrQuitAction); break; } @@ -645,18 +645,18 @@ namespace OpenRCT2::Ui::Windows if (!Config::Get().interface.ToolbarShowRotateAnticlockwise) widgets[WIDX_ROTATE_ANTI_CLOCKWISE].type = WindowWidgetType::Empty; - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR || gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::scenarioEditor || gLegacyScene == LegacyScene::trackDesignsManager) { widgets[WIDX_PAUSE].type = WindowWidgetType::Empty; } - if ((GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) || !Config::Get().interface.ToolbarShowFinances) + if ((getGameState().park.Flags & PARK_FLAGS_NO_MONEY) || !Config::Get().interface.ToolbarShowFinances) widgets[WIDX_FINANCES].type = WindowWidgetType::Empty; } void ApplyEditorMode() { - if ((gScreenFlags & SCREEN_FLAGS_EDITOR) == 0) + if (isInEditorMode() == 0) { return; } @@ -669,22 +669,22 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_NEWS].type = WindowWidgetType::Empty; widgets[WIDX_NETWORK].type = WindowWidgetType::Empty; - auto& gameState = GetGameState(); - if (gameState.EditorStep != EditorStep::LandscapeEditor) + auto& gameState = getGameState(); + if (gameState.editorStep != EditorStep::LandscapeEditor) { widgets[WIDX_LAND].type = WindowWidgetType::Empty; widgets[WIDX_WATER].type = WindowWidgetType::Empty; } - if (gameState.EditorStep != EditorStep::RollercoasterDesigner) + if (gameState.editorStep != EditorStep::RollercoasterDesigner) { widgets[WIDX_RIDES].type = WindowWidgetType::Empty; widgets[WIDX_CONSTRUCT_RIDE].type = WindowWidgetType::Empty; widgets[WIDX_FASTFORWARD].type = WindowWidgetType::Empty; } - if (gameState.EditorStep != EditorStep::LandscapeEditor - && gameState.EditorStep != EditorStep::RollercoasterDesigner) + if (gameState.editorStep != EditorStep::LandscapeEditor + && gameState.editorStep != EditorStep::RollercoasterDesigner) { widgets[WIDX_MAP].type = WindowWidgetType::Empty; widgets[WIDX_SCENERY].type = WindowWidgetType::Empty; @@ -878,7 +878,7 @@ namespace OpenRCT2::Ui::Windows void OnDraw(DrawPixelInfo& dpi) override { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); int32_t imgId; WindowDrawWidgets(*this, dpi); @@ -891,7 +891,7 @@ namespace OpenRCT2::Ui::Windows imgId = SPR_TOOLBAR_STAFF; if (WidgetIsPressed(*this, WIDX_STAFF)) imgId++; - GfxDrawSprite(dpi, ImageId(imgId, gameState.StaffHandymanColour, gameState.StaffMechanicColour), screenPos); + GfxDrawSprite(dpi, ImageId(imgId, gameState.staffHandymanColour, gameState.staffMechanicColour), screenPos); } // Draw fast forward button @@ -922,7 +922,7 @@ namespace OpenRCT2::Ui::Windows GfxDrawSprite(dpi, ImageId(SPR_G2_SANDBOX), screenPos); // Draw an overlay if clearance checks are disabled - if (GetGameState().Cheats.disableClearanceChecks) + if (getGameState().cheats.disableClearanceChecks) { auto colour = ColourWithFlags{ COLOUR_DARK_ORANGE }.withFlag(ColourFlag::withOutline, true); DrawTextBasic( @@ -1015,7 +1015,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); auto* window = windowMgr->Create( WindowClass::TopToolbar, ScreenCoordsXY(0, 0), ContextGetWidth(), kTopToolbarHeight + 1, - WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND); + WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR); window->SetWidgets(_topToolbarWidgets); @@ -1185,7 +1185,7 @@ namespace OpenRCT2::Ui::Windows auto i = 0; gDropdownItems[i++].Format = STR_SHORTCUT_SHOW_MAP; gDropdownItems[i++].Format = STR_EXTRA_VIEWPORT; - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && GetGameState().EditorStep == EditorStep::LandscapeEditor) + if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep == EditorStep::LandscapeEditor) { gDropdownItems[i++].Format = STR_MAPGEN_MENU_ITEM; } @@ -1217,7 +1217,7 @@ namespace OpenRCT2::Ui::Windows void TopToolbar::MapMenuDropdown(int16_t dropdownIndex) { int32_t customStartIndex = 3; - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && GetGameState().EditorStep == EditorStep::LandscapeEditor) + if (gLegacyScene == LegacyScene::scenarioEditor && getGameState().editorStep == EditorStep::LandscapeEditor) { customStartIndex++; } @@ -1327,7 +1327,7 @@ namespace OpenRCT2::Ui::Windows void TopToolbar::InitFileMenu(Widget& widget) { int32_t numItems = 0; - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (isInTrackDesignerOrManager()) { gDropdownItems[numItems++].Format = STR_SCREENSHOT; gDropdownItems[numItems++].Format = STR_GIANT_SCREENSHOT; @@ -1341,14 +1341,14 @@ namespace OpenRCT2::Ui::Windows gDropdownItems[numItems++].Format = STR_OPTIONS; gDropdownItems[numItems++].Format = kStringIdEmpty; - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + if (gLegacyScene == LegacyScene::trackDesigner) gDropdownItems[numItems++].Format = STR_QUIT_ROLLERCOASTER_DESIGNER; else gDropdownItems[numItems++].Format = STR_QUIT_TRACK_DESIGNS_MANAGER; gDropdownItems[numItems++].Format = STR_EXIT_OPENRCT2; } - else if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + else if (gLegacyScene == LegacyScene::scenarioEditor) { gDropdownItems[numItems++].Format = STR_LOAD_LANDSCAPE; gDropdownItems[numItems++].Format = kStringIdEmpty; @@ -1428,7 +1428,7 @@ namespace OpenRCT2::Ui::Windows Dropdown::SetDisabled(DDIDX_OBJECTIVE_OPTIONS, true); } - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + if (isInEditorMode()) { Dropdown::SetDisabled(DDIDX_OBJECT_SELECTION, true); Dropdown::SetDisabled(DDIDX_INVENTIONS_LIST, true); @@ -1437,16 +1437,16 @@ namespace OpenRCT2::Ui::Windows Dropdown::SetDisabled(DDIDX_ENABLE_SANDBOX_MODE, true); } - auto& gameState = GetGameState(); - if (gameState.Cheats.sandboxMode) + auto& gameState = getGameState(); + if (gameState.cheats.sandboxMode) { Dropdown::SetChecked(DDIDX_ENABLE_SANDBOX_MODE, true); } - if (gameState.Cheats.disableClearanceChecks) + if (gameState.cheats.disableClearanceChecks) { Dropdown::SetChecked(DDIDX_DISABLE_CLEARANCE_CHECKS, true); } - if (gameState.Cheats.disableSupportLimits) + if (gameState.cheats.disableSupportLimits) { Dropdown::SetChecked(DDIDX_DISABLE_SUPPORT_LIMITS, true); } @@ -1481,13 +1481,13 @@ namespace OpenRCT2::Ui::Windows ContextOpenWindow(WindowClass::EditorObjectiveOptions); break; case DDIDX_ENABLE_SANDBOX_MODE: - CheatsSet(CheatType::SandboxMode, !GetGameState().Cheats.sandboxMode); + CheatsSet(CheatType::SandboxMode, !getGameState().cheats.sandboxMode); break; case DDIDX_DISABLE_CLEARANCE_CHECKS: - CheatsSet(CheatType::DisableClearanceChecks, !GetGameState().Cheats.disableClearanceChecks); + CheatsSet(CheatType::DisableClearanceChecks, !getGameState().cheats.disableClearanceChecks); break; case DDIDX_DISABLE_SUPPORT_LIMITS: - CheatsSet(CheatType::DisableSupportLimits, !GetGameState().Cheats.disableSupportLimits); + CheatsSet(CheatType::DisableSupportLimits, !getGameState().cheats.disableSupportLimits); break; } } diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index be4df91c89..95b06490e3 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -103,8 +103,8 @@ namespace OpenRCT2::Ui::Windows { SetWidgets(_trackPlaceWidgets); WindowInitScrollWidgets(*this); - ToolSet(*this, WIDX_PRICE, Tool::Crosshair); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*this, WIDX_PRICE, Tool::crosshair); + gInputFlags.set(InputFlag::unk6); WindowPushOthersRight(*this); ShowGridlines(); _miniPreview.resize(TRACK_MINI_PREVIEW_SIZE); @@ -206,7 +206,7 @@ namespace OpenRCT2::Ui::Windows } money64 cost = kMoney64Undefined; - if (GameIsNotPaused() || GetGameState().Cheats.buildInPauseMode) + if (GameIsNotPaused() || getGameState().cheats.buildInPauseMode) { ClearProvisional(); auto res = FindValidTrackDesignPlaceHeight(trackLoc, GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST); @@ -355,7 +355,7 @@ namespace OpenRCT2::Ui::Windows } // Price - if (_placementCost != kMoney64Undefined && !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (_placementCost != kMoney64Undefined && !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { ft = Formatter(); ft.Add(_placementCost); diff --git a/src/openrct2-ui/windows/TrackList.cpp b/src/openrct2-ui/windows/TrackList.cpp index 293b487e56..73aa327eea 100644 --- a/src/openrct2-ui/windows/TrackList.cpp +++ b/src/openrct2-ui/windows/TrackList.cpp @@ -118,7 +118,7 @@ namespace OpenRCT2::Ui::Windows void SelectFromList(int32_t listIndex) { OpenRCT2::Audio::Play(OpenRCT2::Audio::SoundId::Click1, 0, this->windowPos.x + (this->width / 2)); - if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) + if (!(gLegacyScene == LegacyScene::trackDesignsManager)) { if (listIndex == 0) { @@ -143,7 +143,7 @@ namespace OpenRCT2::Ui::Windows uint16_t trackDesignIndex = _filteredTrackIds[listIndex]; TrackDesignFileRef* tdRef = &_trackDesigns[trackDesignIndex]; - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { auto intent = Intent(WindowClass::ManageTrackDesign); intent.PutExtra(INTENT_EXTRA_TRACK_DESIGN, tdRef); @@ -166,7 +166,7 @@ namespace OpenRCT2::Ui::Windows int32_t GetListItemFromPosition(const ScreenCoordsXY& screenCoords) { size_t maxItems = _filteredTrackIds.size(); - if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) + if (!(gLegacyScene == LegacyScene::trackDesignsManager)) { // Extra item: custom design maxItems++; @@ -221,21 +221,12 @@ namespace OpenRCT2::Ui::Windows LoadDesignsList(_window_track_list_item); - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) - { - widgets[WIDX_BACK].type = WindowWidgetType::Empty; - } - else - { - widgets[WIDX_BACK].type = WindowWidgetType::TableHeader; - } - WindowInitScrollWidgets(*this); _selectedItemIsBeingUpdated = false; _reloadTrackDesigns = false; // Start with first track highlighted selected_list_item = 0; - if (_trackDesigns.size() != 0 && !(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) + if (_trackDesigns.size() != 0 && !(gLegacyScene == LegacyScene::trackDesignsManager)) { selected_list_item = 1; } @@ -248,6 +239,14 @@ namespace OpenRCT2::Ui::Windows _loadedTrackDesignIndex = TRACK_DESIGN_INDEX_UNLOADED; } + void ReopenTrackManager() + { + auto* windowMgr = Ui::GetWindowManager(); + windowMgr->CloseByNumber(WindowClass::ManageTrackDesign, number); + windowMgr->CloseByNumber(WindowClass::TrackDeletePrompt, number); + Editor::LoadTrackManager(); + } + void OnClose() override { // Dispose track design and preview @@ -263,12 +262,9 @@ namespace OpenRCT2::Ui::Windows // to do it again. Otherwise, this window will get // another close signal from the track manager load function, // try to load the track manager again, and an infinite loop will result. - if ((gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) && gScreenAge != 0) + if ((gLegacyScene == LegacyScene::trackDesignsManager) && gScreenAge != 0) { - auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByNumber(WindowClass::ManageTrackDesign, number); - windowMgr->CloseByNumber(WindowClass::TrackDeletePrompt, number); - Editor::LoadTrackManager(); + ReopenTrackManager(); } } @@ -291,17 +287,21 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_BACK: Close(); - if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) + if (!(gLegacyScene == LegacyScene::trackDesignsManager)) { ContextOpenWindow(WindowClass::ConstructRide); } + else + { + ReopenTrackManager(); + } break; case WIDX_FILTER_STRING: WindowStartTextbox(*this, widgetIndex, _filterString, sizeof(_filterString)); break; case WIDX_FILTER_CLEAR: // Keep the highlighted item selected - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { if (selected_list_item != -1 && _filteredTrackIds.size() > static_cast(selected_list_item)) selected_list_item = _filteredTrackIds[selected_list_item]; @@ -324,7 +324,7 @@ namespace OpenRCT2::Ui::Windows ScreenSize OnScrollGetSize(const int32_t scrollIndex) override { size_t numItems = _filteredTrackIds.size(); - if (!(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) + if (!(gLegacyScene == LegacyScene::trackDesignsManager)) { // Extra item: custom design numItems++; @@ -388,7 +388,7 @@ namespace OpenRCT2::Ui::Windows } Formatter::Common().Add(stringId); - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { widgets[WIDX_TITLE].text = STR_TRACK_DESIGNS; widgets[WIDX_TRACK_LIST].tooltip = STR_CLICK_ON_DESIGN_TO_RENAME_OR_DELETE_IT; @@ -399,7 +399,7 @@ namespace OpenRCT2::Ui::Windows widgets[WIDX_TRACK_LIST].tooltip = STR_CLICK_ON_DESIGN_TO_BUILD_IT_TIP; } - if ((gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) || selected_list_item != 0) + if ((gLegacyScene == LegacyScene::trackDesignsManager) || selected_list_item != 0) { pressed_widgets |= 1uLL << WIDX_TRACK_PREVIEW; disabled_widgets &= ~(1uLL << WIDX_TRACK_PREVIEW); @@ -454,7 +454,7 @@ namespace OpenRCT2::Ui::Windows DrawWidgets(dpi); int32_t listItemIndex = selected_list_item; - if ((gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) == 0) + if ((gLegacyScene == LegacyScene::trackDesignsManager) == 0) { // Because the first item in the list is "Build a custom design", lower the index by one listItemIndex--; @@ -517,7 +517,7 @@ namespace OpenRCT2::Ui::Windows // Warnings if ((_loadedTrackDesign->gameStateData.hasFlag(TrackDesignGameStateFlag::VehicleUnavailable)) - && !(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) + && !(gLegacyScene == LegacyScene::trackDesignsManager)) { // Vehicle design not available DrawTextEllipsised(dpi, screenPos, 368, STR_VEHICLE_DESIGN_UNAVAILABLE, {}, { TextAlignment::CENTRE }); @@ -677,7 +677,7 @@ namespace OpenRCT2::Ui::Windows auto screenCoords = ScreenCoordsXY{ 0, 0 }; size_t listIndex = 0; - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { if (_trackDesigns.empty()) { @@ -762,7 +762,7 @@ namespace OpenRCT2::Ui::Windows windowMgr->CloseConstructionWindows(); ScreenCoordsXY screenPos{}; - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { int32_t screenWidth = ContextGetWidth(); int32_t screenHeight = ContextGetHeight(); diff --git a/src/openrct2-ui/windows/Transparency.cpp b/src/openrct2-ui/windows/Transparency.cpp index d2f25d899d..25fa6d37a4 100644 --- a/src/openrct2-ui/windows/Transparency.cpp +++ b/src/openrct2-ui/windows/Transparency.cpp @@ -29,7 +29,7 @@ namespace OpenRCT2::Ui::Windows { - enum WINDOW_TRANSPARENCY_WIDGET_IDX + enum WindowTransparencyWidgetIndex { WIDX_BACKGROUND, WIDX_TITLE, @@ -149,7 +149,7 @@ namespace OpenRCT2::Ui::Windows // Locate mechanic button image const auto& widget = widgets[WIDX_HIDE_STAFF]; auto screenCoords = windowPos + ScreenCoordsXY{ widget.left, widget.top }; - auto image = ImageId(SPR_MECHANIC, COLOUR_BLACK, GetGameState().StaffMechanicColour); + auto image = ImageId(SPR_MECHANIC, COLOUR_BLACK, getGameState().staffMechanicColour); GfxDrawSprite(dpi, image, screenCoords); } diff --git a/src/openrct2-ui/windows/ViewClipping.cpp b/src/openrct2-ui/windows/ViewClipping.cpp index 049e6554ae..df733c2294 100644 --- a/src/openrct2-ui/windows/ViewClipping.cpp +++ b/src/openrct2-ui/windows/ViewClipping.cpp @@ -118,7 +118,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_CLIP_SELECTOR: // Activate the selection tool - ToolSet(*this, WIDX_BACKGROUND, Tool::Crosshair); + ToolSet(*this, WIDX_BACKGROUND, Tool::crosshair); _toolActive = true; _dragging = false; diff --git a/src/openrct2-ui/windows/Viewport.cpp b/src/openrct2-ui/windows/Viewport.cpp index 78d380fcb1..922aeb8d69 100644 --- a/src/openrct2-ui/windows/Viewport.cpp +++ b/src/openrct2-ui/windows/Viewport.cpp @@ -98,10 +98,7 @@ namespace OpenRCT2::Ui::Windows viewport->flags |= VIEWPORT_FLAG_SOUND_ON | VIEWPORT_FLAG_INDEPEDENT_ROTATION; - min_width = WW; - min_height = WH; - max_width = WW; - max_height = WH; + WindowSetResize(*this, { WW, WH }, { WW, WH }); } void OnUpdate() override @@ -185,7 +182,7 @@ namespace OpenRCT2::Ui::Windows min_width = WW; min_height = WH; - WindowSetResize(*this, min_width, min_height, max_width, max_height); + WindowSetResize(*this, { min_width, min_height }, { max_width, max_height }); } void OnPrepareDraw() override diff --git a/src/openrct2-ui/windows/Water.cpp b/src/openrct2-ui/windows/Water.cpp index 9090bbdfd6..48d67d6fa7 100644 --- a/src/openrct2-ui/windows/Water.cpp +++ b/src/openrct2-ui/windows/Water.cpp @@ -163,7 +163,7 @@ namespace OpenRCT2::Ui::Windows dpi, screenCoords - ScreenCoordsXY{ 0, 2 }, STR_LAND_TOOL_SIZE_VALUE, ft, { TextAlignment::CENTRE }); } - if (!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { // Draw raise cost amount screenCoords = { widgets[WIDX_PREVIEW].midX() + windowPos.x, widgets[WIDX_PREVIEW].bottom + windowPos.y + 5 }; @@ -207,7 +207,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_BACKGROUND: if (gMapSelectFlags & MAP_SELECT_FLAG_ENABLE) { - gCurrentToolId = Tool::UpDownArrow; + gCurrentToolId = Tool::upDownArrow; } break; } @@ -230,7 +230,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_BACKGROUND: MapInvalidateSelectionRect(); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE; - gCurrentToolId = Tool::WaterDown; + gCurrentToolId = Tool::waterDown; break; } } @@ -301,7 +301,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); - if (gCurrentToolId == Tool::UpDownArrow) + if (gCurrentToolId == Tool::upDownArrow) { if (!(gMapSelectFlags & MAP_SELECT_FLAG_ENABLE)) return; @@ -446,8 +446,8 @@ namespace OpenRCT2::Ui::Windows { ShowGridlines(); auto* toolWindow = ContextOpenWindow(WindowClass::Water); - ToolSet(*toolWindow, WIDX_BACKGROUND, Tool::WaterDown); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*toolWindow, WIDX_BACKGROUND, Tool::waterDown); + gInputFlags.set(InputFlag::unk6); } } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Windows.h b/src/openrct2-ui/windows/Windows.h index 013907362a..b757e11522 100644 --- a/src/openrct2-ui/windows/Windows.h +++ b/src/openrct2-ui/windows/Windows.h @@ -29,7 +29,7 @@ struct Vehicle; enum class GuestListFilterType : int32_t; enum class ScatterToolDensity : uint8_t; -using LoadSaveCallback = void (*)(int32_t result, const utf8* path); +using LoadSaveCallback = void (*)(ModalResult result, const utf8* path); using ScenarioSelectCallback = void (*)(const utf8* path); namespace OpenRCT2::Ui::Windows @@ -81,6 +81,7 @@ namespace OpenRCT2::Ui::Windows // EditorObjectSelection WindowBase* EditorObjectSelectionOpen(); bool EditorObjectSelectionWindowCheck(); + void EditorObjectSelectionClose(); // EditorParkEntrance WindowBase* EditorParkEntranceOpen(); @@ -133,8 +134,8 @@ namespace OpenRCT2::Ui::Windows // LoadSave WindowBase* LoadsaveOpen( - int32_t type, std::string_view defaultPath, std::function callback, - TrackDesign* trackDesign); + LoadSaveAction action, LoadSaveType type, std::string_view defaultPath, + std::function callback, TrackDesign* trackDesign); void WindowLoadSaveInputKey(WindowBase* w, uint32_t keycode); // Main @@ -188,7 +189,8 @@ namespace OpenRCT2::Ui::Windows // OverwritePrompt WindowBase* WindowOverwritePromptOpen( - const std::string_view name, const std::string_view path, int32_t type, TrackDesign* trackDesignPtr); + const std::string_view name, const std::string_view path, LoadSaveAction action, LoadSaveType type, + TrackDesign* trackDesignPtr); void WindowLoadSaveOverwritePromptInputKey(WindowBase* w, uint32_t keycode); // Park diff --git a/src/openrct2/AssetPack.cpp b/src/openrct2/AssetPack.cpp index c0a696fc6f..fc222f5bb3 100644 --- a/src/openrct2/AssetPack.cpp +++ b/src/openrct2/AssetPack.cpp @@ -42,7 +42,7 @@ void AssetPack::SetEnabled(bool value) void AssetPack::Fetch() { - auto archive = Zip::Open(Path.u8string(), ZIP_ACCESS::READ); + auto archive = Zip::Open(Path.u8string(), ZipAccess::read); if (!archive->Exists(ManifestFileName)) { throw std::runtime_error("Manifest does not exist."); @@ -160,7 +160,7 @@ public: void AssetPack::Load() { auto path = Path.u8string(); - auto archive = Zip::Open(path, ZIP_ACCESS::READ); + auto archive = Zip::Open(path, ZipAccess::read); if (!archive->Exists(ManifestFileName)) { throw std::runtime_error("Manifest does not exist."); diff --git a/src/openrct2/AssetPackManager.cpp b/src/openrct2/AssetPackManager.cpp index 0145dc6b25..eb891b2218 100644 --- a/src/openrct2/AssetPackManager.cpp +++ b/src/openrct2/AssetPackManager.cpp @@ -70,10 +70,10 @@ void AssetPackManager::Scan() auto context = GetContext(); auto env = context->GetPlatformEnvironment(); - auto openrct2Dir = fs::u8path(env->GetDirectoryPath(DIRBASE::OPENRCT2, DIRID::ASSET_PACK)); + auto openrct2Dir = fs::u8path(env->GetDirectoryPath(DirBase::openrct2, DirId::assetPacks)); Scan(openrct2Dir); - auto userDirectory = fs::u8path(env->GetDirectoryPath(DIRBASE::USER, DIRID::ASSET_PACK)); + auto userDirectory = fs::u8path(env->GetDirectoryPath(DirBase::user, DirId::assetPacks)); Path::CreateDirectory(userDirectory.u8string()); Scan(userDirectory); } diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt index d150ad0f3e..490564e798 100644 --- a/src/openrct2/CMakeLists.txt +++ b/src/openrct2/CMakeLists.txt @@ -288,3 +288,8 @@ endif () if (UNIX) add_definitions(-D_FILE_OFFSET_BITS=64) endif () + +if (CMAKE_LIBRARY_ARCHITECTURE MATCHES "arm-linux-gnueabihf") + message(STATUS "Linking to armhf libs; adding libatomic") + target_link_libraries(${PROJECT_NAME} atomic) +endif() diff --git a/src/openrct2/Cheats.cpp b/src/openrct2/Cheats.cpp index 25ebf1c61a..fca84d4d5a 100644 --- a/src/openrct2/Cheats.cpp +++ b/src/openrct2/Cheats.cpp @@ -15,7 +15,6 @@ #include "core/DataSerialiser.h" #include "network/Network.h" #include "ride/Ride.h" -#include "scenario/Scenario.h" #include "world/Climate.h" #include "world/Footpath.h" #include "world/Map.h" @@ -29,35 +28,35 @@ using namespace OpenRCT2; void CheatsReset() { - auto& gameState = GetGameState(); - gameState.Cheats.sandboxMode = false; - gameState.Cheats.disableClearanceChecks = false; - gameState.Cheats.disableSupportLimits = false; - gameState.Cheats.showAllOperatingModes = false; - gameState.Cheats.showVehiclesFromOtherTrackTypes = false; - gameState.Cheats.disableTrainLengthLimit = false; - gameState.Cheats.enableChainLiftOnAllTrack = false; - gameState.Cheats.unlockOperatingLimits = false; - gameState.Cheats.disableBrakesFailure = false; - gameState.Cheats.disableAllBreakdowns = false; - gameState.Cheats.buildInPauseMode = false; - gameState.Cheats.ignoreRideIntensity = false; - gameState.Cheats.ignorePrice = false; - gameState.Cheats.disableVandalism = false; - gameState.Cheats.disableLittering = false; - gameState.Cheats.neverendingMarketing = false; - gameState.Cheats.freezeWeather = false; - gameState.Cheats.disablePlantAging = false; - gameState.Cheats.allowArbitraryRideTypeChanges = false; - gameState.Cheats.disableRideValueAging = false; - gameState.Cheats.ignoreResearchStatus = false; - gameState.Cheats.enableAllDrawableTrackPieces = false; - gameState.Cheats.allowTrackPlaceInvalidHeights = false; - gameState.Cheats.allowRegularPathAsQueue = false; - gameState.Cheats.allowSpecialColourSchemes = false; - gameState.Cheats.makeAllDestructible = false; - gameState.Cheats.selectedStaffSpeed = StaffSpeedCheat::None; - gameState.Cheats.forcedParkRating = kForcedParkRatingDisabled; + auto& gameState = getGameState(); + gameState.cheats.sandboxMode = false; + gameState.cheats.disableClearanceChecks = false; + gameState.cheats.disableSupportLimits = false; + gameState.cheats.showAllOperatingModes = false; + gameState.cheats.showVehiclesFromOtherTrackTypes = false; + gameState.cheats.disableTrainLengthLimit = false; + gameState.cheats.enableChainLiftOnAllTrack = false; + gameState.cheats.unlockOperatingLimits = false; + gameState.cheats.disableBrakesFailure = false; + gameState.cheats.disableAllBreakdowns = false; + gameState.cheats.buildInPauseMode = false; + gameState.cheats.ignoreRideIntensity = false; + gameState.cheats.ignorePrice = false; + gameState.cheats.disableVandalism = false; + gameState.cheats.disableLittering = false; + gameState.cheats.neverendingMarketing = false; + gameState.cheats.freezeWeather = false; + gameState.cheats.disablePlantAging = false; + gameState.cheats.allowArbitraryRideTypeChanges = false; + gameState.cheats.disableRideValueAging = false; + gameState.cheats.ignoreResearchStatus = false; + gameState.cheats.enableAllDrawableTrackPieces = false; + gameState.cheats.allowTrackPlaceInvalidHeights = false; + gameState.cheats.allowRegularPathAsQueue = false; + gameState.cheats.allowSpecialColourSchemes = false; + gameState.cheats.makeAllDestructible = false; + gameState.cheats.selectedStaffSpeed = StaffSpeedCheat::None; + gameState.cheats.forcedParkRating = kForcedParkRatingDisabled; } void CheatsSet(CheatType cheatType, int64_t param1 /* = 0*/, int64_t param2 /* = 0*/) @@ -76,7 +75,7 @@ static void CheatEntrySerialise(DataSerialiser& ds, CheatType type, const T& val void CheatsSerialise(DataSerialiser& ds) { uint16_t count = 0; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (ds.IsSaving()) { @@ -86,37 +85,37 @@ void CheatsSerialise(DataSerialiser& ds) uint64_t countOffset = stream.GetPosition(); ds << count; - CheatEntrySerialise(ds, CheatType::SandboxMode, gameState.Cheats.sandboxMode, count); - CheatEntrySerialise(ds, CheatType::DisableClearanceChecks, gameState.Cheats.disableClearanceChecks, count); - CheatEntrySerialise(ds, CheatType::DisableSupportLimits, gameState.Cheats.disableSupportLimits, count); - CheatEntrySerialise(ds, CheatType::ShowAllOperatingModes, gameState.Cheats.showAllOperatingModes, count); + CheatEntrySerialise(ds, CheatType::SandboxMode, gameState.cheats.sandboxMode, count); + CheatEntrySerialise(ds, CheatType::DisableClearanceChecks, gameState.cheats.disableClearanceChecks, count); + CheatEntrySerialise(ds, CheatType::DisableSupportLimits, gameState.cheats.disableSupportLimits, count); + CheatEntrySerialise(ds, CheatType::ShowAllOperatingModes, gameState.cheats.showAllOperatingModes, count); CheatEntrySerialise( - ds, CheatType::ShowVehiclesFromOtherTrackTypes, gameState.Cheats.showVehiclesFromOtherTrackTypes, count); - CheatEntrySerialise(ds, CheatType::FastLiftHill, gameState.Cheats.unlockOperatingLimits, count); - CheatEntrySerialise(ds, CheatType::DisableBrakesFailure, gameState.Cheats.disableBrakesFailure, count); - CheatEntrySerialise(ds, CheatType::DisableAllBreakdowns, gameState.Cheats.disableAllBreakdowns, count); - CheatEntrySerialise(ds, CheatType::BuildInPauseMode, gameState.Cheats.buildInPauseMode, count); - CheatEntrySerialise(ds, CheatType::IgnoreRideIntensity, gameState.Cheats.ignoreRideIntensity, count); - CheatEntrySerialise(ds, CheatType::DisableVandalism, gameState.Cheats.disableVandalism, count); - CheatEntrySerialise(ds, CheatType::DisableLittering, gameState.Cheats.disableLittering, count); - CheatEntrySerialise(ds, CheatType::NeverendingMarketing, gameState.Cheats.neverendingMarketing, count); - CheatEntrySerialise(ds, CheatType::FreezeWeather, gameState.Cheats.freezeWeather, count); - CheatEntrySerialise(ds, CheatType::DisableTrainLengthLimit, gameState.Cheats.disableTrainLengthLimit, count); - CheatEntrySerialise(ds, CheatType::DisablePlantAging, gameState.Cheats.disablePlantAging, count); - CheatEntrySerialise(ds, CheatType::EnableChainLiftOnAllTrack, gameState.Cheats.enableChainLiftOnAllTrack, count); + ds, CheatType::ShowVehiclesFromOtherTrackTypes, gameState.cheats.showVehiclesFromOtherTrackTypes, count); + CheatEntrySerialise(ds, CheatType::FastLiftHill, gameState.cheats.unlockOperatingLimits, count); + CheatEntrySerialise(ds, CheatType::DisableBrakesFailure, gameState.cheats.disableBrakesFailure, count); + CheatEntrySerialise(ds, CheatType::DisableAllBreakdowns, gameState.cheats.disableAllBreakdowns, count); + CheatEntrySerialise(ds, CheatType::BuildInPauseMode, gameState.cheats.buildInPauseMode, count); + CheatEntrySerialise(ds, CheatType::IgnoreRideIntensity, gameState.cheats.ignoreRideIntensity, count); + CheatEntrySerialise(ds, CheatType::DisableVandalism, gameState.cheats.disableVandalism, count); + CheatEntrySerialise(ds, CheatType::DisableLittering, gameState.cheats.disableLittering, count); + CheatEntrySerialise(ds, CheatType::NeverendingMarketing, gameState.cheats.neverendingMarketing, count); + CheatEntrySerialise(ds, CheatType::FreezeWeather, gameState.cheats.freezeWeather, count); + CheatEntrySerialise(ds, CheatType::DisableTrainLengthLimit, gameState.cheats.disableTrainLengthLimit, count); + CheatEntrySerialise(ds, CheatType::DisablePlantAging, gameState.cheats.disablePlantAging, count); + CheatEntrySerialise(ds, CheatType::EnableChainLiftOnAllTrack, gameState.cheats.enableChainLiftOnAllTrack, count); CheatEntrySerialise( - ds, CheatType::AllowArbitraryRideTypeChanges, gameState.Cheats.allowArbitraryRideTypeChanges, count); - CheatEntrySerialise(ds, CheatType::DisableRideValueAging, gameState.Cheats.disableRideValueAging, count); - CheatEntrySerialise(ds, CheatType::IgnoreResearchStatus, gameState.Cheats.ignoreResearchStatus, count); - CheatEntrySerialise(ds, CheatType::EnableAllDrawableTrackPieces, gameState.Cheats.enableAllDrawableTrackPieces, count); + ds, CheatType::AllowArbitraryRideTypeChanges, gameState.cheats.allowArbitraryRideTypeChanges, count); + CheatEntrySerialise(ds, CheatType::DisableRideValueAging, gameState.cheats.disableRideValueAging, count); + CheatEntrySerialise(ds, CheatType::IgnoreResearchStatus, gameState.cheats.ignoreResearchStatus, count); + CheatEntrySerialise(ds, CheatType::EnableAllDrawableTrackPieces, gameState.cheats.enableAllDrawableTrackPieces, count); CheatEntrySerialise( - ds, CheatType::AllowTrackPlaceInvalidHeights, gameState.Cheats.allowTrackPlaceInvalidHeights, count); - CheatEntrySerialise(ds, CheatType::AllowRegularPathAsQueue, gameState.Cheats.allowRegularPathAsQueue, count); - CheatEntrySerialise(ds, CheatType::AllowSpecialColourSchemes, gameState.Cheats.allowSpecialColourSchemes, count); - CheatEntrySerialise(ds, CheatType::MakeDestructible, gameState.Cheats.makeAllDestructible, count); - CheatEntrySerialise(ds, CheatType::SetStaffSpeed, gameState.Cheats.selectedStaffSpeed, count); - CheatEntrySerialise(ds, CheatType::IgnorePrice, gameState.Cheats.ignorePrice, count); - CheatEntrySerialise(ds, CheatType::SetForcedParkRating, gameState.Cheats.forcedParkRating, count); + ds, CheatType::AllowTrackPlaceInvalidHeights, gameState.cheats.allowTrackPlaceInvalidHeights, count); + CheatEntrySerialise(ds, CheatType::AllowRegularPathAsQueue, gameState.cheats.allowRegularPathAsQueue, count); + CheatEntrySerialise(ds, CheatType::AllowSpecialColourSchemes, gameState.cheats.allowSpecialColourSchemes, count); + CheatEntrySerialise(ds, CheatType::MakeDestructible, gameState.cheats.makeAllDestructible, count); + CheatEntrySerialise(ds, CheatType::SetStaffSpeed, gameState.cheats.selectedStaffSpeed, count); + CheatEntrySerialise(ds, CheatType::IgnorePrice, gameState.cheats.ignorePrice, count); + CheatEntrySerialise(ds, CheatType::SetForcedParkRating, gameState.cheats.forcedParkRating, count); // Remember current position and update count. uint64_t endOffset = stream.GetPosition(); @@ -141,91 +140,91 @@ void CheatsSerialise(DataSerialiser& ds) switch (static_cast(type)) { case CheatType::SandboxMode: - ds << gameState.Cheats.sandboxMode; + ds << gameState.cheats.sandboxMode; break; case CheatType::DisableClearanceChecks: - ds << gameState.Cheats.disableClearanceChecks; + ds << gameState.cheats.disableClearanceChecks; break; case CheatType::DisableSupportLimits: - ds << gameState.Cheats.disableSupportLimits; + ds << gameState.cheats.disableSupportLimits; break; case CheatType::ShowAllOperatingModes: - ds << gameState.Cheats.showAllOperatingModes; + ds << gameState.cheats.showAllOperatingModes; break; case CheatType::ShowVehiclesFromOtherTrackTypes: - ds << gameState.Cheats.showVehiclesFromOtherTrackTypes; + ds << gameState.cheats.showVehiclesFromOtherTrackTypes; break; case CheatType::FastLiftHill: - ds << gameState.Cheats.unlockOperatingLimits; + ds << gameState.cheats.unlockOperatingLimits; break; case CheatType::DisableBrakesFailure: - ds << gameState.Cheats.disableBrakesFailure; + ds << gameState.cheats.disableBrakesFailure; break; case CheatType::DisableAllBreakdowns: - ds << gameState.Cheats.disableAllBreakdowns; + ds << gameState.cheats.disableAllBreakdowns; break; case CheatType::BuildInPauseMode: - ds << gameState.Cheats.buildInPauseMode; + ds << gameState.cheats.buildInPauseMode; break; case CheatType::IgnoreRideIntensity: - ds << gameState.Cheats.ignoreRideIntensity; + ds << gameState.cheats.ignoreRideIntensity; break; case CheatType::IgnorePrice: - ds << gameState.Cheats.ignorePrice; + ds << gameState.cheats.ignorePrice; break; case CheatType::DisableVandalism: - ds << gameState.Cheats.disableVandalism; + ds << gameState.cheats.disableVandalism; break; case CheatType::DisableLittering: - ds << gameState.Cheats.disableLittering; + ds << gameState.cheats.disableLittering; break; case CheatType::NeverendingMarketing: - ds << gameState.Cheats.neverendingMarketing; + ds << gameState.cheats.neverendingMarketing; break; case CheatType::FreezeWeather: - ds << gameState.Cheats.freezeWeather; + ds << gameState.cheats.freezeWeather; break; case CheatType::DisableTrainLengthLimit: - ds << gameState.Cheats.disableTrainLengthLimit; + ds << gameState.cheats.disableTrainLengthLimit; break; case CheatType::DisablePlantAging: - ds << gameState.Cheats.disablePlantAging; + ds << gameState.cheats.disablePlantAging; break; case CheatType::EnableChainLiftOnAllTrack: - ds << gameState.Cheats.enableChainLiftOnAllTrack; + ds << gameState.cheats.enableChainLiftOnAllTrack; break; case CheatType::AllowArbitraryRideTypeChanges: - ds << gameState.Cheats.allowArbitraryRideTypeChanges; + ds << gameState.cheats.allowArbitraryRideTypeChanges; break; case CheatType::DisableRideValueAging: - ds << gameState.Cheats.disableRideValueAging; + ds << gameState.cheats.disableRideValueAging; break; case CheatType::IgnoreResearchStatus: - ds << gameState.Cheats.ignoreResearchStatus; + ds << gameState.cheats.ignoreResearchStatus; break; case CheatType::EnableAllDrawableTrackPieces: - ds << gameState.Cheats.enableAllDrawableTrackPieces; + ds << gameState.cheats.enableAllDrawableTrackPieces; break; case CheatType::AllowTrackPlaceInvalidHeights: - ds << gameState.Cheats.allowTrackPlaceInvalidHeights; + ds << gameState.cheats.allowTrackPlaceInvalidHeights; break; case CheatType::NoCapOnQueueLengthDummy: ds << dummyBool; break; case CheatType::AllowRegularPathAsQueue: - ds << gameState.Cheats.allowRegularPathAsQueue; + ds << gameState.cheats.allowRegularPathAsQueue; break; case CheatType::AllowSpecialColourSchemes: - ds << gameState.Cheats.allowSpecialColourSchemes; + ds << gameState.cheats.allowSpecialColourSchemes; break; case CheatType::MakeDestructible: - ds << gameState.Cheats.makeAllDestructible; + ds << gameState.cheats.makeAllDestructible; break; case CheatType::SetStaffSpeed: - ds << gameState.Cheats.selectedStaffSpeed; + ds << gameState.cheats.selectedStaffSpeed; break; case CheatType::SetForcedParkRating: - ds << gameState.Cheats.forcedParkRating; + ds << gameState.cheats.forcedParkRating; default: break; } diff --git a/src/openrct2/CommandLineSprite.cpp b/src/openrct2/CommandLineSprite.cpp index 42a97cc7b4..fcdc4c8258 100644 --- a/src/openrct2/CommandLineSprite.cpp +++ b/src/openrct2/CommandLineSprite.cpp @@ -115,7 +115,7 @@ std::optional SpriteFile::Open(const utf8* path) { try { - OpenRCT2::FileStream stream(path, OpenRCT2::FILE_MODE_OPEN); + OpenRCT2::FileStream stream(path, OpenRCT2::FileMode::open); SpriteFile spriteFile; stream.Read(&spriteFile.Header, sizeof(RCTG1Header)); @@ -155,7 +155,7 @@ bool SpriteFile::Save(const utf8* path) { try { - OpenRCT2::FileStream stream(path, OpenRCT2::FILE_MODE_WRITE); + OpenRCT2::FileStream stream(path, OpenRCT2::FileMode::write); stream.Write(&Header, sizeof(RCTG1Header)); if (Header.num_entries > 0) @@ -216,7 +216,7 @@ static bool SpriteImageExport(const G1Element& spriteElement, u8string_view outP image.Stride = dpi.LineStride(); image.Palette = StandardPalette; image.Pixels = std::vector(pixels8, pixels8 + pixelsLen); - Imaging::WriteToFile(outPath, image, IMAGE_FORMAT::PNG); + Imaging::WriteToFile(outPath, image, ImageFormat::png); return true; } catch (const std::exception& e) @@ -230,10 +230,10 @@ static std::optional SpriteImageImport(u8string_vie { try { - auto format = IMAGE_FORMAT::PNG_32; + auto format = ImageFormat::png32; if (meta.palette == Palette::KeepIndices) { - format = IMAGE_FORMAT::PNG; + format = ImageFormat::png; } ImageImporter importer; @@ -628,8 +628,8 @@ static int32_t CommandLineForSpriteCombine(const char** argv, int32_t argc) const utf8* dataFile = argv[2]; const utf8* outputPath = argv[3]; - auto fileHeader = OpenRCT2::FileStream(indexFile, OpenRCT2::FILE_MODE_OPEN); - auto fileData = OpenRCT2::FileStream(dataFile, OpenRCT2::FILE_MODE_OPEN); + auto fileHeader = OpenRCT2::FileStream(indexFile, OpenRCT2::FileMode::open); + auto fileData = OpenRCT2::FileStream(dataFile, OpenRCT2::FileMode::open); auto fileHeaderSize = fileHeader.GetLength(); auto fileDataSize = fileData.GetLength(); @@ -638,7 +638,7 @@ static int32_t CommandLineForSpriteCombine(const char** argv, int32_t argc) RCTG1Header header = {}; header.num_entries = numEntries; header.total_size = fileDataSize; - OpenRCT2::FileStream outputStream(outputPath, OpenRCT2::FILE_MODE_WRITE); + OpenRCT2::FileStream outputStream(outputPath, OpenRCT2::FileMode::write); outputStream.Write(&header, sizeof(RCTG1Header)); auto g1Elements32 = std::make_unique(numEntries); diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index f122e5c9ee..ef710f029a 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -62,7 +62,6 @@ #include "rct2/RCT2.h" #include "ride/TrackData.h" #include "ride/TrackDesignRepository.h" -#include "scenario/Scenario.h" #include "scenario/ScenarioRepository.h" #include "scenes/game/GameScene.h" #include "scenes/intro/IntroScene.h" @@ -73,6 +72,7 @@ #include "scripting/ScriptEngine.h" #include "ui/UiContext.h" #include "ui/WindowManager.h" +#include "world/MapAnimation.h" #include "world/Park.h" #include @@ -160,6 +160,8 @@ namespace OpenRCT2 std::thread::id _mainThreadId{}; Timer _forcedUpdateTimer; + BackgroundWorker _backgroundWorker; + public: // Singleton of Context. // Remove this when GetContext() is no longer called so that @@ -395,7 +397,7 @@ namespace OpenRCT2 void Quit() override { - gSavePromptMode = PromptMode::Quit; + gSavePromptMode = PromptMode::quit; ContextOpenWindow(WindowClass::SavePrompt); } @@ -459,7 +461,7 @@ namespace OpenRCT2 { return false; } - _env->SetBasePath(DIRBASE::RCT2, rct2InstallPath); + _env->SetBasePath(DirBase::rct2, rct2InstallPath); } // The repositories are all dependent on the RCT2 path being set, @@ -738,7 +740,7 @@ namespace OpenRCT2 return true; } - auto fs = FileStream(path, FILE_MODE_OPEN); + auto fs = FileStream(path, FileMode::open); if (!LoadParkFromStream(&fs, path, loadTitleScreenOnFail, asScenario)) { return false; @@ -770,13 +772,13 @@ namespace OpenRCT2 throw std::runtime_error("Unable to detect file type"); } - if (info.Type != FILE_TYPE::PARK && info.Type != FILE_TYPE::SAVED_GAME && info.Type != FILE_TYPE::SCENARIO) + if (info.Type != FileType::park && info.Type != FileType::savedGame && info.Type != FileType::scenario) { throw std::runtime_error("Invalid file type."); } std::unique_ptr parkImporter; - if (info.Type == FILE_TYPE::PARK) + if (info.Type == FileType::park) { parkImporter = ParkImporter::CreateParkFile(*_objectRepository); } @@ -797,7 +799,7 @@ namespace OpenRCT2 OpenProgress(asScenario ? STR_LOADING_SCENARIO : STR_LOADING_SAVED_GAME); SetProgress(0, 100, STR_STRING_M_PERCENT); - auto result = parkImporter->LoadFromStream(stream, info.Type == FILE_TYPE::SCENARIO, false, path.c_str()); + auto result = parkImporter->LoadFromStream(stream, info.Type == FileType::scenario, false, path.c_str()); SetProgress(10, 100, STR_STRING_M_PERCENT); // From this point onwards the currently loaded park will be corrupted if loading fails @@ -809,7 +811,7 @@ namespace OpenRCT2 SetProgress(90, 100, STR_STRING_M_PERCENT); // TODO: Have a separate GameState and exchange once loaded. - auto& gameState = ::GetGameState(); + auto& gameState = ::getGameState(); parkImporter->Import(gameState); SetProgress(100, 100, STR_STRING_M_PERCENT); @@ -828,7 +830,7 @@ namespace OpenRCT2 #ifndef DISABLE_NETWORK bool sendMap = false; #endif - if (!asScenario && (info.Type == FILE_TYPE::PARK || info.Type == FILE_TYPE::SAVED_GAME)) + if (!asScenario && (info.Type == FileType::park || info.Type == FileType::savedGame)) { #ifndef DISABLE_NETWORK if (_network.GetMode() == NETWORK_MODE_CLIENT) @@ -1333,6 +1335,8 @@ namespace OpenRCT2 _ticksAccumulator -= kGameUpdateTimeMS; } + _backgroundWorker.dispatchCompleted(); + ContextHandleInput(); WindowUpdateAll(); @@ -1366,6 +1370,8 @@ namespace OpenRCT2 tweener.PostTick(); } + _backgroundWorker.dispatchCompleted(); + ContextHandleInput(); WindowUpdateAll(); @@ -1429,24 +1435,24 @@ namespace OpenRCT2 void EnsureUserContentDirectoriesExist() { EnsureDirectoriesExist( - DIRBASE::USER, + DirBase::user, { - DIRID::OBJECT, - DIRID::SAVE, - DIRID::SCENARIO, - DIRID::TRACK, - DIRID::LANDSCAPE, - DIRID::HEIGHTMAP, - DIRID::PLUGIN, - DIRID::THEME, - DIRID::SEQUENCE, - DIRID::REPLAY, - DIRID::LOG_DESYNCS, - DIRID::CRASH, + DirId::objects, + DirId::saves, + DirId::scenarios, + DirId::trackDesigns, + DirId::landscapes, + DirId::heightmaps, + DirId::plugins, + DirId::themes, + DirId::sequences, + DirId::replayRecordings, + DirId::desyncLogs, + DirId::crashDumps, }); } - void EnsureDirectoriesExist(const DIRBASE dirBase, const std::initializer_list& dirIds) + void EnsureDirectoriesExist(const DirBase dirBase, const std::initializer_list& dirIds) { for (const auto& dirId : dirIds) { @@ -1461,14 +1467,14 @@ namespace OpenRCT2 */ void CopyOriginalUserFilesOver() { - CopyOriginalUserFilesOver(DIRID::SAVE, "*.sv6"); - CopyOriginalUserFilesOver(DIRID::LANDSCAPE, "*.sc6"); + CopyOriginalUserFilesOver(DirId::saves, "*.sv6"); + CopyOriginalUserFilesOver(DirId::landscapes, "*.sc6"); } - void CopyOriginalUserFilesOver(DIRID dirid, const std::string& pattern) + void CopyOriginalUserFilesOver(DirId dirid, const std::string& pattern) { - auto src = _env->GetDirectoryPath(DIRBASE::RCT2, dirid); - auto dst = _env->GetDirectoryPath(DIRBASE::USER, dirid); + auto src = _env->GetDirectoryPath(DirBase::rct2, dirid); + auto dst = _env->GetDirectoryPath(DirBase::user, dirid); CopyOriginalUserFilesOver(src, dst, pattern); } @@ -1550,6 +1556,11 @@ namespace OpenRCT2 { return _timeScale; } + + BackgroundWorker& GetBackgroundWorker() override + { + return _backgroundWorker; + } }; Context* Context::Instance = nullptr; @@ -1663,7 +1674,7 @@ void ContextTriggerResize() void ContextSetFullscreenMode(int32_t mode) { - return GetContext()->GetUiContext()->SetFullscreenMode(static_cast(mode)); + return GetContext()->GetUiContext()->SetFullscreenMode(static_cast(mode)); } void ContextRecreateWindow() diff --git a/src/openrct2/Context.h b/src/openrct2/Context.h index 737b6415e8..bb866af868 100644 --- a/src/openrct2/Context.h +++ b/src/openrct2/Context.h @@ -9,6 +9,7 @@ #pragma once +#include "core/BackgroundWorker.hpp" #include "core/StringTypes.h" #include "interface/WindowClasses.h" #include "localisation/StringIdType.h" @@ -177,6 +178,8 @@ namespace OpenRCT2 virtual void SetTimeScale(float newScale) = 0; virtual float GetTimeScale() const = 0; + + virtual BackgroundWorker& GetBackgroundWorker() = 0; }; [[nodiscard]] std::unique_ptr CreateContext(); diff --git a/src/openrct2/Date.cpp b/src/openrct2/Date.cpp index 535011de00..1375677a48 100644 --- a/src/openrct2/Date.cpp +++ b/src/openrct2/Date.cpp @@ -108,15 +108,15 @@ int32_t Date::GetDaysInMonth(int32_t month) void OpenRCT2::DateUpdate(GameState_t& gameState) { - int32_t monthTicks = gameState.Date.monthTicks + kMonthTicksIncrement; + int32_t monthTicks = gameState.date.monthTicks + kMonthTicksIncrement; if (monthTicks > kMaskMonthTicks) { - gameState.Date.monthTicks = 0; - gameState.Date.monthsElapsed++; + gameState.date.monthTicks = 0; + gameState.date.monthsElapsed++; } else { - gameState.Date.monthTicks = static_cast(monthTicks); + gameState.date.monthTicks = static_cast(monthTicks); } } @@ -147,7 +147,7 @@ void DateUpdateRealTimeOfDay() Date& GetDate() { - return GetGameState().Date; + return getGameState().date; } /** @@ -156,7 +156,7 @@ Date& GetDate() */ void ResetDate() { - auto& gameState = GetGameState(); - gameState.Date = {}; + auto& gameState = getGameState(); + gameState.date = {}; gCurrentRealTimeTicks = 0; } diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index 4bfae5c73e..aa3bd0d772 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -38,7 +38,6 @@ #include "object/ObjectRepository.h" #include "peep/PeepAnimations.h" #include "rct1/RCT1.h" -#include "scenario/Scenario.h" #include "ui/WindowManager.h" #include "windows/Intent.h" #include "world/Climate.h" @@ -57,7 +56,7 @@ namespace OpenRCT2::Editor { static std::array, EnumValue(ObjectType::count)> _editorSelectedObjectFlags; - static void ConvertSaveToScenarioCallback(int32_t result, const utf8* path); + static void ConvertSaveToScenarioCallback(ModalResult result, const utf8* path); static void SetAllLandOwned(); static void FinaliseMainView(); static void ClearMapForEditing(bool fromSave); @@ -79,7 +78,7 @@ namespace OpenRCT2::Editor // Reset loaded objects to just defaults // Load minimum required objects (like surface and edge) - for (const auto& entry : MinimumRequiredObjects) + for (const auto& entry : kMinimumRequiredObjects) { objectManager.LoadObject(entry); } @@ -103,20 +102,20 @@ namespace OpenRCT2::Editor auto* context = GetContext(); context->SetActiveScene(context->GetGameScene()); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); Audio::StopAll(); ObjectListLoad(); gameStateInitAll(gameState, kDefaultMapSize); - gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR; - gameState.EditorStep = EditorStep::ObjectSelection; - gameState.Park.Flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; - gameState.ScenarioCategory = SCENARIO_CATEGORY_OTHER; + gLegacyScene = LegacyScene::scenarioEditor; + gameState.editorStep = EditorStep::ObjectSelection; + gameState.park.Flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; + gameState.scenarioCategory = ScenarioCategory::other; ViewportInitAll(); WindowBase* mainWindow = OpenEditorWindows(); mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ()); LoadPalette(); gScreenAge = 0; - gameState.ScenarioName = LanguageGetString(STR_MY_NEW_SCENARIO); + gameState.scenarioName = LanguageGetString(STR_MY_NEW_SCENARIO); } /** @@ -127,14 +126,15 @@ namespace OpenRCT2::Editor { ToolCancel(); auto intent = Intent(WindowClass::Loadsave); - intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::park); intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(ConvertSaveToScenarioCallback)); ContextOpenIntent(&intent); } - static void ConvertSaveToScenarioCallback(int32_t result, const utf8* path) + static void ConvertSaveToScenarioCallback(ModalResult result, const utf8* path) { - if (result != MODAL_RESULT_OK) + if (result != ModalResult::ok) { return; } @@ -144,12 +144,12 @@ namespace OpenRCT2::Editor return; } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); ScenarioReset(gameState); - gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR; - gameState.EditorStep = EditorStep::ObjectiveSelection; - gameState.ScenarioCategory = SCENARIO_CATEGORY_OTHER; + gLegacyScene = LegacyScene::scenarioEditor; + gameState.editorStep = EditorStep::ObjectiveSelection; + gameState.scenarioCategory = ScenarioCategory::other; ViewportInitAll(); OpenEditorWindows(); FinaliseMainView(); @@ -167,14 +167,14 @@ namespace OpenRCT2::Editor context->SetActiveScene(context->GetGameScene()); Audio::StopAll(); - gScreenFlags = SCREEN_FLAGS_TRACK_DESIGNER; + gLegacyScene = LegacyScene::trackDesigner; gScreenAge = 0; ObjectManagerUnloadAllObjects(); ObjectListLoad(); - gameStateInitAll(GetGameState(), kDefaultMapSize); + gameStateInitAll(getGameState(), kDefaultMapSize); SetAllLandOwned(); - GetGameState().EditorStep = EditorStep::ObjectSelection; + getGameState().editorStep = EditorStep::ObjectSelection; ViewportInitAll(); WindowBase* mainWindow = OpenEditorWindows(); mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ()); @@ -192,14 +192,14 @@ namespace OpenRCT2::Editor context->SetActiveScene(context->GetGameScene()); Audio::StopAll(); - gScreenFlags = SCREEN_FLAGS_TRACK_MANAGER; + gLegacyScene = LegacyScene::trackDesignsManager; gScreenAge = 0; ObjectManagerUnloadAllObjects(); ObjectListLoad(); - gameStateInitAll(GetGameState(), kDefaultMapSize); + gameStateInitAll(getGameState(), kDefaultMapSize); SetAllLandOwned(); - GetGameState().EditorStep = EditorStep::ObjectSelection; + getGameState().editorStep = EditorStep::ObjectSelection; ViewportInitAll(); WindowBase* mainWindow = OpenEditorWindows(); mainWindow->SetLocation(TileCoordsXYZ{ 75, 75, 14 }.ToCoordsXYZ()); @@ -212,9 +212,9 @@ namespace OpenRCT2::Editor */ static void SetAllLandOwned() { - auto& gameState = GetGameState(); - MapRange range = { 2 * kCoordsXYStep, 2 * kCoordsXYStep, (gameState.MapSize.x - 3) * kCoordsXYStep, - (gameState.MapSize.y - 3) * kCoordsXYStep }; + auto& gameState = getGameState(); + MapRange range = { 2 * kCoordsXYStep, 2 * kCoordsXYStep, (gameState.mapSize.x - 3) * kCoordsXYStep, + (gameState.mapSize.y - 3) * kCoordsXYStep }; auto landSetRightsAction = LandSetRightsAction(range, LandSetRightSetting::SetForSale); landSetRightsAction.SetFlags(GAME_COMMAND_FLAG_NO_SPEND); GameActions::Execute(&landSetRightsAction); @@ -232,9 +232,9 @@ namespace OpenRCT2::Editor auto* context = GetContext(); context->SetActiveScene(context->GetGameScene()); - GetGameState().EditorStep = EditorStep::LandscapeEditor; + getGameState().editorStep = EditorStep::LandscapeEditor; gScreenAge = 0; - gScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR; + gLegacyScene = LegacyScene::scenarioEditor; ViewportInitAll(); OpenEditorWindows(); FinaliseMainView(); @@ -274,44 +274,44 @@ namespace OpenRCT2::Editor staff->SetName({}); } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); ResetAllEntities(); UpdateConsolidatedPatrolAreas(); - gameState.NumGuestsInPark = 0; - gameState.NumGuestsHeadingForPark = 0; - gameState.NumGuestsInParkLastWeek = 0; - gameState.GuestChangeModifier = 0; + gameState.numGuestsInPark = 0; + gameState.numGuestsHeadingForPark = 0; + gameState.numGuestsInParkLastWeek = 0; + gameState.guestChangeModifier = 0; if (fromSave) { - gameState.Park.Flags |= PARK_FLAGS_NO_MONEY; + gameState.park.Flags |= PARK_FLAGS_NO_MONEY; - if (gameState.Park.EntranceFee == 0) + if (gameState.park.EntranceFee == 0) { - gameState.Park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY; + gameState.park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY; } else { - gameState.Park.Flags &= ~PARK_FLAGS_PARK_FREE_ENTRY; + gameState.park.Flags &= ~PARK_FLAGS_PARK_FREE_ENTRY; } - gameState.Park.Flags &= ~PARK_FLAGS_SPRITES_INITIALISED; + gameState.park.Flags &= ~PARK_FLAGS_SPRITES_INITIALISED; - gameState.GuestInitialCash = std::clamp(gameState.GuestInitialCash, 10.00_GBP, kMaxEntranceFee); + gameState.guestInitialCash = std::clamp(gameState.guestInitialCash, 10.00_GBP, kMaxEntranceFee); - gameState.InitialCash = std::min(gameState.InitialCash, 100000); + gameState.initialCash = std::min(gameState.initialCash, 100000); FinanceResetCashToInitial(); - gameState.BankLoan = std::clamp(gameState.BankLoan, 0.00_GBP, 5000000.00_GBP); + gameState.bankLoan = std::clamp(gameState.bankLoan, 0.00_GBP, 5000000.00_GBP); - gameState.MaxBankLoan = std::clamp(gameState.MaxBankLoan, 0.00_GBP, 5000000.00_GBP); + gameState.maxBankLoan = std::clamp(gameState.maxBankLoan, 0.00_GBP, 5000000.00_GBP); - gameState.BankLoanInterestRate = std::clamp(gameState.BankLoanInterestRate, 5, MaxBankLoanInterestRate); + gameState.bankLoanInterestRate = std::clamp(gameState.bankLoanInterestRate, 5, MaxBankLoanInterestRate); } - ClimateReset(gameState.Climate); + ClimateReset(); - News::InitQueue(); + News::InitQueue(gameState); } /** @@ -320,14 +320,14 @@ namespace OpenRCT2::Editor */ void OpenWindowsForCurrentStep() { - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!isInEditorMode()) { return; } auto* windowMgr = Ui::GetWindowManager(); - switch (GetGameState().EditorStep) + switch (getGameState().editorStep) { case EditorStep::ObjectSelection: if (windowMgr->FindByClass(WindowClass::EditorObjectSelection) != nullptr) @@ -340,7 +340,7 @@ namespace OpenRCT2::Editor return; } - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { ObjectManagerUnloadAllObjects(); } @@ -383,8 +383,8 @@ namespace OpenRCT2::Editor static void FinaliseMainView() { auto windowManager = Ui::GetWindowManager(); - auto& gameState = GetGameState(); - windowManager->SetMainView(gameState.SavedView, gameState.SavedViewZoom, gameState.SavedViewRotation); + auto& gameState = getGameState(); + windowManager->SetMainView(gameState.savedView, gameState.savedViewZoom, gameState.savedViewRotation); ResetAllSpriteQuadrantPlacements(); @@ -418,7 +418,7 @@ namespace OpenRCT2::Editor } // No checks beyond this point apply to the track designer or track designs manager. - const bool isTrackDesignerManager = gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER); + const bool isTrackDesignerManager = isInTrackDesignerOrManager(); if (isTrackDesignerManager) { return { ObjectType::none, kStringIdNone }; @@ -474,19 +474,19 @@ namespace OpenRCT2::Editor */ ResultWithMessage CheckPark() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); int32_t parkSize = Park::UpdateSize(gameState); if (parkSize == 0) { return { false, STR_PARK_MUST_OWN_SOME_LAND }; } - if (gameState.Park.Entrances.empty()) + if (gameState.park.Entrances.empty()) { return { false, STR_NO_PARK_ENTRANCES }; } - for (const auto& parkEntrance : gameState.Park.Entrances) + for (const auto& parkEntrance : gameState.park.Entrances) { int32_t direction = DirectionReverse(parkEntrance.direction); @@ -504,7 +504,7 @@ namespace OpenRCT2::Editor } } - if (gameState.PeepSpawns.empty()) + if (gameState.peepSpawns.empty()) { return { false, STR_PEEP_SPAWNS_NOT_SET }; } diff --git a/src/openrct2/EditorObjectSelectionSession.cpp b/src/openrct2/EditorObjectSelectionSession.cpp index be2090e2a6..a6063e2a1b 100644 --- a/src/openrct2/EditorObjectSelectionSession.cpp +++ b/src/openrct2/EditorObjectSelectionSession.cpp @@ -16,6 +16,7 @@ #include "GameState.h" #include "OpenRCT2.h" #include "drawing/Drawing.h" +#include "entity/EntityList.h" #include "entity/Guest.h" #include "entity/Staff.h" #include "localisation/Formatter.h" @@ -25,11 +26,11 @@ #include "object/ObjectList.h" #include "object/ObjectManager.h" #include "object/ObjectRepository.h" +#include "object/WaterObject.h" #include "ride/RideData.h" #include "ride/RideManager.hpp" #include "ride/TrainManager.h" #include "ride/Vehicle.h" -#include "scenario/Scenario.h" #include "windows/Intent.h" #include "world/tile_element/BannerElement.h" #include "world/tile_element/EntranceElement.h" @@ -53,8 +54,8 @@ static int32_t _numAvailableObjectsForType[EnumValue(ObjectType::count)]; static void SetupInUseSelectionFlags(); static void SetupTrackDesignerObjects(); static void SetupTrackManagerObjects(); -static void WindowEditorObjectSelectionSelectDefaultObjects(); -static void SelectDesignerObjects(); +static void selectScenarioEditorObjects(); +static void selectTrackDesignerObjects(); static void ReplaceSelectedWaterPalette(const ObjectRepositoryItem* item); /** @@ -104,7 +105,7 @@ static void SetupTrackDesignerObjects() { int32_t numObjects = static_cast(ObjectRepositoryGetItemsCount()); const ObjectRepositoryItem* items = ObjectRepositoryGetItems(); - SelectDesignerObjects(); + selectTrackDesignerObjects(); for (int32_t i = 0; i < numObjects; i++) { uint8_t* selectionFlags = &_objectSelectionFlags[i]; @@ -246,7 +247,7 @@ void SetupInUseSelectionFlags() for (auto& ride : GetRideManager()) { Editor::SetSelectedObject(ObjectType::ride, ride.subtype, ObjectSelectionFlags::InUse); - Editor::SetSelectedObject(ObjectType::station, ride.entrance_style, ObjectSelectionFlags::InUse); + Editor::SetSelectedObject(ObjectType::station, ride.entranceStyle, ObjectSelectionFlags::InUse); Editor::SetSelectedObject(ObjectType::music, ride.music, ObjectSelectionFlags::InUse); } @@ -325,12 +326,12 @@ void Sub6AB211() _numAvailableObjectsForType[EnumValue(objectType)]++; } - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + if (gLegacyScene == LegacyScene::trackDesigner) { SetupTrackDesignerObjects(); } - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { SetupTrackManagerObjects(); } @@ -338,12 +339,12 @@ void Sub6AB211() SetupInUseSelectionFlags(); ResetSelectedObjectCountAndSize(); - if (!(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) + if (!(isInTrackDesignerOrManager())) { // To prevent it breaking in scenario mode. - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) { - WindowEditorObjectSelectionSelectDefaultObjects(); + selectScenarioEditorObjects(); } } @@ -354,7 +355,7 @@ void Sub6AB211() * * rct2: 0x006AB316 */ -void EditorObjectFlagsFree() +void EditorObjectFlagsClear() { _objectSelectionFlags.clear(); _objectSelectionFlags.shrink_to_fit(); @@ -430,31 +431,33 @@ void UnloadUnselectedObjects() * * rct2: 0x006AA805 */ -static void WindowEditorObjectSelectionSelectDefaultObjects() +static void selectScenarioEditorObjects() { if (_numSelectedObjectsForType[0] == 0) { - for (auto defaultSelectedObject : DefaultSelectedObjects) + for (auto designerSelectedObject : kCommonScenarioAndTrackDesignerObjects) { WindowEditorObjectSelectionSelectObject( - 0, - INPUT_FLAG_EDITOR_OBJECT_SELECT | INPUT_FLAG_EDITOR_OBJECT_1 - | INPUT_FLAG_EDITOR_OBJECT_SELECT_OBJECTS_IN_SCENERY_GROUP, + 0, { EditorInputFlag::select, EditorInputFlag::unk1, EditorInputFlag::selectObjectsInSceneryGroup }, + ObjectEntryDescriptor(designerSelectedObject)); + } + for (auto defaultSelectedObject : kDefaultScenarioObjects) + { + WindowEditorObjectSelectionSelectObject( + 0, { EditorInputFlag::select, EditorInputFlag::unk1, EditorInputFlag::selectObjectsInSceneryGroup }, ObjectEntryDescriptor(defaultSelectedObject)); } } } -static void SelectDesignerObjects() +static void selectTrackDesignerObjects() { if (_numSelectedObjectsForType[0] == 0) { - for (auto designerSelectedObject : DesignerSelectedObjects) + for (auto designerSelectedObject : kCommonScenarioAndTrackDesignerObjects) { WindowEditorObjectSelectionSelectObject( - 0, - INPUT_FLAG_EDITOR_OBJECT_SELECT | INPUT_FLAG_EDITOR_OBJECT_1 - | INPUT_FLAG_EDITOR_OBJECT_SELECT_OBJECTS_IN_SCENERY_GROUP, + 0, { EditorInputFlag::select, EditorInputFlag::unk1, EditorInputFlag::selectObjectsInSceneryGroup }, ObjectEntryDescriptor(designerSelectedObject)); } } @@ -466,7 +469,7 @@ static void SelectDesignerObjects() static void ReplaceSelectedWaterPalette(const ObjectRepositoryItem* item) { auto& objectManager = OpenRCT2::GetContext()->GetObjectManager(); - auto* oldPalette = objectManager.GetLoadedObject(ObjectType::water, 0); + auto* oldPalette = objectManager.GetLoadedObject(0); if (oldPalette != nullptr) { @@ -510,20 +513,20 @@ void ResetSelectedObjectCountAndSize() void FinishObjectSelection() { - auto& gameState = GetGameState(); - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + auto& gameState = getGameState(); + if (gLegacyScene == LegacyScene::trackDesigner) { SetEveryRideTypeInvented(); SetEveryRideEntryInvented(); auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); - gameState.LastEntranceStyle = objManager.GetLoadedObjectEntryIndex("rct2.station.plain"); - if (gameState.LastEntranceStyle == kObjectEntryIndexNull) + gameState.lastEntranceStyle = objManager.GetLoadedObjectEntryIndex("rct2.station.plain"); + if (gameState.lastEntranceStyle == kObjectEntryIndexNull) { - gameState.LastEntranceStyle = 0; + gameState.lastEntranceStyle = 0; } - gameState.EditorStep = EditorStep::RollercoasterDesigner; + gameState.editorStep = EditorStep::RollercoasterDesigner; GfxInvalidateScreen(); } else @@ -533,7 +536,7 @@ void FinishObjectSelection() auto intent = Intent(INTENT_ACTION_SET_DEFAULT_SCENERY_CONFIG); ContextBroadcastIntent(&intent); - gameState.EditorStep = EditorStep::LandscapeEditor; + gameState.editorStep = EditorStep::LandscapeEditor; GfxInvalidateScreen(); } } @@ -543,7 +546,7 @@ void FinishObjectSelection() * rct2: 0x006AB54F */ ResultWithMessage WindowEditorObjectSelectionSelectObject( - uint8_t isMasterObject, int32_t flags, const ObjectRepositoryItem* item) + uint8_t isMasterObject, EditorInputFlags flags, const ObjectRepositoryItem* item) { if (item == nullptr) { @@ -563,7 +566,7 @@ ResultWithMessage WindowEditorObjectSelectionSelectObject( } uint8_t* selectionFlags = &_objectSelectionFlags[index]; - if (!(flags & INPUT_FLAG_EDITOR_OBJECT_SELECT)) + if (!flags.has(EditorInputFlag::select)) { if (!(*selectionFlags & ObjectSelectionFlags::Selected)) { @@ -581,7 +584,7 @@ ResultWithMessage WindowEditorObjectSelectionSelectObject( } ObjectType objectType = item->Type; - if (objectType == ObjectType::sceneryGroup && (flags & INPUT_FLAG_EDITOR_OBJECT_SELECT_OBJECTS_IN_SCENERY_GROUP)) + if (objectType == ObjectType::sceneryGroup && flags.has(EditorInputFlag::selectObjectsInSceneryGroup)) { for (const auto& sgEntry : item->SceneryGroupInfo.Entries) { @@ -596,7 +599,7 @@ ResultWithMessage WindowEditorObjectSelectionSelectObject( if (isMasterObject == 0) { - if (flags & INPUT_FLAG_EDITOR_OBJECT_ALWAYS_REQUIRED) + if (flags.has(EditorInputFlag::objectAlwaysRequired)) { *selectionFlags |= ObjectSelectionFlags::AlwaysRequired; } @@ -620,7 +623,7 @@ ResultWithMessage WindowEditorObjectSelectionSelectObject( return ObjectSelectionError(isMasterObject, STR_OBJECT_SELECTION_ERR_TOO_MANY_OF_TYPE_SELECTED); } - if (objectType == ObjectType::sceneryGroup && (flags & INPUT_FLAG_EDITOR_OBJECT_SELECT_OBJECTS_IN_SCENERY_GROUP)) + if (objectType == ObjectType::sceneryGroup && flags.has(EditorInputFlag::selectObjectsInSceneryGroup)) { for (const auto& sgEntry : item->SceneryGroupInfo.Entries) { @@ -642,7 +645,7 @@ ResultWithMessage WindowEditorObjectSelectionSelectObject( PeepUpdateNames(); } - if (isMasterObject != 0 && !(flags & INPUT_FLAG_EDITOR_OBJECT_1)) + if (isMasterObject != 0 && !flags.has(EditorInputFlag::unk1)) { char objectName[64]; ObjectCreateIdentifierName(objectName, 64, &item->ObjectEntry); @@ -663,7 +666,7 @@ ResultWithMessage WindowEditorObjectSelectionSelectObject( } ResultWithMessage WindowEditorObjectSelectionSelectObject( - uint8_t isMasterObject, int32_t flags, const ObjectEntryDescriptor& descriptor) + uint8_t isMasterObject, EditorInputFlags flags, const ObjectEntryDescriptor& descriptor) { auto& objectRepository = OpenRCT2::GetContext()->GetObjectRepository(); const auto* item = objectRepository.FindObject(descriptor); @@ -753,6 +756,10 @@ int32_t EditorRemoveUnusedObjects() if (objectType == ObjectType::peepAnimations) continue; + // Avoid deleting climate objects, as they're not bound to entities. + if (objectType == ObjectType::climate) + continue; + // It’s hard to determine exactly if a scenery group is used, so do not remove these automatically. if (objectType == ObjectType::sceneryGroup) continue; @@ -764,7 +771,7 @@ int32_t EditorRemoveUnusedObjects() } } UnloadUnselectedObjects(); - EditorObjectFlagsFree(); + EditorObjectFlagsClear(); auto intent = Intent(INTENT_ACTION_REFRESH_SCENERY); ContextBroadcastIntent(&intent); diff --git a/src/openrct2/EditorObjectSelectionSession.h b/src/openrct2/EditorObjectSelectionSession.h index b6af31af1e..331fb100be 100644 --- a/src/openrct2/EditorObjectSelectionSession.h +++ b/src/openrct2/EditorObjectSelectionSession.h @@ -10,19 +10,21 @@ #pragma once #include "core/EnumUtils.hpp" +#include "core/FlagHolder.hpp" #include "object/Object.h" #include struct ResultWithMessage; -enum EDITOR_INPUT_FLAGS +enum class EditorInputFlag : uint8_t { - INPUT_FLAG_EDITOR_OBJECT_SELECT = (1 << 0), // Set when you want to select an object, not set when you want to deselect it. - INPUT_FLAG_EDITOR_OBJECT_1 = (1 << 1), - INPUT_FLAG_EDITOR_OBJECT_SELECT_OBJECTS_IN_SCENERY_GROUP = (1 << 2), - INPUT_FLAG_EDITOR_OBJECT_ALWAYS_REQUIRED = (1 << 3) + select, // Set when you want to select an object, not set when you want to deselect it. + unk1, + selectObjectsInSceneryGroup, + objectAlwaysRequired, }; +using EditorInputFlags = FlagHolder; extern std::optional _gSceneryGroupPartialSelectError; extern std::vector _objectSelectionFlags; @@ -31,15 +33,15 @@ extern uint32_t _numSelectedObjectsForType[EnumValue(ObjectType::count)]; bool EditorCheckObjectGroupAtLeastOneSelected(ObjectType checkObjectType); bool EditorCheckObjectGroupAtLeastOneOfPeepTypeSelected(uint8_t peepType); bool EditorCheckObjectGroupAtLeastOneSurfaceSelected(bool queue); -void EditorObjectFlagsFree(); +void EditorObjectFlagsClear(); void UnloadUnselectedObjects(); void Sub6AB211(); void ResetSelectedObjectCountAndSize(); void FinishObjectSelection(); ResultWithMessage WindowEditorObjectSelectionSelectObject( - uint8_t isMasterObject, int32_t flags, const ObjectRepositoryItem* item); + uint8_t isMasterObject, EditorInputFlags flags, const ObjectRepositoryItem* item); ResultWithMessage WindowEditorObjectSelectionSelectObject( - uint8_t isMasterObject, int32_t flags, const ObjectEntryDescriptor& entry); + uint8_t isMasterObject, EditorInputFlags flags, const ObjectEntryDescriptor& entry); /** * Removes all unused objects from the object selection. diff --git a/src/openrct2/FileClassifier.cpp b/src/openrct2/FileClassifier.cpp index ab0dfcedc7..2195bc0d2e 100644 --- a/src/openrct2/FileClassifier.cpp +++ b/src/openrct2/FileClassifier.cpp @@ -32,7 +32,7 @@ bool TryClassifyFile(const std::string& path, ClassifiedFileInfo* result) { try { - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::open); return TryClassifyFile(&fs, result); } catch (const std::exception&) @@ -84,7 +84,7 @@ static bool TryClassifyAsPark(OpenRCT2::IStream* stream, ClassifiedFileInfo* res auto magic = stream->ReadValue(); if (magic == OpenRCT2::kParkFileMagic) { - result->Type = FILE_TYPE::PARK; + result->Type = FileType::park; result->Version = 0; success = true; } @@ -108,11 +108,11 @@ static bool TryClassifyAsS6(OpenRCT2::IStream* stream, ClassifiedFileInfo* resul auto s6Header = chunkReader.ReadChunkAs(); if (s6Header.Type == S6_TYPE_SAVEDGAME) { - result->Type = FILE_TYPE::SAVED_GAME; + result->Type = FileType::savedGame; } else if (s6Header.Type == S6_TYPE_SCENARIO) { - result->Type = FILE_TYPE::SCENARIO; + result->Type = FileType::scenario; } result->Version = s6Header.Version; success = true; @@ -142,13 +142,13 @@ static bool TryClassifyAsS4(OpenRCT2::IStream* stream, ClassifiedFileInfo* resul if (type == FILE_TYPE_SV4) { - result->Type = FILE_TYPE::SAVED_GAME; + result->Type = FileType::savedGame; result->Version = version; success = true; } else if (type == FILE_TYPE_SC4) { - result->Type = FILE_TYPE::SCENARIO; + result->Type = FileType::scenario; result->Version = version; success = true; } @@ -183,7 +183,7 @@ static bool TryClassifyAsTD4_TD6(OpenRCT2::IStream* stream, ClassifiedFileInfo* uint8_t version = (td6data.get()[7] >> 2) & 3; if (version <= 2) { - result->Type = FILE_TYPE::TRACK_DESIGN; + result->Type = FileType::trackDesign; result->Version = version; success = true; } diff --git a/src/openrct2/FileClassifier.h b/src/openrct2/FileClassifier.h index 1220e82842..e360b8d3c9 100644 --- a/src/openrct2/FileClassifier.h +++ b/src/openrct2/FileClassifier.h @@ -31,19 +31,19 @@ namespace OpenRCT2 struct IStream; } -enum class FILE_TYPE +enum class FileType { - UNDEFINED, - OBJECT, - SAVED_GAME, - SCENARIO, - TRACK_DESIGN, - PARK, + undefined, + object, + savedGame, + scenario, + trackDesign, + park, }; struct ClassifiedFileInfo { - FILE_TYPE Type = FILE_TYPE::UNDEFINED; + FileType Type = FileType::undefined; uint32_t Version = 0; }; diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 9af209bc11..3799c3fc8a 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -32,6 +32,7 @@ #include "core/Path.hpp" #include "core/SawyerCoding.h" #include "core/String.hpp" +#include "entity/EntityList.h" #include "entity/EntityRegistry.h" #include "entity/PatrolArea.h" #include "entity/Peep.h" @@ -56,7 +57,6 @@ #include "ride/Track.h" #include "ride/TrackDesign.h" #include "ride/Vehicle.h" -#include "scenario/Scenario.h" #include "scenes/title/TitleScene.h" #include "scripting/ScriptEngine.h" #include "ui/UiContext.h" @@ -167,7 +167,8 @@ bool GameIsNotPaused() static void LoadLandscape() { auto intent = Intent(WindowClass::Loadsave); - intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_LANDSCAPE); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::landscape); ContextOpenIntent(&intent); } @@ -182,7 +183,7 @@ void RCT2StringToUTF8Self(char* buffer, size_t length) static void FixGuestsHeadingToParkCount() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); uint32_t guestsHeadingToPark = 0; @@ -194,13 +195,13 @@ static void FixGuestsHeadingToParkCount() } } - if (gameState.NumGuestsHeadingForPark != guestsHeadingToPark) + if (gameState.numGuestsHeadingForPark != guestsHeadingToPark) { LOG_WARNING( - "Corrected bad amount of guests heading to park: %u -> %u", gameState.NumGuestsHeadingForPark, guestsHeadingToPark); + "Corrected bad amount of guests heading to park: %u -> %u", gameState.numGuestsHeadingForPark, guestsHeadingToPark); } - gameState.NumGuestsHeadingForPark = guestsHeadingToPark; + gameState.numGuestsHeadingForPark = guestsHeadingToPark; } static void FixGuestCount() @@ -216,13 +217,13 @@ static void FixGuestCount() } } - auto& gameState = GetGameState(); - if (gameState.NumGuestsInPark != guestCount) + auto& gameState = getGameState(); + if (gameState.numGuestsInPark != guestCount) { - LOG_WARNING("Corrected bad amount of guests in park: %u -> %u", gameState.NumGuestsInPark, guestCount); + LOG_WARNING("Corrected bad amount of guests in park: %u -> %u", gameState.numGuestsInPark, guestCount); } - gameState.NumGuestsInPark = guestCount; + gameState.numGuestsInPark = guestCount; } static void FixPeepsWithInvalidRideReference() @@ -302,8 +303,8 @@ static void FixInvalidSurfaces() // Fix the invisible border tiles. // At this point, we can be sure that surfaceElement is not NULL. - auto& gameState = GetGameState(); - if (x == 0 || x == gameState.MapSize.x - 1 || y == 0 || y == gameState.MapSize.y - 1) + auto& gameState = getGameState(); + if (x == 0 || x == gameState.mapSize.x - 1 || y == 0 || y == gameState.mapSize.y - 1) { surfaceElement->SetBaseZ(kMinimumLandZ); surfaceElement->SetClearanceZ(kMinimumLandZ); @@ -366,8 +367,8 @@ void GameLoadInit() } auto windowManager = context->GetUiContext()->GetWindowManager(); - auto& gameState = GetGameState(); - windowManager->SetMainView(gameState.SavedView, gameState.SavedViewZoom, gameState.SavedViewRotation); + auto& gameState = getGameState(); + windowManager->SetMainView(gameState.savedView, gameState.savedViewZoom, gameState.savedViewRotation); if (NetworkGetMode() != NETWORK_MODE_CLIENT) { @@ -416,7 +417,7 @@ void GameNotifyMapChange() auto& scriptEngine = GetContext()->GetScriptEngine(); auto& hookEngine = scriptEngine.GetHookEngine(); - hookEngine.Call(HOOK_TYPE::MAP_CHANGE, false); + hookEngine.Call(HookType::mapChange, false); _mapChangedExpected = true; #endif } @@ -428,7 +429,7 @@ void GameNotifyMapChanged() auto& scriptEngine = GetContext()->GetScriptEngine(); auto& hookEngine = scriptEngine.GetHookEngine(); - hookEngine.Call(HOOK_TYPE::MAP_CHANGED, false); + hookEngine.Call(HookType::mapChanged, false); _mapChangedExpected = false; #endif } @@ -474,7 +475,7 @@ void SaveGameCmd(u8string_view name /* = {} */) else { auto env = GetContext()->GetPlatformEnvironment(); - auto savePath = Path::Combine(env->GetDirectoryPath(DIRBASE::USER, DIRID::SAVE), u8string(name) + u8".park"); + auto savePath = Path::Combine(env->GetDirectoryPath(DirBase::user, DirId::saves), u8string(name) + u8".park"); SaveGameWithName(savePath); } } @@ -483,7 +484,7 @@ void SaveGameWithName(u8string_view name) { LOG_VERBOSE("Saving to %s", u8string(name).c_str()); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (ScenarioSave(gameState, name, Config::Get().general.SavePluginData ? 1 : 0)) { LOG_VERBOSE("Saved to %s", u8string(name).c_str()); @@ -498,7 +499,8 @@ std::unique_ptr CreateSaveGameAsIntent() auto name = Path::GetFileNameWithoutExtension(gScenarioSavePath); auto intent = std::make_unique(WindowClass::Loadsave); - intent->PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_SAVE | LOADSAVETYPE_GAME); + intent->PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); + intent->PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::park); intent->PutExtra(INTENT_EXTRA_PATH, name); return intent; @@ -516,11 +518,11 @@ static void LimitAutosaveCount(const size_t numberOfFilesToKeep, bool processLan size_t numAutosavesToDelete = 0; auto environment = GetContext()->GetPlatformEnvironment(); - auto folderDirectory = environment->GetDirectoryPath(DIRBASE::USER, DIRID::SAVE); + auto folderDirectory = environment->GetDirectoryPath(DirBase::user, DirId::saves); char const* fileFilter = "autosave_*.park"; if (processLandscapeFolder) { - folderDirectory = environment->GetDirectoryPath(DIRBASE::USER, DIRID::LANDSCAPE); + folderDirectory = environment->GetDirectoryPath(DirBase::user, DirId::landscapes); fileFilter = "autosave_*.park"; } @@ -571,12 +573,12 @@ static void LimitAutosaveCount(const size_t numberOfFilesToKeep, bool processLan void GameAutosave() { - auto subDirectory = DIRID::SAVE; + auto subDirectory = DirId::saves; const char* fileExtension = ".park"; uint32_t saveFlags = 0x80000000; - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + if (isInEditorMode()) { - subDirectory = DIRID::LANDSCAPE; + subDirectory = DirId::landscapes; fileExtension = ".park"; saveFlags |= 2; } @@ -591,10 +593,10 @@ void GameAutosave() currentDate.day, currentTime.hour, currentTime.minute, currentTime.second, fileExtension); int32_t autosavesToKeep = Config::Get().general.AutosaveAmount; - LimitAutosaveCount(autosavesToKeep - 1, (gScreenFlags & SCREEN_FLAGS_EDITOR)); + LimitAutosaveCount(autosavesToKeep - 1, isInEditorMode()); auto env = GetContext()->GetPlatformEnvironment(); - auto autosaveDir = Path::Combine(env->GetDirectoryPath(DIRBASE::USER, subDirectory), u8"autosave"); + auto autosaveDir = Path::Combine(env->GetDirectoryPath(DirBase::user, subDirectory), u8"autosave"); Path::CreateDirectory(autosaveDir); auto path = Path::Combine(autosaveDir, timeName); @@ -606,15 +608,15 @@ void GameAutosave() File::Copy(path, backupPath, true); } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (!ScenarioSave(gameState, path, saveFlags)) Console::Error::WriteLine("Could not autosave the scenario. Is the save folder writeable?"); } -static void GameLoadOrQuitNoSavePromptCallback(int32_t result, const utf8* path) +static void GameLoadOrQuitNoSavePromptCallback(ModalResult result, const utf8* path) { - if (result == MODAL_RESULT_OK) + if (result == ModalResult::ok) { GameNotifyMapChange(); GameUnloadScripts(); @@ -651,32 +653,33 @@ void GameLoadOrQuitNoSavePrompt() { switch (gSavePromptMode) { - case PromptMode::SaveBeforeLoad: + case PromptMode::saveBeforeLoad: { auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::CloseSavePrompt); GameActions::Execute(&loadOrQuitAction); ToolCancel(); - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) { LoadLandscape(); } else { auto intent = Intent(WindowClass::Loadsave); - intent.PutExtra(INTENT_EXTRA_LOADSAVE_TYPE, LOADSAVETYPE_LOAD | LOADSAVETYPE_GAME); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); + intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::park); intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(GameLoadOrQuitNoSavePromptCallback)); ContextOpenIntent(&intent); } break; } - case PromptMode::SaveBeforeQuit: + case PromptMode::saveBeforeQuit: { auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::CloseSavePrompt); GameActions::Execute(&loadOrQuitAction); ToolCancel(); - if (InputTestFlag(INPUT_FLAG_5)) + if (gInputFlags.has(InputFlag::unk5)) { - InputSetFlag(INPUT_FLAG_5, false); + gInputFlags.unset(InputFlag::unk5); } GameResetSpeed(); gFirstTimeSaving = true; @@ -687,7 +690,7 @@ void GameLoadOrQuitNoSavePrompt() context->SetActiveScene(context->GetTitleScene()); break; } - case PromptMode::SaveBeforeNewGame: + case PromptMode::saveBeforeNewGame: { auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::CloseSavePrompt); GameActions::Execute(&loadOrQuitAction); @@ -708,7 +711,7 @@ void GameLoadOrQuitNoSavePrompt() void StartSilentRecord() { std::string name = Path::Combine( - OpenRCT2::GetContext()->GetPlatformEnvironment()->GetDirectoryPath(OpenRCT2::DIRBASE::USER), u8"debug_replay.parkrep"); + OpenRCT2::GetContext()->GetPlatformEnvironment()->GetDirectoryPath(OpenRCT2::DirBase::user), u8"debug_replay.parkrep"); auto* replayManager = OpenRCT2::GetContext()->GetReplayManager(); if (replayManager->StartRecording(name, OpenRCT2::k_MaxReplayTicks, OpenRCT2::IReplayManager::RecordType::SILENT)) { @@ -754,9 +757,9 @@ void PrepareMapForSave() #ifdef ENABLE_SCRIPTING auto& scriptEngine = GetContext()->GetScriptEngine(); auto& hookEngine = scriptEngine.GetHookEngine(); - if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HOOK_TYPE::MAP_SAVE)) + if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HookType::mapSave)) { - hookEngine.Call(OpenRCT2::Scripting::HOOK_TYPE::MAP_SAVE, false); + hookEngine.Call(OpenRCT2::Scripting::HookType::mapSave, false); } #endif } diff --git a/src/openrct2/GameState.cpp b/src/openrct2/GameState.cpp index bf9a968679..d2ef701adc 100644 --- a/src/openrct2/GameState.cpp +++ b/src/openrct2/GameState.cpp @@ -27,6 +27,7 @@ #include "scripting/ScriptEngine.h" #include "ui/UiContext.h" #include "windows/Intent.h" +#include "world/MapAnimation.h" #include "world/Scenery.h" using namespace OpenRCT2::Scripting; @@ -35,12 +36,12 @@ namespace OpenRCT2 { static auto _gameState = std::make_unique(); - GameState_t& GetGameState() + GameState_t& getGameState() { return *_gameState; } - void SwapGameState(std::unique_ptr& otherState) + void swapGameState(std::unique_ptr& otherState) { _gameState.swap(otherState); } @@ -53,7 +54,7 @@ namespace OpenRCT2 PROFILED_FUNCTION(); gInMapInitCode = true; - gameState.CurrentTicks = 0; + gameState.currentTicks = 0; MapInit(mapSize); Park::Initialise(gameState); @@ -63,12 +64,12 @@ namespace OpenRCT2 ResetAllEntities(); UpdateConsolidatedPatrolAreas(); ResetDate(); - ClimateReset(ClimateType::CoolAndWet); - News::InitQueue(); + ClimateReset(); + News::InitQueue(gameState); gInMapInitCode = false; - gameState.NextGuestNumber = 1; + gameState.nextGuestNumber = 1; ContextInit(); @@ -122,7 +123,7 @@ namespace OpenRCT2 if (NetworkGetMode() == NETWORK_MODE_CLIENT && NetworkGetStatus() == NETWORK_STATUS_CONNECTED && NetworkGetAuthstatus() == NetworkAuth::Ok) { - numUpdates = std::clamp(NetworkGetServerTick() - GetGameState().CurrentTicks, 0, 10); + numUpdates = std::clamp(NetworkGetServerTick() - getGameState().currentTicks, 0, 10); } else { @@ -189,9 +190,9 @@ namespace OpenRCT2 { if (InputGetState() == InputState::Reset || InputGetState() == InputState::Normal) { - if (InputTestFlag(INPUT_FLAG_VIEWPORT_SCROLLING)) + if (gInputFlags.has(InputFlag::viewportScrolling)) { - InputSetFlag(INPUT_FLAG_VIEWPORT_SCROLLING, false); + gInputFlags.unset(InputFlag::viewportScrolling); break; } } @@ -210,17 +211,17 @@ namespace OpenRCT2 if (!gOpenRCT2Headless) { - InputSetFlag(INPUT_FLAG_VIEWPORT_SCROLLING, false); + gInputFlags.unset(InputFlag::viewportScrolling); } // Always perform autosave check, even when paused - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && !(gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) - && !(gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER)) + if (gLegacyScene != LegacyScene::titleSequence && gLegacyScene != LegacyScene::trackDesigner + && gLegacyScene != LegacyScene::trackDesignsManager) { ScenarioAutosaveCheck(); } - if (didRunSingleFrame && GameIsNotPaused() && !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (didRunSingleFrame && GameIsNotPaused() && gLegacyScene != LegacyScene::titleSequence) { PauseToggle(); } @@ -236,7 +237,7 @@ namespace OpenRCT2 auto& snapshot = snapshots->CreateSnapshot(); snapshots->Capture(snapshot); - snapshots->LinkSnapshot(snapshot, GetGameState().CurrentTicks, ScenarioRandState().s0); + snapshots->LinkSnapshot(snapshot, getGameState().currentTicks, ScenarioRandState().s0); } void gameStateUpdateLogic() @@ -253,7 +254,7 @@ namespace OpenRCT2 NetworkUpdate(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (NetworkGetMode() == NETWORK_MODE_SERVER) { @@ -268,7 +269,7 @@ namespace OpenRCT2 else if (NetworkGetMode() == NETWORK_MODE_CLIENT) { // Don't run past the server, this condition can happen during map changes. - if (NetworkGetServerTick() == gameState.CurrentTicks) + if (NetworkGetServerTick() == gameState.currentTicks) { gInUpdateCode = false; return; @@ -293,7 +294,7 @@ namespace OpenRCT2 #ifdef ENABLE_SCRIPTING // Stash the current day number before updating the date so that we // know if the day number changes on this tick. - auto day = gameState.Date.GetDay(); + auto day = gameState.date.GetDay(); #endif DateUpdate(gameState); @@ -312,11 +313,11 @@ namespace OpenRCT2 ContextBroadcastIntent(&restoreProvisionalIntent); VehicleUpdateAll(); UpdateAllMiscEntities(); - Ride::UpdateAll(); + Ride::updateAll(); - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!isInEditorMode()) { - Park::Update(gameState, gameState.Date); + Park::Update(gameState, gameState.date); } ResearchUpdate(); @@ -346,15 +347,15 @@ namespace OpenRCT2 NetworkProcessPending(); NetworkFlush(); - gameState.CurrentTicks++; + gameState.currentTicks++; #ifdef ENABLE_SCRIPTING auto& hookEngine = GetContext()->GetScriptEngine().GetHookEngine(); - hookEngine.Call(HOOK_TYPE::INTERVAL_TICK, true); + hookEngine.Call(HookType::intervalTick, true); - if (day != gameState.Date.GetDay()) + if (day != gameState.date.GetDay()) { - hookEngine.Call(HOOK_TYPE::INTERVAL_DAY, true); + hookEngine.Call(HookType::intervalDay, true); } #endif diff --git a/src/openrct2/GameState.h b/src/openrct2/GameState.h index e4c44c7a6e..4b9daf8e18 100644 --- a/src/openrct2/GameState.h +++ b/src/openrct2/GameState.h @@ -14,6 +14,7 @@ #include "Editor.h" #include "Limits.h" #include "core/EnumUtils.hpp" +#include "entity/EntityRegistry.h" #include "interface/ZoomLevel.h" #include "management/Award.h" #include "management/Finance.h" @@ -36,104 +37,103 @@ namespace OpenRCT2 { struct GameState_t { - ::OpenRCT2::Park::ParkData Park{}; - std::string PluginStorage; - uint32_t CurrentTicks{}; - ::OpenRCT2::Date Date; - money64 CompanyValue; + Park::ParkData park{}; + std::string pluginStorage; + uint32_t currentTicks{}; + Date date; + money64 companyValue; // The total profit for the entire scenario that precedes the current financial table. - money64 HistoricalProfit; - money64 ConstructionRightsPrice; - money64 CurrentExpenditure; - money64 CurrentProfit; - uint32_t GuestsInParkHistory[kGuestsInParkHistorySize]; - ClimateType Climate; - WeatherState WeatherCurrent; - WeatherState WeatherNext; - uint16_t WeatherUpdateTimer; - money64 Cash; - money64 CashHistory[kFinanceHistorySize]; - money64 InitialCash; - money64 GuestInitialCash; - uint8_t GuestInitialHappiness; - uint8_t GuestInitialHunger; - uint8_t GuestInitialThirst; - uint8_t GuestChangeModifier; - uint32_t NextGuestNumber; - uint32_t NumGuestsInPark; - uint32_t NumGuestsHeadingForPark; - uint32_t NumGuestsInParkLastWeek; - money64 WeeklyProfitAverageDividend; - uint64_t TotalAdmissions; - money64 TotalIncomeFromAdmissions; - money64 TotalRideValueForMoney; - uint16_t WeeklyProfitAverageDivisor; - money64 WeeklyProfitHistory[kFinanceHistorySize]; - Objective ScenarioObjective; - uint16_t ScenarioParkRatingWarningDays; - money64 ScenarioCompletedCompanyValue; - money64 ScenarioCompanyValueRecord; - money64 BankLoan; - uint8_t BankLoanInterestRate; - money64 MaxBankLoan; - money64 ExpenditureTable[kExpenditureTableMonthCount][EnumValue(ExpenditureType::Count)]; - random_engine_t ScenarioRand; - TileCoordsXY MapSize; - money64 LandPrice; + money64 historicalProfit; + money64 constructionRightsPrice; + money64 currentExpenditure; + money64 currentProfit; + uint32_t guestsInParkHistory[kGuestsInParkHistorySize]; + WeatherState weatherCurrent; + WeatherState weatherNext; + uint16_t weatherUpdateTimer; + money64 cash; + money64 cashHistory[kFinanceHistorySize]; + money64 initialCash; + money64 guestInitialCash; + uint8_t guestInitialHappiness; + uint8_t guestInitialHunger; + uint8_t guestInitialThirst; + uint8_t guestChangeModifier; + uint32_t nextGuestNumber; + uint32_t numGuestsInPark; + uint32_t numGuestsHeadingForPark; + uint32_t numGuestsInParkLastWeek; + money64 weeklyProfitAverageDividend; + uint64_t totalAdmissions; + money64 totalIncomeFromAdmissions; + money64 totalRideValueForMoney; + uint16_t weeklyProfitAverageDivisor; + money64 weeklyProfitHistory[kFinanceHistorySize]; + Objective scenarioObjective; + uint16_t scenarioParkRatingWarningDays; + money64 scenarioCompletedCompanyValue; + money64 scenarioCompanyValueRecord; + money64 bankLoan; + uint8_t bankLoanInterestRate; + money64 maxBankLoan; + money64 expenditureTable[kExpenditureTableMonthCount][EnumValue(ExpenditureType::Count)]; + random_engine_t scenarioRand; + TileCoordsXY mapSize; + money64 landPrice; - ::EditorStep EditorStep; + EditorStep editorStep; - SCENARIO_CATEGORY ScenarioCategory; - std::string ScenarioName; - std::string ScenarioDetails; - std::string ScenarioCompletedBy; - std::string ScenarioFileName; + ScenarioCategory scenarioCategory; + std::string scenarioName; + std::string scenarioDetails; + std::string scenarioCompletedBy; + std::string scenarioFileName; - std::vector Banners; - Entity_t Entities[kMaxEntities]{}; + std::vector banners; + Entity_t entities[kMaxEntities]{}; // Ride storage for all the rides in the park, rides with RideId::Null are considered free. - std::array Rides{}; - size_t RidesEndOfUsedRange{}; - ::RideRatingUpdateStates RideRatingUpdateStates; - std::vector TileElements; + std::array rides{}; + size_t ridesEndOfUsedRange{}; + RideRatingUpdateStates rideRatingUpdateStates; + std::vector tileElements; - std::vector RestrictedScenery; + std::vector restrictedScenery; - std::vector PeepSpawns; - uint8_t PeepWarningThrottle[16]; + std::vector peepSpawns; + uint8_t peepWarningThrottle[16]; - News::ItemQueues NewsItems; + News::ItemQueues newsItems; - uint16_t GrassSceneryTileLoopPosition; - CoordsXY WidePathTileLoopPosition; + uint16_t grassSceneryTileLoopPosition; + CoordsXY widePathTileLoopPosition; - colour_t StaffHandymanColour; - colour_t StaffMechanicColour; - colour_t StaffSecurityColour; - uint64_t SamePriceThroughoutPark{}; + colour_t staffHandymanColour; + colour_t staffMechanicColour; + colour_t staffSecurityColour; + uint64_t samePriceThroughoutPark{}; - uint8_t ResearchFundingLevel; - uint8_t ResearchPriorities; - uint16_t ResearchProgress; - uint8_t ResearchProgressStage; - uint8_t ResearchExpectedMonth; - uint8_t ResearchExpectedDay; - std::optional ResearchLastItem; - std::optional ResearchNextItem; + uint8_t researchFundingLevel; + uint8_t researchPriorities; + uint16_t researchProgress; + uint8_t researchProgressStage; + uint8_t researchExpectedMonth; + uint8_t researchExpectedDay; + std::optional researchLastItem; + std::optional researchNextItem; - std::vector ResearchItemsUninvented; - std::vector ResearchItemsInvented; - uint8_t ResearchUncompletedCategories; + std::vector researchItemsUninvented; + std::vector researchItemsInvented; + uint8_t researchUncompletedCategories; - ScreenCoordsXY SavedView; - uint8_t SavedViewRotation; - ZoomLevel SavedViewZoom; + ScreenCoordsXY savedView; + uint8_t savedViewRotation; + ZoomLevel savedViewZoom; - ObjectEntryIndex LastEntranceStyle; + ObjectEntryIndex lastEntranceStyle; - std::vector CurrentAwards; + std::vector currentAwards; - std::vector MarketingCampaigns; + std::vector marketingCampaigns; /** * Probability out of 65535, of gaining a new guest per game tick. @@ -141,17 +141,17 @@ namespace OpenRCT2 * With a full park rating, non-overpriced entrance fee, less guests than the suggested maximum and four positive * awards, approximately 1 guest per second can be generated (+60 guests in one minute). */ - int32_t GuestGenerationProbability; + int32_t guestGenerationProbability; /** * In a difficult guest generation scenario, no guests will be generated if over this value. */ - uint32_t SuggestedGuestMaximum; + uint32_t suggestedGuestMaximum; - CheatsState Cheats; + CheatsState cheats; }; - GameState_t& GetGameState(); - void SwapGameState(std::unique_ptr& otherState); + GameState_t& getGameState(); + void swapGameState(std::unique_ptr& otherState); void gameStateInitAll(GameState_t& gameState, const TileCoordsXY& mapSize); void gameStateTick(); diff --git a/src/openrct2/GameStateSnapshots.cpp b/src/openrct2/GameStateSnapshots.cpp index 3f5bfec345..25c28f3356 100644 --- a/src/openrct2/GameStateSnapshots.cpp +++ b/src/openrct2/GameStateSnapshots.cpp @@ -525,7 +525,7 @@ struct GameStateSnapshots final : public IGameStateSnapshots COMPARE_FIELD(JumpingFountain, frame); COMPARE_FIELD(JumpingFountain, FountainType); COMPARE_FIELD(JumpingFountain, NumTicksAlive); - COMPARE_FIELD(JumpingFountain, FountainFlags); + COMPARE_FIELD(JumpingFountain, fountainFlags); COMPARE_FIELD(JumpingFountain, TargetX); COMPARE_FIELD(JumpingFountain, TargetY); COMPARE_FIELD(JumpingFountain, Iteration); diff --git a/src/openrct2/Input.cpp b/src/openrct2/Input.cpp index 2f85b6a3a2..da023b9816 100644 --- a/src/openrct2/Input.cpp +++ b/src/openrct2/Input.cpp @@ -15,7 +15,7 @@ namespace OpenRCT2 { InputState _inputState; - uint8_t _inputFlags; + InputFlags gInputFlags; WidgetRef gHoverWidget; WidgetRef gPressedWidget; @@ -40,28 +40,6 @@ namespace OpenRCT2 ContextInputHandleKeyboard(false); } - void InputSetFlag(INPUT_FLAGS flag, bool on) - { - if (on) - { - _inputFlags |= flag; - } - else - { - _inputFlags &= ~flag; - } - } - - bool InputTestFlag(INPUT_FLAGS flag) - { - return _inputFlags & flag; - } - - void InputResetFlags() - { - _inputFlags = 0; - } - void InputSetState(InputState state) { _inputState = state; diff --git a/src/openrct2/Input.h b/src/openrct2/Input.h index 8189e18926..624aa36482 100644 --- a/src/openrct2/Input.h +++ b/src/openrct2/Input.h @@ -9,34 +9,36 @@ #pragma once +#include "core/FlagHolder.hpp" #include "interface/Window.h" namespace OpenRCT2 { - enum INPUT_FLAGS + enum InputFlag { - INPUT_FLAG_WIDGET_PRESSED = (1 << 0), + widgetPressed, - // The dropdown can stay open if the mouse is released, set on flag Dropdown::Flag::StayOpen - INPUT_FLAG_DROPDOWN_STAY_OPEN = (1 << 1), + // The dropdown can stay open if the mouse is released, set on flag Dropdown::Flag::StayOpen. + dropdownStayOpen, - // The mouse has been released and the dropdown is still open - // INPUT_FLAG_DROPDOWN_STAY_OPEN is already set if this happens - INPUT_FLAG_DROPDOWN_MOUSE_UP = (1 << 2), + // The mouse has been released and the dropdown is still open. + // InputFlag::dropdownStayOpen is already set if this happens. + dropdownMouseUp, - INPUT_FLAG_TOOL_ACTIVE = (1 << 3), + toolActive, // Left click on a viewport - INPUT_FLAG_4 = (1 << 4), + unk4, - INPUT_FLAG_5 = (1 << 5), + unk5, // Some of the map tools (clear, footpath, scenery) // never read as far as I know. - INPUT_FLAG_6 = (1 << 6), + unk6, - INPUT_FLAG_VIEWPORT_SCROLLING = (1 << 7) + viewportScrolling, }; + using InputFlags = FlagHolder; enum class InputState { @@ -61,16 +63,12 @@ namespace OpenRCT2 // TODO: Move to openrct2-ui and make static again extern InputState _inputState; - extern uint8_t _inputFlags; + extern InputFlags gInputFlags; extern uint32_t _tooltipNotShownTimeout; void TitleHandleKeyboardInput(); void GameHandleKeyboardInput(); - void InputSetFlag(INPUT_FLAGS flag, bool on); - bool InputTestFlag(INPUT_FLAGS flag); - void InputResetFlags(); - void InputSetState(InputState state); InputState InputGetState(); diff --git a/src/openrct2/OpenRCT2.cpp b/src/openrct2/OpenRCT2.cpp index bb624c7d1c..e4030b2471 100644 --- a/src/openrct2/OpenRCT2.cpp +++ b/src/openrct2/OpenRCT2.cpp @@ -9,6 +9,8 @@ #include "OpenRCT2.h" +#include "core/EnumUtils.hpp" + StartupAction gOpenRCT2StartupAction = StartupAction::Title; utf8 gOpenRCT2StartupActionPath[512] = { 0 }; u8string gCustomUserDataPath = {}; @@ -25,8 +27,18 @@ bool gOpenRCT2ShowChangelog; bool gOpenRCT2SilentBreakpad; uint32_t gCurrentDrawCount = 0; -uint8_t gScreenFlags; +LegacyScene gLegacyScene; uint32_t gScreenAge; PromptMode gSavePromptMode; bool gSilentReplays = false; + +bool isInEditorMode() +{ + return EnumValue(gLegacyScene) >= EnumValue(LegacyScene::scenarioEditor); +} + +bool isInTrackDesignerOrManager() +{ + return gLegacyScene == LegacyScene::trackDesigner || gLegacyScene == LegacyScene::trackDesignsManager; +} diff --git a/src/openrct2/OpenRCT2.h b/src/openrct2/OpenRCT2.h index e81b6c7032..37dbcbe4bc 100644 --- a/src/openrct2/OpenRCT2.h +++ b/src/openrct2/OpenRCT2.h @@ -22,18 +22,20 @@ enum class StartupAction Edit }; -enum +enum class LegacyScene : uint8_t { // Although this is labeled a flag it actually means when // zero the screen is in playing mode. - SCREEN_FLAGS_PLAYING = 0, - SCREEN_FLAGS_TITLE_DEMO = 1, - SCREEN_FLAGS_SCENARIO_EDITOR = 2, - SCREEN_FLAGS_TRACK_DESIGNER = 4, - SCREEN_FLAGS_TRACK_MANAGER = 8, - SCREEN_FLAGS_EDITOR = (SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER), + playing, + titleSequence, + scenarioEditor, + trackDesigner, + trackDesignsManager, }; +bool isInEditorMode(); +bool isInTrackDesignerOrManager(); + extern StartupAction gOpenRCT2StartupAction; extern utf8 gOpenRCT2StartupActionPath[512]; extern u8string gCustomUserDataPath; @@ -56,7 +58,7 @@ extern std::string gNetworkStartAddress; #endif extern uint32_t gCurrentDrawCount; -extern uint8_t gScreenFlags; +extern LegacyScene gLegacyScene; extern uint32_t gScreenAge; extern PromptMode gSavePromptMode; diff --git a/src/openrct2/ParkImporter.h b/src/openrct2/ParkImporter.h index 27597a6011..6f9163774c 100644 --- a/src/openrct2/ParkImporter.h +++ b/src/openrct2/ParkImporter.h @@ -23,6 +23,7 @@ namespace OpenRCT2 { struct IStream; struct GameState_t; + struct ParkPreview; } // namespace OpenRCT2 struct ScenarioIndexEntry; @@ -49,7 +50,7 @@ struct IParkImporter public: virtual ~IParkImporter() = default; - virtual ParkLoadResult Load(const u8string& path) = 0; + virtual ParkLoadResult Load(const u8string& path, bool skipObjectCheck) = 0; virtual ParkLoadResult LoadSavedGame(const u8string& path, bool skipObjectCheck = false) = 0; virtual ParkLoadResult LoadScenario(const u8string& path, bool skipObjectCheck = false) = 0; virtual ParkLoadResult LoadFromStream( @@ -57,7 +58,8 @@ public: = 0; virtual void Import(OpenRCT2::GameState_t& gameState) = 0; - virtual bool GetDetails(ScenarioIndexEntry* dst) = 0; + virtual bool PopulateIndexEntry(ScenarioIndexEntry* dst) = 0; + virtual OpenRCT2::ParkPreview GetParkPreview() = 0; }; namespace OpenRCT2::ParkImporter diff --git a/src/openrct2/PlatformEnvironment.cpp b/src/openrct2/PlatformEnvironment.cpp index 16ef59f68f..867ea5260f 100644 --- a/src/openrct2/PlatformEnvironment.cpp +++ b/src/openrct2/PlatformEnvironment.cpp @@ -87,7 +87,7 @@ private: bool _usingRCTClassic{}; public: - explicit PlatformEnvironment(DIRBASE_VALUES basePaths) + explicit PlatformEnvironment(DirBaseValues basePaths) { for (size_t i = 0; i < kDirBaseCount; i++) { @@ -95,27 +95,27 @@ public: } } - u8string GetDirectoryPath(DIRBASE base) const override + u8string GetDirectoryPath(DirBase base) const override { return _basePath[EnumValue(base)]; } - u8string GetDirectoryPath(DIRBASE base, DIRID did) const override + u8string GetDirectoryPath(DirBase base, DirId did) const override { auto basePath = GetDirectoryPath(base); u8string_view directoryName; switch (base) { default: - case DIRBASE::RCT1: + case DirBase::rct1: directoryName = kDirectoryNamesRCT2[EnumValue(did)]; break; - case DIRBASE::RCT2: + case DirBase::rct2: directoryName = _usingRCTClassic ? "Assets" : kDirectoryNamesRCT2[EnumValue(did)]; break; - case DIRBASE::OPENRCT2: - case DIRBASE::USER: - case DIRBASE::CONFIG: + case DirBase::openrct2: + case DirBase::user: + case DirBase::config: directoryName = kDirectoryNamesOpenRCT2[EnumValue(did)]; break; } @@ -123,7 +123,7 @@ public: return Path::Combine(basePath, directoryName); } - u8string GetFilePath(PATHID pathid) const override + u8string GetFilePath(PathId pathid) const override { auto dirbase = GetDefaultBaseDirectory(pathid); auto basePath = GetDirectoryPath(dirbase); @@ -131,12 +131,12 @@ public: return Path::Combine(basePath, fileName); } - u8string FindFile(DIRBASE base, DIRID did, u8string_view fileName) const override + u8string FindFile(DirBase base, DirId did, u8string_view fileName) const override { auto dataPath = GetDirectoryPath(base, did); std::string alternativeFilename; - if (_usingRCTClassic && base == DIRBASE::RCT2 && did == DIRID::DATA) + if (_usingRCTClassic && base == DirBase::rct2 && did == DirId::data) { // Special case, handle RCT Classic css ogg files if (String::startsWith(fileName, "css", true) && String::endsWith(fileName, ".dat", true)) @@ -148,7 +148,7 @@ public: } auto path = Path::ResolveCasing(Path::Combine(dataPath, fileName)); - if (base == DIRBASE::RCT1 && did == DIRID::DATA && !File::Exists(path)) + if (base == DirBase::rct1 && did == DirId::data && !File::Exists(path)) { // Special case, handle RCT1 steam layout where some data files are under a CD root auto basePath = GetDirectoryPath(base); @@ -162,11 +162,11 @@ public: return path; } - void SetBasePath(DIRBASE base, u8string_view path) override + void SetBasePath(DirBase base, u8string_view path) override { _basePath[EnumValue(base)] = path; - if (base == DIRBASE::RCT2) + if (base == DirBase::rct2) { _usingRCTClassic = Platform::IsRCTClassicPath(path); } @@ -178,35 +178,35 @@ public: } private: - static DIRBASE GetDefaultBaseDirectory(PATHID pathid) + static DirBase GetDefaultBaseDirectory(PathId pathid) { switch (pathid) { - case PATHID::CONFIG: - case PATHID::CONFIG_SHORTCUTS_LEGACY: - case PATHID::CONFIG_SHORTCUTS: - return DIRBASE::CONFIG; - case PATHID::CACHE_OBJECTS: - case PATHID::CACHE_TRACKS: - case PATHID::CACHE_SCENARIOS: - return DIRBASE::CACHE; - case PATHID::SCORES_RCT2: - return DIRBASE::RCT2; - case PATHID::CHANGELOG: - case PATHID::CONTRIBUTORS: - return DIRBASE::DOCUMENTATION; - case PATHID::NETWORK_GROUPS: - case PATHID::NETWORK_SERVERS: - case PATHID::NETWORK_USERS: - case PATHID::SCORES: - case PATHID::SCORES_LEGACY: + case PathId::config: + case PathId::configShortcutsLegacy: + case PathId::configShortcuts: + return DirBase::config; + case PathId::cacheObjects: + case PathId::cacheTracks: + case PathId::cacheScenarios: + return DirBase::cache; + case PathId::scoresRCT2: + return DirBase::rct2; + case PathId::changelog: + case PathId::contributors: + return DirBase::documentation; + case PathId::networkGroups: + case PathId::networkServers: + case PathId::networkUsers: + case PathId::scores: + case PathId::scoresLegacy: default: - return DIRBASE::USER; + return DirBase::user; } } }; -std::unique_ptr OpenRCT2::CreatePlatformEnvironment(DIRBASE_VALUES basePaths) +std::unique_ptr OpenRCT2::CreatePlatformEnvironment(DirBaseValues basePaths) { return std::make_unique(basePaths); } @@ -226,41 +226,41 @@ std::unique_ptr OpenRCT2::CreatePlatformEnvironment() // Set default paths std::string basePaths[kDirBaseCount]; - basePaths[EnumValue(DIRBASE::OPENRCT2)] = Platform::GetInstallPath(); - basePaths[EnumValue(DIRBASE::USER)] = Path::Combine(Platform::GetFolderPath(SPECIAL_FOLDER::USER_DATA), subDirectory); - basePaths[EnumValue(DIRBASE::CONFIG)] = Path::Combine(Platform::GetFolderPath(SPECIAL_FOLDER::USER_CONFIG), subDirectory); - basePaths[EnumValue(DIRBASE::CACHE)] = Path::Combine(Platform::GetFolderPath(SPECIAL_FOLDER::USER_CACHE), subDirectory); - basePaths[EnumValue(DIRBASE::DOCUMENTATION)] = Platform::GetDocsPath(); + basePaths[EnumValue(DirBase::openrct2)] = Platform::GetInstallPath(); + basePaths[EnumValue(DirBase::user)] = Path::Combine(Platform::GetFolderPath(SpecialFolder::userData), subDirectory); + basePaths[EnumValue(DirBase::config)] = Path::Combine(Platform::GetFolderPath(SpecialFolder::userConfig), subDirectory); + basePaths[EnumValue(DirBase::cache)] = Path::Combine(Platform::GetFolderPath(SpecialFolder::userCache), subDirectory); + basePaths[EnumValue(DirBase::documentation)] = Platform::GetDocsPath(); // Override paths that have been specified via the command line if (!gCustomRCT1DataPath.empty()) { - basePaths[EnumValue(DIRBASE::RCT1)] = gCustomRCT1DataPath; + basePaths[EnumValue(DirBase::rct1)] = gCustomRCT1DataPath; } if (!gCustomRCT2DataPath.empty()) { - basePaths[EnumValue(DIRBASE::RCT2)] = gCustomRCT2DataPath; + basePaths[EnumValue(DirBase::rct2)] = gCustomRCT2DataPath; } if (!gCustomOpenRCT2DataPath.empty()) { - basePaths[EnumValue(DIRBASE::OPENRCT2)] = gCustomOpenRCT2DataPath; + basePaths[EnumValue(DirBase::openrct2)] = gCustomOpenRCT2DataPath; } if (!gCustomUserDataPath.empty()) { - basePaths[EnumValue(DIRBASE::USER)] = gCustomUserDataPath; - basePaths[EnumValue(DIRBASE::CONFIG)] = gCustomUserDataPath; - basePaths[EnumValue(DIRBASE::CACHE)] = gCustomUserDataPath; + basePaths[EnumValue(DirBase::user)] = gCustomUserDataPath; + basePaths[EnumValue(DirBase::config)] = gCustomUserDataPath; + basePaths[EnumValue(DirBase::cache)] = gCustomUserDataPath; } - if (basePaths[EnumValue(DIRBASE::DOCUMENTATION)].empty()) + if (basePaths[EnumValue(DirBase::documentation)].empty()) { - basePaths[EnumValue(DIRBASE::DOCUMENTATION)] = basePaths[EnumValue(DIRBASE::OPENRCT2)]; + basePaths[EnumValue(DirBase::documentation)] = basePaths[EnumValue(DirBase::openrct2)]; } auto env = OpenRCT2::CreatePlatformEnvironment(basePaths); // Now load the config so we can get the RCT1 and RCT2 paths - auto configPath = env->GetFilePath(PATHID::CONFIG); + auto configPath = env->GetFilePath(PathId::config); Config::SetDefaults(); if (!Config::OpenFromPath(configPath)) { @@ -268,20 +268,20 @@ std::unique_ptr OpenRCT2::CreatePlatformEnvironment() } if (gCustomRCT1DataPath.empty()) { - env->SetBasePath(DIRBASE::RCT1, Config::Get().general.RCT1Path); + env->SetBasePath(DirBase::rct1, Config::Get().general.RCT1Path); } if (gCustomRCT2DataPath.empty()) { - env->SetBasePath(DIRBASE::RCT2, Config::Get().general.RCT2Path); + env->SetBasePath(DirBase::rct2, Config::Get().general.RCT2Path); } // Log base paths - LOG_VERBOSE("DIRBASE::RCT1 : %s", env->GetDirectoryPath(DIRBASE::RCT1).c_str()); - LOG_VERBOSE("DIRBASE::RCT2 : %s", env->GetDirectoryPath(DIRBASE::RCT2).c_str()); - LOG_VERBOSE("DIRBASE::OPENRCT2: %s", env->GetDirectoryPath(DIRBASE::OPENRCT2).c_str()); - LOG_VERBOSE("DIRBASE::USER : %s", env->GetDirectoryPath(DIRBASE::USER).c_str()); - LOG_VERBOSE("DIRBASE::CONFIG : %s", env->GetDirectoryPath(DIRBASE::CONFIG).c_str()); - LOG_VERBOSE("DIRBASE::CACHE : %s", env->GetDirectoryPath(DIRBASE::CACHE).c_str()); + LOG_VERBOSE("DirBase::rct1 : %s", env->GetDirectoryPath(DirBase::rct1).c_str()); + LOG_VERBOSE("DirBase::rct2 : %s", env->GetDirectoryPath(DirBase::rct2).c_str()); + LOG_VERBOSE("DirBase::openrct2: %s", env->GetDirectoryPath(DirBase::openrct2).c_str()); + LOG_VERBOSE("DirBase::user : %s", env->GetDirectoryPath(DirBase::user).c_str()); + LOG_VERBOSE("DirBase::config : %s", env->GetDirectoryPath(DirBase::config).c_str()); + LOG_VERBOSE("DirBase::cache : %s", env->GetDirectoryPath(DirBase::cache).c_str()); return env; } diff --git a/src/openrct2/PlatformEnvironment.h b/src/openrct2/PlatformEnvironment.h index cffd7c33df..99f1abb24c 100644 --- a/src/openrct2/PlatformEnvironment.h +++ b/src/openrct2/PlatformEnvironment.h @@ -16,61 +16,61 @@ namespace OpenRCT2 { - enum class DIRBASE : size_t + enum class DirBase : size_t { - RCT1, // Base directory for original RollerCoaster Tycoon 1 content. - RCT2, // Base directory for original RollerCoaster Tycoon 2 content. - OPENRCT2, // Base directory for OpenRCT2 installation. - USER, // Base directory for OpenRCT2 user content. - CONFIG, // Base directory for OpenRCT2 configuration. - CACHE, // Base directory for OpenRCT2 cache files. - DOCUMENTATION, // Base directory for OpenRCT2 doc files. + rct1, // Base directory for original RollerCoaster Tycoon 1 content. + rct2, // Base directory for original RollerCoaster Tycoon 2 content. + openrct2, // Base directory for OpenRCT2 installation. + user, // Base directory for OpenRCT2 user content. + config, // Base directory for OpenRCT2 configuration. + cache, // Base directory for OpenRCT2 cache files. + documentation, // Base directory for OpenRCT2 doc files. }; constexpr size_t kDirBaseCount = 7; - using DIRBASE_VALUES = u8string[kDirBaseCount]; + using DirBaseValues = u8string[kDirBaseCount]; - enum class DIRID + enum class DirId { - DATA, // Contains g1.dat, music etc. - LANDSCAPE, // Contains scenario editor landscapes (SC6). - LANGUAGE, // Contains language packs. - LOG_CHAT, // Contains chat logs. - LOG_SERVER, // Contains server logs. - NETWORK_KEY, // Contains the user's public and private keys. - OBJECT, // Contains objects. - PLUGIN, // Contains plugins (.js). - SAVE, // Contains saved games (SV6). - SCENARIO, // Contains scenarios (SC6). - SCREENSHOT, // Contains screenshots. - SEQUENCE, // Contains title sequences. - SHADER, // Contains OpenGL shaders. - THEME, // Contains interface themes. - TRACK, // Contains track designs. - HEIGHTMAP, // Contains heightmap data. - REPLAY, // Contains recorded replays. - LOG_DESYNCS, // Contains desync reports. - CRASH, // Contains crash dumps. - ASSET_PACK, // Contains asset packs. - SCENARIO_PATCHES, // Contains scenario patches. + data, // Contains g1.dat, music etc. + landscapes, // Contains scenario editor landscapes (SC6). + languages, // Contains language packs. + chatLogs, // Contains chat logs. + serverLogs, // Contains server logs. + networkKeys, // Contains the user's public and private keys. + objects, // Contains objects. + plugins, // Contains plugins (.js). + saves, // Contains saved games (SV6). + scenarios, // Contains scenarios (SC6). + screenshots, // Contains screenshots. + sequences, // Contains title sequences. + shaders, // Contains OpenGL shaders. + themes, // Contains interface themes. + trackDesigns, // Contains track designs. + heightmaps, // Contains heightmap data. + replayRecordings, // Contains recorded replays. + desyncLogs, // Contains desync reports. + crashDumps, // Contains crash dumps. + assetPacks, // Contains asset packs. + scenarioPatches, // Contains scenario patches. }; - enum class PATHID + enum class PathId { - CONFIG, // Main configuration (config.ini). - CONFIG_SHORTCUTS_LEGACY, // Old keyboard shortcuts (hotkeys.cfg) - CONFIG_SHORTCUTS, // Shortcut bindings (shortcuts.json) - CACHE_OBJECTS, // Object repository cache (objects.idx). - CACHE_TRACKS, // Track repository cache (tracks.idx). - CACHE_SCENARIOS, // Scenario repository cache (scenarios.idx). - NETWORK_GROUPS, // Server groups with permissions (groups.json). - NETWORK_SERVERS, // Saved servers (servers.cfg). - NETWORK_USERS, // Users and their groups (users.json). - SCORES, // Scenario scores (highscores.dat). - SCORES_LEGACY, // Scenario scores, legacy (scores.dat). - SCORES_RCT2, // Scenario scores, rct2 (\Saved Games\scores.dat). - CHANGELOG, // Notable changes to the game between versions, distributed with the game. - PLUGIN_STORE, // Shared storage for plugins. - CONTRIBUTORS, // Who has provided work to the game (Contributors.md). + config, // Main configuration (config.ini). + configShortcutsLegacy, // Old keyboard shortcuts (hotkeys.cfg) + configShortcuts, // Shortcut bindings (shortcuts.json) + cacheObjects, // Object repository cache (objects.idx). + cacheTracks, // Track repository cache (tracks.idx). + cacheScenarios, // Scenario repository cache (scenarios.idx). + networkGroups, // Server groups with permissions (groups.json). + networkServers, // Saved servers (servers.cfg). + networkUsers, // Users and their groups (users.json). + scores, // Scenario scores (highscores.dat). + scoresLegacy, // Scenario scores, legacy (scores.dat). + scoresRCT2, // Scenario scores, rct2 (\Saved Games\scores.dat). + changelog, // Notable changes to the game between versions, distributed with the game. + pluginStore, // Shared storage for plugins. + contributors, // Who has provided work to the game (Contributors.md). }; /** @@ -80,15 +80,15 @@ namespace OpenRCT2 { virtual ~IPlatformEnvironment() = default; - virtual u8string GetDirectoryPath(DIRBASE base) const = 0; - virtual u8string GetDirectoryPath(DIRBASE base, DIRID did) const = 0; - virtual u8string GetFilePath(PATHID pathid) const = 0; - virtual u8string FindFile(DIRBASE base, DIRID did, u8string_view fileName) const = 0; - virtual void SetBasePath(DIRBASE base, u8string_view path) = 0; + virtual u8string GetDirectoryPath(DirBase base) const = 0; + virtual u8string GetDirectoryPath(DirBase base, DirId did) const = 0; + virtual u8string GetFilePath(PathId pathid) const = 0; + virtual u8string FindFile(DirBase base, DirId did, u8string_view fileName) const = 0; + virtual void SetBasePath(DirBase base, u8string_view path) = 0; virtual bool IsUsingClassic() const = 0; }; - [[nodiscard]] std::unique_ptr CreatePlatformEnvironment(DIRBASE_VALUES basePaths); + [[nodiscard]] std::unique_ptr CreatePlatformEnvironment(DirBaseValues basePaths); [[nodiscard]] std::unique_ptr CreatePlatformEnvironment(); } // namespace OpenRCT2 diff --git a/src/openrct2/ReplayManager.cpp b/src/openrct2/ReplayManager.cpp index f400172e43..dae22be659 100644 --- a/src/openrct2/ReplayManager.cpp +++ b/src/openrct2/ReplayManager.cpp @@ -34,7 +34,6 @@ #include "object/ObjectManager.h" #include "object/ObjectRepository.h" #include "park/ParkFile.h" -#include "scenario/Scenario.h" #include "world/Park.h" #include "zlib.h" @@ -162,7 +161,7 @@ namespace OpenRCT2 if (_mode == ReplayMode::NONE) return; - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; if ((_mode == ReplayMode::RECORDING || _mode == ReplayMode::NORMALISATION) && currentTicks == _nextChecksumTick) { @@ -222,7 +221,7 @@ namespace OpenRCT2 auto& snapshot = snapshots->CreateSnapshot(); snapshots->Capture(snapshot); - snapshots->LinkSnapshot(snapshot, GetGameState().CurrentTicks, ScenarioRandState().s0); + snapshots->LinkSnapshot(snapshot, getGameState().currentTicks, ScenarioRandState().s0); DataSerialiser snapShotDs(true, snapshotStream); snapshots->SerialiseSnapshot(snapshot, snapShotDs); } @@ -238,8 +237,8 @@ namespace OpenRCT2 if (_mode != ReplayMode::NONE && _mode != ReplayMode::NORMALISATION) return false; - auto& gameState = GetGameState(); - const auto currentTicks = gameState.CurrentTicks; + auto& gameState = getGameState(); + const auto currentTicks = gameState.currentTicks; auto replayData = std::make_unique(); replayData->magic = kReplayMagic; @@ -294,7 +293,7 @@ namespace OpenRCT2 return true; } - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; _currentRecording->tickEnd = currentTicks; @@ -379,7 +378,7 @@ namespace OpenRCT2 info.Version = data->version; info.TimeRecorded = data->timeRecorded; if (_mode == ReplayMode::RECORDING) - info.Ticks = GetGameState().CurrentTicks - data->tickStart; + info.Ticks = getGameState().currentTicks - data->tickStart; else if (_mode == ReplayMode::PLAYING) info.Ticks = data->tickEnd - data->tickStart; info.NumCommands = static_cast(data->commands.size()); @@ -397,7 +396,7 @@ namespace OpenRCT2 GameStateSnapshot_t& replaySnapshot = snapshots->CreateSnapshot(); snapshots->SerialiseSnapshot(replaySnapshot, ds); - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; auto& localSnapshot = snapshots->CreateSnapshot(); snapshots->Capture(localSnapshot); @@ -415,7 +414,7 @@ namespace OpenRCT2 if (res != cmpData.spriteChanges.end()) { std::string outputPath = GetContext()->GetPlatformEnvironment()->GetDirectoryPath( - DIRBASE::USER, DIRID::LOG_DESYNCS); + DirBase::user, DirId::desyncLogs); char uniqueFileName[128] = {}; snprintf(uniqueFileName, sizeof(uniqueFileName), "replay_desync_%u.txt", currentTicks); @@ -448,7 +447,7 @@ namespace OpenRCT2 return false; } - GetGameState().CurrentTicks = replayData->tickStart; + getGameState().currentTicks = replayData->tickStart; LoadAndCompareSnapshot(replayData->gameStateSnapshots); @@ -510,7 +509,7 @@ namespace OpenRCT2 return false; } - _nextReplayTick = GetGameState().CurrentTicks + 1; + _nextReplayTick = getGameState().currentTicks + 1; return true; } @@ -542,7 +541,7 @@ namespace OpenRCT2 objManager.LoadObjects(loadResult.RequiredObjects); // TODO: Have a separate GameState and exchange once loaded. - auto& gameState = GetGameState(); + auto& gameState = getGameState(); importer->Import(gameState); EntityTweener::Get().Reset(); @@ -625,7 +624,8 @@ namespace OpenRCT2 fileName += ".parkrep"; } - std::string outPath = GetContext()->GetPlatformEnvironment()->GetDirectoryPath(DIRBASE::USER, DIRID::REPLAY); + std::string outPath = GetContext()->GetPlatformEnvironment()->GetDirectoryPath( + DirBase::user, DirId::replayRecordings); std::string outFile = Path::Combine(outPath, fileName); bool loaded = false; @@ -670,10 +670,10 @@ namespace OpenRCT2 bool SerialiseParkParameters(DataSerialiser& serialiser) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - serialiser << gameState.GuestGenerationProbability; - serialiser << gameState.SuggestedGuestMaximum; + serialiser << gameState.guestGenerationProbability; + serialiser << gameState.suggestedGuestMaximum; serialiser << Config::Get().general.ShowRealNamesOfGuests; // To make this a little bit less volatile against updates @@ -807,7 +807,7 @@ namespace OpenRCT2 if (checksumIndex >= _currentReplay->checksums.size()) return; - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; const auto& savedChecksum = _currentReplay->checksums[checksumIndex]; if (_currentReplay->checksums[checksumIndex].first == currentTicks) @@ -841,7 +841,7 @@ namespace OpenRCT2 { auto& replayQueue = _currentReplay->commands; - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; while (replayQueue.begin() != replayQueue.end()) { diff --git a/src/openrct2/SpriteIds.h b/src/openrct2/SpriteIds.h index 1428221f34..c5a860d5db 100644 --- a/src/openrct2/SpriteIds.h +++ b/src/openrct2/SpriteIds.h @@ -983,6 +983,7 @@ enum : ImageIndex SPR_G2_WEATHER_SNOW, SPR_G2_WEATHER_HEAVY_SNOW, SPR_G2_WEATHER_BLIZZARD, + SPR_G2_LOGO_MONO_DITHERED, // G2 Loading progress @@ -1345,7 +1346,38 @@ enum : ImageIndex SPR_G2_MINIATURE_RAILWAY_END, SPR_G2_WOODEN_RC_BEGIN = SPR_G2_MINIATURE_RAILWAY_END, - SPR_G2_WOODEN_RC_BOOSTER_SW_NE = SPR_G2_WOODEN_RC_BEGIN, + + SPR_G2_WOODEN_RC_LEFT_BANK_FRONT_SW_NE = SPR_G2_WOODEN_RC_BEGIN, + SPR_G2_WOODEN_RC_LEFT_BANK_FRONT_NW_SE, + SPR_G2_WOODEN_RC_LEFT_BANK_RAILS_FRONT_SW_NE, + SPR_G2_WOODEN_RC_LEFT_BANK_RAILS_FRONT_NW_SE, + + SPR_G2_WOODEN_RC_24225_FRONT, + SPR_G2_WOODEN_RC_24232_FRONT, + SPR_G2_WOODEN_RC_24249_FRONT, + SPR_G2_WOODEN_RC_24256_FRONT, + SPR_G2_WOODEN_RC_24261_FRONT, + SPR_G2_WOODEN_RC_24262_FRONT, + SPR_G2_WOODEN_RC_24267_FRONT, + SPR_G2_WOODEN_RC_24268_FRONT, + SPR_G2_WOODEN_RC_24277_FRONT, + SPR_G2_WOODEN_RC_24284_FRONT, + SPR_G2_WOODEN_RC_24285_FRONT, + SPR_G2_WOODEN_RC_24292_FRONT, + SPR_G2_WOODEN_RC_25091_FRONT, + SPR_G2_WOODEN_RC_25098_FRONT, + SPR_G2_WOODEN_RC_25115_FRONT, + SPR_G2_WOODEN_RC_25122_FRONT, + SPR_G2_WOODEN_RC_25127_FRONT, + SPR_G2_WOODEN_RC_25128_FRONT, + SPR_G2_WOODEN_RC_25133_FRONT, + SPR_G2_WOODEN_RC_25134_FRONT, + SPR_G2_WOODEN_RC_25143_FRONT, + SPR_G2_WOODEN_RC_25150_FRONT, + SPR_G2_WOODEN_RC_25151_FRONT, + SPR_G2_WOODEN_RC_25158_FRONT, + + SPR_G2_WOODEN_RC_BOOSTER_SW_NE, SPR_G2_WOODEN_RC_BOOSTER_NW_SE, SPR_G2_WOODEN_RC_DIAG_BRAKES, @@ -1354,6 +1386,12 @@ enum : ImageIndex SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_NW_SE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_SW_NE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_NW_SE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_SW_NE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_NW_SE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_OPEN_SW_NE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_OPEN_NW_SE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_CLOSED_SW_NE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_CLOSED_NW_SE, SPR_RIDE_DESIGN_PREVIEW_CLASSIC_WOODEN_ROLLER_COASTER_TRACK, SPR_RIDE_DESIGN_PREVIEW_CLASSIC_WOODEN_ROLLER_COASTER_SUPPORTS, diff --git a/src/openrct2/actions/BannerSetNameAction.cpp b/src/openrct2/actions/BannerSetNameAction.cpp index 1ab6bb6889..1b069ee941 100644 --- a/src/openrct2/actions/BannerSetNameAction.cpp +++ b/src/openrct2/actions/BannerSetNameAction.cpp @@ -53,6 +53,28 @@ GameActions::Result BannerSetNameAction::Query() const return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_ERR_BANNER_ELEMENT_NOT_FOUND); } + + TileElement* tileElement = BannerGetTileElement(_bannerIndex); + + if (tileElement == nullptr) + { + LOG_ERROR("Banner tile element not found for bannerIndex %d", _bannerIndex); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_ERR_BANNER_ELEMENT_NOT_FOUND); + } + + BannerElement* bannerElement = tileElement->AsBanner(); + CoordsXYZD loc = { banner->position.ToCoordsXY(), bannerElement->GetBaseZ(), bannerElement->GetPosition() }; + + if (!LocationValid(loc)) + { + return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_OFF_EDGE_OF_MAP); + } + if (!MapCanBuildAt({ loc.x, loc.y, loc.z - 16 })) + { + return GameActions::Result(GameActions::Status::NotOwned, STR_CANT_RENAME_BANNER, STR_LAND_NOT_OWNED_BY_PARK); + } + return GameActions::Result(); } diff --git a/src/openrct2/actions/BannerSetStyleAction.cpp b/src/openrct2/actions/BannerSetStyleAction.cpp index 7a8c96fa0a..7dd041fda1 100644 --- a/src/openrct2/actions/BannerSetStyleAction.cpp +++ b/src/openrct2/actions/BannerSetStyleAction.cpp @@ -11,6 +11,7 @@ #include "../Context.h" #include "../Diagnostic.h" +#include "../localisation/StringIdType.h" #include "../management/Finance.h" #include "../windows/Intent.h" #include "../world/Banner.h" @@ -47,14 +48,19 @@ void BannerSetStyleAction::Serialise(DataSerialiser& stream) GameActions::Result BannerSetStyleAction::Query() const { + StringId errorTitle = STR_CANT_REPAINT_THIS; + if (_type == BannerSetStyleType::NoEntry) + { + errorTitle = STR_CANT_RENAME_BANNER; + } + auto res = GameActions::Result(); auto banner = GetBanner(_bannerIndex); if (banner == nullptr) { LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex); - return GameActions::Result( - GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_BANNER_ELEMENT_NOT_FOUND); + return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_ERR_BANNER_ELEMENT_NOT_FOUND); } res.Expenditure = ExpenditureType::Landscaping; @@ -66,8 +72,19 @@ GameActions::Result BannerSetStyleAction::Query() const if (tileElement == nullptr) { LOG_ERROR("Banner tile element not found for bannerIndex %d", _bannerIndex); - return GameActions::Result( - GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_ERR_BANNER_ELEMENT_NOT_FOUND); + return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_ERR_BANNER_ELEMENT_NOT_FOUND); + } + + BannerElement* bannerElement = tileElement->AsBanner(); + CoordsXYZ loc = { banner->position.ToCoordsXY(), bannerElement->GetBaseZ() }; + + if (!LocationValid(loc)) + { + return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_OFF_EDGE_OF_MAP); + } + if (!MapCanBuildAt({ loc.x, loc.y, loc.z - 16 })) + { + return GameActions::Result(GameActions::Status::NotOwned, errorTitle, STR_LAND_NOT_OWNED_BY_PARK); } switch (_type) @@ -93,7 +110,7 @@ GameActions::Result BannerSetStyleAction::Query() const if (tileElement->AsBanner() == nullptr) { LOG_ERROR("Tile element was not a banner."); - return GameActions::Result(GameActions::Status::Unknown, STR_CANT_REPAINT_THIS, kStringIdNone); + return GameActions::Result(GameActions::Status::Unknown, STR_CANT_RENAME_BANNER, kStringIdNone); } break; default: diff --git a/src/openrct2/actions/CheatSetAction.cpp b/src/openrct2/actions/CheatSetAction.cpp index a0681fb3d5..fef2f047f3 100644 --- a/src/openrct2/actions/CheatSetAction.cpp +++ b/src/openrct2/actions/CheatSetAction.cpp @@ -18,6 +18,7 @@ #include "../core/String.hpp" #include "../drawing/Drawing.h" #include "../entity/Duck.h" +#include "../entity/EntityList.h" #include "../entity/EntityRegistry.h" #include "../entity/Staff.h" #include "../localisation/StringIds.h" @@ -26,7 +27,6 @@ #include "../ride/Ride.h" #include "../ride/RideManager.hpp" #include "../ride/Vehicle.h" -#include "../scenario/Scenario.h" #include "../ui/WindowManager.h" #include "../util/Util.h" #include "../windows/Intent.h" @@ -105,59 +105,59 @@ GameActions::Result CheatSetAction::Query() const GameActions::Result CheatSetAction::Execute() const { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto* windowMgr = Ui::GetWindowManager(); switch (static_cast(_cheatType.id)) { case CheatType::SandboxMode: - gameState.Cheats.sandboxMode = _param1 != 0; + gameState.cheats.sandboxMode = _param1 != 0; windowMgr->InvalidateByClass(WindowClass::Map); windowMgr->InvalidateByClass(WindowClass::Footpath); break; case CheatType::DisableClearanceChecks: - gameState.Cheats.disableClearanceChecks = _param1 != 0; + gameState.cheats.disableClearanceChecks = _param1 != 0; // Required to update the clearance checks overlay on the Cheats button. windowMgr->InvalidateByClass(WindowClass::TopToolbar); break; case CheatType::DisableSupportLimits: - gameState.Cheats.disableSupportLimits = _param1 != 0; + gameState.cheats.disableSupportLimits = _param1 != 0; break; case CheatType::ShowAllOperatingModes: - gameState.Cheats.showAllOperatingModes = _param1 != 0; + gameState.cheats.showAllOperatingModes = _param1 != 0; break; case CheatType::ShowVehiclesFromOtherTrackTypes: - gameState.Cheats.showVehiclesFromOtherTrackTypes = _param1 != 0; + gameState.cheats.showVehiclesFromOtherTrackTypes = _param1 != 0; break; case CheatType::FastLiftHill: - gameState.Cheats.unlockOperatingLimits = _param1 != 0; + gameState.cheats.unlockOperatingLimits = _param1 != 0; break; case CheatType::DisableBrakesFailure: - gameState.Cheats.disableBrakesFailure = _param1 != 0; + gameState.cheats.disableBrakesFailure = _param1 != 0; break; case CheatType::DisableAllBreakdowns: - gameState.Cheats.disableAllBreakdowns = _param1 != 0; + gameState.cheats.disableAllBreakdowns = _param1 != 0; break; case CheatType::DisableTrainLengthLimit: - gameState.Cheats.disableTrainLengthLimit = _param1 != 0; + gameState.cheats.disableTrainLengthLimit = _param1 != 0; break; case CheatType::EnableChainLiftOnAllTrack: - gameState.Cheats.enableChainLiftOnAllTrack = _param1 != 0; + gameState.cheats.enableChainLiftOnAllTrack = _param1 != 0; break; case CheatType::BuildInPauseMode: - gameState.Cheats.buildInPauseMode = _param1 != 0; + gameState.cheats.buildInPauseMode = _param1 != 0; break; case CheatType::IgnoreRideIntensity: - gameState.Cheats.ignoreRideIntensity = _param1 != 0; + gameState.cheats.ignoreRideIntensity = _param1 != 0; break; case CheatType::IgnorePrice: - gameState.Cheats.ignorePrice = _param1 != 0; + gameState.cheats.ignorePrice = _param1 != 0; break; case CheatType::DisableVandalism: - gameState.Cheats.disableVandalism = _param1 != 0; + gameState.cheats.disableVandalism = _param1 != 0; break; case CheatType::DisableLittering: - gameState.Cheats.disableLittering = _param1 != 0; + gameState.cheats.disableLittering = _param1 != 0; break; case CheatType::NoMoney: SetScenarioNoMoney(_param1 != 0); @@ -196,7 +196,7 @@ GameActions::Result CheatSetAction::Execute() const RemoveLitter(); break; case CheatType::DisablePlantAging: - gameState.Cheats.disablePlantAging = _param1 != 0; + gameState.cheats.disablePlantAging = _param1 != 0; break; case CheatType::SetStaffSpeed: SetStaffSpeed(_param1); @@ -205,7 +205,7 @@ GameActions::Result CheatSetAction::Execute() const RenewRides(); break; case CheatType::MakeDestructible: - gameState.Cheats.makeAllDestructible = _param1 != 0; + gameState.cheats.makeAllDestructible = _param1 != 0; windowMgr->InvalidateByClass(WindowClass::Ride); break; case CheatType::FixRides: @@ -225,35 +225,35 @@ GameActions::Result CheatSetAction::Execute() const ClimateForceWeather(WeatherType{ static_cast(_param1) }); break; case CheatType::FreezeWeather: - gameState.Cheats.freezeWeather = _param1 != 0; + gameState.cheats.freezeWeather = _param1 != 0; break; case CheatType::NeverendingMarketing: - gameState.Cheats.neverendingMarketing = _param1 != 0; + gameState.cheats.neverendingMarketing = _param1 != 0; break; case CheatType::OpenClosePark: - ParkSetOpen(!gameState.Park.IsOpen()); + ParkSetOpen(!gameState.park.IsOpen()); break; case CheatType::HaveFun: - gameState.ScenarioObjective.Type = OBJECTIVE_HAVE_FUN; + gameState.scenarioObjective.Type = OBJECTIVE_HAVE_FUN; break; case CheatType::SetForcedParkRating: Park::SetForcedRating(_param1); break; case CheatType::AllowArbitraryRideTypeChanges: - gameState.Cheats.allowArbitraryRideTypeChanges = _param1 != 0; + gameState.cheats.allowArbitraryRideTypeChanges = _param1 != 0; windowMgr->InvalidateByClass(WindowClass::Ride); break; case CheatType::OwnAllLand: OwnAllLand(); break; case CheatType::DisableRideValueAging: - gameState.Cheats.disableRideValueAging = _param1 != 0; + gameState.cheats.disableRideValueAging = _param1 != 0; break; case CheatType::IgnoreResearchStatus: - gameState.Cheats.ignoreResearchStatus = _param1 != 0; + gameState.cheats.ignoreResearchStatus = _param1 != 0; break; case CheatType::EnableAllDrawableTrackPieces: - gameState.Cheats.enableAllDrawableTrackPieces = _param1 != 0; + gameState.cheats.enableAllDrawableTrackPieces = _param1 != 0; break; case CheatType::CreateDucks: CreateDucks(_param1); @@ -262,13 +262,13 @@ GameActions::Result CheatSetAction::Execute() const Duck::RemoveAll(); break; case CheatType::AllowTrackPlaceInvalidHeights: - gameState.Cheats.allowTrackPlaceInvalidHeights = _param1 != 0; + gameState.cheats.allowTrackPlaceInvalidHeights = _param1 != 0; break; case CheatType::AllowRegularPathAsQueue: - gameState.Cheats.allowRegularPathAsQueue = _param1 != 0; + gameState.cheats.allowRegularPathAsQueue = _param1 != 0; break; case CheatType::AllowSpecialColourSchemes: - gameState.Cheats.allowSpecialColourSchemes = static_cast(_param1); + gameState.cheats.allowSpecialColourSchemes = static_cast(_param1); break; case CheatType::RemoveParkFences: RemoveParkFences(); @@ -437,10 +437,10 @@ ParametersRange CheatSetAction::GetParameterRange(CheatType cheatType) const void CheatSetAction::SetGrassLength(int32_t length) const { - auto& gameState = GetGameState(); - for (int32_t y = 0; y < gameState.MapSize.y; y++) + auto& gameState = getGameState(); + for (int32_t y = 0; y < gameState.mapSize.y; y++) { - for (int32_t x = 0; x < gameState.MapSize.x; x++) + for (int32_t x = 0; x < gameState.mapSize.x; x++) { auto surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y }); if (surfaceElement == nullptr) @@ -523,26 +523,25 @@ void CheatSetAction::FixBrokenRides() const { for (auto& ride : GetRideManager()) { - if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) + if (ride.lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) { auto mechanic = RideGetAssignedMechanic(ride); if (mechanic != nullptr) { - if (ride.mechanic_status == RIDE_MECHANIC_STATUS_FIXING) + if (ride.mechanicStatus == RIDE_MECHANIC_STATUS_FIXING) { mechanic->RideSubState = PeepRideSubState::ApproachExit; } else if ( - ride.mechanic_status == RIDE_MECHANIC_STATUS_CALLING - || ride.mechanic_status == RIDE_MECHANIC_STATUS_HEADING) + ride.mechanicStatus == RIDE_MECHANIC_STATUS_CALLING || ride.mechanicStatus == RIDE_MECHANIC_STATUS_HEADING) { mechanic->RemoveFromRide(); } } RideFixBreakdown(ride, 0); - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } } @@ -551,7 +550,7 @@ void CheatSetAction::RenewRides() const { for (auto& ride : GetRideManager()) { - ride.Renew(); + ride.renew(); } auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::Ride); @@ -562,8 +561,8 @@ void CheatSetAction::ResetRideCrashStatus() const for (auto& ride : GetRideManager()) { // Reset crash status and history - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_CRASHED; - ride.last_crash_type = RIDE_CRASH_TYPE_NONE; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_CRASHED; + ride.lastCrashType = RIDE_CRASH_TYPE_NONE; } auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::Ride); @@ -574,7 +573,7 @@ void CheatSetAction::Set10MinuteInspection() const for (auto& ride : GetRideManager()) { // Set inspection interval to 10 minutes - ride.inspection_interval = RIDE_INSPECTION_EVERY_10_MINUTES; + ride.inspectionInterval = RIDE_INSPECTION_EVERY_10_MINUTES; } auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::Ride); @@ -582,14 +581,14 @@ void CheatSetAction::Set10MinuteInspection() const void CheatSetAction::SetScenarioNoMoney(bool enabled) const { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (enabled) { - gameState.Park.Flags |= PARK_FLAGS_NO_MONEY; + gameState.park.Flags |= PARK_FLAGS_NO_MONEY; } else { - gameState.Park.Flags &= ~PARK_FLAGS_NO_MONEY; + gameState.park.Flags &= ~PARK_FLAGS_NO_MONEY; } // Invalidate all windows that have anything to do with finance @@ -605,7 +604,7 @@ void CheatSetAction::SetScenarioNoMoney(bool enabled) const void CheatSetAction::SetMoney(money64 amount) const { - GetGameState().Cash = amount; + getGameState().cash = amount; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::Finances); @@ -614,8 +613,8 @@ void CheatSetAction::SetMoney(money64 amount) const void CheatSetAction::AddMoney(money64 amount) const { - auto& gameState = GetGameState(); - gameState.Cash = AddClamp(gameState.Cash, amount); + auto& gameState = getGameState(); + gameState.cash = AddClamp(gameState.cash, amount); auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::Finances); @@ -625,7 +624,7 @@ void CheatSetAction::AddMoney(money64 amount) const void CheatSetAction::ClearLoan() const { // First give money - AddMoney(GetGameState().BankLoan); + AddMoney(getGameState().bankLoan); // Then pay the loan auto gameAction = ParkSetLoanAction(0.00_GBP); @@ -720,9 +719,9 @@ void CheatSetAction::RemoveAllGuests() const { for (auto& ride : GetRideManager()) { - ride.num_riders = 0; + ride.numRiders = 0; - for (auto& station : ride.GetStations()) + for (auto& station : ride.getStations()) { station.QueueLength = 0; station.LastPeepInQueue = EntityId::GetNull(); @@ -762,6 +761,11 @@ void CheatSetAction::RemoveAllGuests() const // will be fetched on a deleted guest. for (auto guest : EntityList()) { + // Frozen peeps are usually placed and tweaked for artistic purposes, + // so exempt them from being removed. + if (guest->PeepFlags & PEEP_FLAGS_POSITION_FROZEN) + continue; + guest->Remove(); } @@ -810,7 +814,7 @@ void CheatSetAction::OwnAllLand() const } // Completely unown peep spawn points - for (const auto& spawn : GetGameState().PeepSpawns) + for (const auto& spawn : getGameState().peepSpawns) { auto* surfaceElement = MapGetSurfaceElementAt(spawn); if (surfaceElement != nullptr) diff --git a/src/openrct2/actions/ClearAction.cpp b/src/openrct2/actions/ClearAction.cpp index 4b79c27d5a..8aaaf06acb 100644 --- a/src/openrct2/actions/ClearAction.cpp +++ b/src/openrct2/actions/ClearAction.cpp @@ -220,11 +220,11 @@ money64 ClearAction::ClearSceneryFromTile(const CoordsXY& tilePos, bool executin void ClearAction::ResetClearLargeSceneryFlag() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // TODO: Improve efficiency of this - for (int32_t y = 0; y < gameState.MapSize.y; y++) + for (int32_t y = 0; y < gameState.mapSize.y; y++) { - for (int32_t x = 0; x < gameState.MapSize.x; x++) + for (int32_t x = 0; x < gameState.mapSize.x; x++) { auto tileElement = MapGetFirstElementAt(TileCoordsXY{ x, y }); do @@ -242,6 +242,6 @@ void ClearAction::ResetClearLargeSceneryFlag() bool ClearAction::MapCanClearAt(const CoordsXY& location) { - return (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode + return gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode || MapIsLocationOwnedOrHasRights(location); } diff --git a/src/openrct2/actions/ClimateSetAction.cpp b/src/openrct2/actions/ClimateSetAction.cpp deleted file mode 100644 index 926b7a6448..0000000000 --- a/src/openrct2/actions/ClimateSetAction.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014-2025 OpenRCT2 developers - * - * For a complete list of all authors, please refer to contributors.md - * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is licensed under the GNU General Public License version 3. - *****************************************************************************/ - -#include "ClimateSetAction.h" - -#include "../Diagnostic.h" -#include "../GameState.h" - -using namespace OpenRCT2; - -ClimateSetAction::ClimateSetAction(ClimateType climate) - : _climate(climate) -{ -} - -void ClimateSetAction::AcceptParameters(GameActionParameterVisitor& visitor) -{ - visitor.Visit("climate", _climate); -} - -uint16_t ClimateSetAction::GetActionFlags() const -{ - return GameAction::GetActionFlags(); -} - -void ClimateSetAction::Serialise(DataSerialiser& stream) -{ - GameAction::Serialise(stream); - - stream << DS_TAG(_climate); -} - -GameActions::Result ClimateSetAction::Query() const -{ - if (_climate >= ClimateType::Count) - { - LOG_ERROR("Invalid climate type %u", _climate); - return GameActions::Result(GameActions::Status::InvalidParameters, STR_INVALID_CLIMATE_ID, STR_ERR_VALUE_OUT_OF_RANGE); - } - - return GameActions::Result(); -} - -GameActions::Result ClimateSetAction::Execute() const -{ - ClimateReset(_climate); - - GfxInvalidateScreen(); - - return GameActions::Result(); -} diff --git a/src/openrct2/actions/ClimateSetAction.h b/src/openrct2/actions/ClimateSetAction.h deleted file mode 100644 index 049746b612..0000000000 --- a/src/openrct2/actions/ClimateSetAction.h +++ /dev/null @@ -1,31 +0,0 @@ -/***************************************************************************** - * Copyright (c) 2014-2025 OpenRCT2 developers - * - * For a complete list of all authors, please refer to contributors.md - * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 - * - * OpenRCT2 is licensed under the GNU General Public License version 3. - *****************************************************************************/ - -#pragma once - -#include "../world/Climate.h" -#include "GameAction.h" - -class ClimateSetAction final : public GameActionBase -{ -private: - ClimateType _climate{}; - -public: - ClimateSetAction() = default; - ClimateSetAction(ClimateType climate); - - void AcceptParameters(GameActionParameterVisitor& visitor) override; - - uint16_t GetActionFlags() const override; - - void Serialise(DataSerialiser& stream) override; - OpenRCT2::GameActions::Result Query() const override; - OpenRCT2::GameActions::Result Execute() const override; -}; diff --git a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp index 2ffa29ea4b..b7268903d3 100644 --- a/src/openrct2/actions/FootpathAdditionPlaceAction.cpp +++ b/src/openrct2/actions/FootpathAdditionPlaceAction.cpp @@ -60,7 +60,7 @@ GameActions::Result FootpathAdditionPlaceAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_POSITION_THIS_HERE, STR_OFF_EDGE_OF_MAP); } - if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && !MapIsLocationOwned(_loc)) + if (!(gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode) && !MapIsLocationOwned(_loc)) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_POSITION_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK); } diff --git a/src/openrct2/actions/FootpathAdditionRemoveAction.cpp b/src/openrct2/actions/FootpathAdditionRemoveAction.cpp index 5f535602bd..f506cfdf3c 100644 --- a/src/openrct2/actions/FootpathAdditionRemoveAction.cpp +++ b/src/openrct2/actions/FootpathAdditionRemoveAction.cpp @@ -52,7 +52,7 @@ GameActions::Result FootpathAdditionRemoveAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, STR_OFF_EDGE_OF_MAP); } - if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && !MapIsLocationOwned(_loc)) + if (!(gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode) && !MapIsLocationOwned(_loc)) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_REMOVE_THIS, STR_LAND_NOT_OWNED_BY_PARK); } diff --git a/src/openrct2/actions/FootpathLayoutPlaceAction.cpp b/src/openrct2/actions/FootpathLayoutPlaceAction.cpp index 39e39116bf..9399fb1ddd 100644 --- a/src/openrct2/actions/FootpathLayoutPlaceAction.cpp +++ b/src/openrct2/actions/FootpathLayoutPlaceAction.cpp @@ -78,7 +78,7 @@ GameActions::Result FootpathLayoutPlaceAction::Query() const GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_OFF_EDGE_OF_MAP); } - if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && !MapIsLocationOwned(_loc)) + if (!(gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode) && !MapIsLocationOwned(_loc)) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK); @@ -114,7 +114,7 @@ GameActions::Result FootpathLayoutPlaceAction::Execute() const gFootpathGroundFlags = 0; // Force ride construction to recheck area - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_RECHECK; + _currentTrackSelectionFlags.set(TrackSelectionFlag::recheck); return ElementInsertExecute(std::move(res)); } @@ -168,7 +168,7 @@ GameActions::Result FootpathLayoutPlaceAction::ElementInsertQuery(GameActions::R const auto clearanceData = canBuild.GetData(); gFootpathGroundFlags = clearanceData.GroundFlags; - if (!GetGameState().Cheats.disableClearanceChecks && (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)) + if (!getGameState().cheats.disableClearanceChecks && (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_CANT_BUILD_THIS_UNDERWATER); diff --git a/src/openrct2/actions/FootpathPlaceAction.cpp b/src/openrct2/actions/FootpathPlaceAction.cpp index 24deb95fbc..270e506f22 100644 --- a/src/openrct2/actions/FootpathPlaceAction.cpp +++ b/src/openrct2/actions/FootpathPlaceAction.cpp @@ -86,7 +86,7 @@ GameActions::Result FootpathPlaceAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_FOOTPATH_HERE, STR_OFF_EDGE_OF_MAP); } - if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && !MapIsLocationOwned(_loc)) + if (!(gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode) && !MapIsLocationOwned(_loc)) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_BUILD_FOOTPATH_HERE, STR_LAND_NOT_OWNED_BY_PARK); } @@ -106,7 +106,7 @@ GameActions::Result FootpathPlaceAction::Query() const return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_BUILD_FOOTPATH_HERE, STR_TOO_HIGH); } - if (_direction != INVALID_DIRECTION && !DirectionValid(_direction)) + if (_direction != kInvalidDirection && !DirectionValid(_direction)) { LOG_ERROR("Direction invalid. direction = %u", _direction); return GameActions::Result( @@ -139,11 +139,11 @@ GameActions::Result FootpathPlaceAction::Execute() const gFootpathGroundFlags = 0; // Force ride construction to recheck area - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_RECHECK; + _currentTrackSelectionFlags.set(TrackSelectionFlag::recheck); if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { - if (_direction != INVALID_DIRECTION && !GetGameState().Cheats.disableClearanceChecks) + if (_direction != kInvalidDirection && !getGameState().cheats.disableClearanceChecks) { // It is possible, let's remove walls between the old and new piece of path auto zLow = _loc.z; @@ -211,6 +211,12 @@ bool FootpathPlaceAction::IsSameAsEntranceElement(const EntranceElement& entranc GameActions::Result FootpathPlaceAction::ElementUpdateQuery(PathElement* pathElement, GameActions::Result res) const { + if (_constructFlags & PathConstructFlag::IsQueue && pathElement->IsLevelCrossing(_loc)) + { + return GameActions::Result( + GameActions::Status::Disallowed, STR_CANT_BUILD_FOOTPATH_HERE, STR_QUEUE_PATHS_CANNOT_BE_USED_FOR_LEVEL_CROSSINGS); + } + if (!IsSameAsPathElement(pathElement)) { res.Cost += 6.00_GBP; @@ -323,7 +329,7 @@ GameActions::Result FootpathPlaceAction::ElementInsertQuery(GameActions::Result const auto clearanceData = canBuild.GetData(); gFootpathGroundFlags = clearanceData.GroundFlags; - if (!GetGameState().Cheats.disableClearanceChecks && (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)) + if (!getGameState().cheats.disableClearanceChecks && (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER)) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_FOOTPATH_HERE, STR_CANT_BUILD_THIS_UNDERWATER); @@ -446,7 +452,7 @@ GameActions::Result FootpathPlaceAction::ElementInsertExecute(GameActions::Resul { FootpathRemoveEdgesAt(_loc, pathElement->as()); } - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !(GetFlags() & GAME_COMMAND_FLAG_GHOST)) + if (gLegacyScene == LegacyScene::scenarioEditor && !(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { AutomaticallySetPeepSpawn(); } @@ -484,12 +490,12 @@ void FootpathPlaceAction::AutomaticallySetPeepSpawn() const } } - auto& gameState = GetGameState(); - if (gameState.PeepSpawns.empty()) + auto& gameState = getGameState(); + if (gameState.peepSpawns.empty()) { - gameState.PeepSpawns.emplace_back(); + gameState.peepSpawns.emplace_back(); } - PeepSpawn* peepSpawn = &gameState.PeepSpawns[0]; + PeepSpawn* peepSpawn = &gameState.peepSpawns[0]; peepSpawn->x = _loc.x + (DirectionOffsets[direction].x * 15) + 16; peepSpawn->y = _loc.y + (DirectionOffsets[direction].y * 15) + 16; peepSpawn->direction = direction; diff --git a/src/openrct2/actions/FootpathPlaceAction.h b/src/openrct2/actions/FootpathPlaceAction.h index e5192a20cd..2fbde8ab9b 100644 --- a/src/openrct2/actions/FootpathPlaceAction.h +++ b/src/openrct2/actions/FootpathPlaceAction.h @@ -19,14 +19,14 @@ private: uint8_t _slope{}; ObjectEntryIndex _type{}; ObjectEntryIndex _railingsType{}; - Direction _direction{ INVALID_DIRECTION }; + Direction _direction{ kInvalidDirection }; PathConstructFlags _constructFlags{}; public: FootpathPlaceAction() = default; FootpathPlaceAction( const CoordsXYZ& loc, uint8_t slope, ObjectEntryIndex type, ObjectEntryIndex railingsType, - Direction direction = INVALID_DIRECTION, PathConstructFlags constructFlags = 0); + Direction direction = kInvalidDirection, PathConstructFlags constructFlags = 0); void AcceptParameters(GameActionParameterVisitor& visitor) override; uint16_t GetActionFlags() const override; diff --git a/src/openrct2/actions/FootpathRemoveAction.cpp b/src/openrct2/actions/FootpathRemoveAction.cpp index 3b27978224..c2eef248aa 100644 --- a/src/openrct2/actions/FootpathRemoveAction.cpp +++ b/src/openrct2/actions/FootpathRemoveAction.cpp @@ -59,7 +59,7 @@ GameActions::Result FootpathRemoveAction::Query() const GameActions::Status::InvalidParameters, STR_CANT_REMOVE_FOOTPATH_FROM_HERE, STR_OFF_EDGE_OF_MAP); } - if (!((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && !MapIsLocationOwned(_loc)) + if (!(gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode) && !MapIsLocationOwned(_loc)) { return GameActions::Result( GameActions::Status::NotOwned, STR_CANT_REMOVE_FOOTPATH_FROM_HERE, STR_LAND_NOT_OWNED_BY_PARK); @@ -104,17 +104,17 @@ GameActions::Result FootpathRemoveAction::Execute() const TileElementRemove(footpathElement); FootpathUpdateQueueChains(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Remove the spawn point (if there is one in the current tile) - gameState.PeepSpawns.erase( + gameState.peepSpawns.erase( std::remove_if( - gameState.PeepSpawns.begin(), gameState.PeepSpawns.end(), + gameState.peepSpawns.begin(), gameState.peepSpawns.end(), [this](const CoordsXYZ& spawn) { { return spawn.ToTileStart() == _loc.ToTileStart(); } }), - gameState.PeepSpawns.end()); + gameState.peepSpawns.end()); } else { diff --git a/src/openrct2/actions/GameAction.cpp b/src/openrct2/actions/GameAction.cpp index 6a4c0cb79e..94245baaf8 100644 --- a/src/openrct2/actions/GameAction.cpp +++ b/src/openrct2/actions/GameAction.cpp @@ -21,7 +21,6 @@ #include "../network/Network.h" #include "../platform/Platform.h" #include "../profiling/Profiling.h" -#include "../scenario/Scenario.h" #include "../scripting/Duktape.hpp" #include "../scripting/HookEngine.h" #include "../scripting/ScriptEngine.h" @@ -100,7 +99,7 @@ namespace OpenRCT2::GameActions return; } - const uint32_t currentTick = GetGameState().CurrentTicks; + const uint32_t currentTick = getGameState().currentTicks; while (_actionQueue.begin() != _actionQueue.end()) { @@ -182,7 +181,7 @@ namespace OpenRCT2::GameActions { if (gGamePaused == 0) return true; - if (GetGameState().Cheats.buildInPauseMode) + if (getGameState().cheats.buildInPauseMode) return true; if (actionFlags & GameActions::Flags::AllowWhilePaused) return true; @@ -250,7 +249,7 @@ namespace OpenRCT2::GameActions char temp[128] = {}; snprintf( - temp, sizeof(temp), "[%s] Tick: %u, GA: %s (%08X) (", GetRealm(), GetGameState().CurrentTicks, action->GetName(), + temp, sizeof(temp), "[%s] Tick: %u, GA: %s (%08X) (", GetRealm(), getGameState().currentTicks, action->GetName(), EnumValue(action->GetType())); output.Write(temp, strlen(temp)); @@ -344,7 +343,7 @@ namespace OpenRCT2::GameActions if (!(actionFlags & GameActions::Flags::ClientOnly) && !(flags & GAME_COMMAND_FLAG_NETWORKED)) { LOG_VERBOSE("[%s] GameAction::Execute %s (Queue)", GetRealm(), action->GetName()); - Enqueue(action, GetGameState().CurrentTicks); + Enqueue(action, getGameState().currentTicks); return result; } @@ -414,7 +413,7 @@ namespace OpenRCT2::GameActions } if (recordAction) { - replayManager->AddGameAction(GetGameState().CurrentTicks, action); + replayManager->AddGameAction(getGameState().currentTicks, action); } } } @@ -480,7 +479,7 @@ bool GameAction::LocationValid(const CoordsXY& coords) const return false; #ifdef ENABLE_SCRIPTING auto& hookEngine = GetContext()->GetScriptEngine().GetHookEngine(); - if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HOOK_TYPE::ACTION_LOCATION)) + if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HookType::actionLocation)) { auto ctx = GetContext()->GetScriptEngine().GetContext(); @@ -497,7 +496,7 @@ bool GameAction::LocationValid(const CoordsXY& coords) const // Call the subscriptions auto e = obj.Take(); - hookEngine.Call(OpenRCT2::Scripting::HOOK_TYPE::ACTION_LOCATION, e, true); + hookEngine.Call(OpenRCT2::Scripting::HookType::actionLocation, e, true); auto scriptResult = OpenRCT2::Scripting::AsOrDefault(e["result"], true); diff --git a/src/openrct2/actions/GameActionRegistry.cpp b/src/openrct2/actions/GameActionRegistry.cpp index 810c3a9a3a..8a566732df 100644 --- a/src/openrct2/actions/GameActionRegistry.cpp +++ b/src/openrct2/actions/GameActionRegistry.cpp @@ -15,7 +15,6 @@ #include "BannerSetStyleAction.h" #include "CheatSetAction.h" #include "ClearAction.h" -#include "ClimateSetAction.h" #include "CustomAction.h" #include "FootpathAdditionPlaceAction.h" #include "FootpathAdditionRemoveAction.h" @@ -136,7 +135,6 @@ namespace OpenRCT2::GameActions REGISTER_ACTION(BannerSetColourAction); REGISTER_ACTION(BannerSetNameAction); REGISTER_ACTION(BannerSetStyleAction); - REGISTER_ACTION(ClimateSetAction); REGISTER_ACTION(FootpathPlaceAction); REGISTER_ACTION(FootpathLayoutPlaceAction); REGISTER_ACTION(FootpathRemoveAction); diff --git a/src/openrct2/actions/LandBuyRightsAction.cpp b/src/openrct2/actions/LandBuyRightsAction.cpp index 4e76034d20..d37428106d 100644 --- a/src/openrct2/actions/LandBuyRightsAction.cpp +++ b/src/openrct2/actions/LandBuyRightsAction.cpp @@ -133,8 +133,7 @@ GameActions::Result LandBuyRightsAction::MapBuyLandRightsForTile(const CoordsXY& return res; } - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 - || (surfaceElement->GetOwnership() & OWNERSHIP_AVAILABLE) == 0) + if (gLegacyScene == LegacyScene::scenarioEditor || (surfaceElement->GetOwnership() & OWNERSHIP_AVAILABLE) == 0) { return GameActions::Result( GameActions::Status::NotOwned, kErrorTitles[EnumValue(_setting)], STR_LAND_NOT_FOR_SALE); @@ -144,7 +143,7 @@ GameActions::Result LandBuyRightsAction::MapBuyLandRightsForTile(const CoordsXY& surfaceElement->SetOwnership(OWNERSHIP_OWNED); Park::UpdateFencesAroundTile(loc); } - res.Cost = GetGameState().LandPrice; + res.Cost = getGameState().landPrice; return res; case LandBuyRightSetting::BuyConstructionRights: // 2 @@ -153,7 +152,7 @@ GameActions::Result LandBuyRightsAction::MapBuyLandRightsForTile(const CoordsXY& return res; } - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 + if (gLegacyScene == LegacyScene::scenarioEditor || (surfaceElement->GetOwnership() & OWNERSHIP_CONSTRUCTION_RIGHTS_AVAILABLE) == 0) { return GameActions::Result( @@ -166,7 +165,7 @@ GameActions::Result LandBuyRightsAction::MapBuyLandRightsForTile(const CoordsXY& uint16_t baseZ = surfaceElement->GetBaseZ(); MapInvalidateTile({ loc, baseZ, baseZ + 16 }); } - res.Cost = GetGameState().ConstructionRightsPrice; + res.Cost = getGameState().constructionRightsPrice; return res; default: diff --git a/src/openrct2/actions/LandLowerAction.cpp b/src/openrct2/actions/LandLowerAction.cpp index f0140b74f7..0d519c4d3b 100644 --- a/src/openrct2/actions/LandLowerAction.cpp +++ b/src/openrct2/actions/LandLowerAction.cpp @@ -95,7 +95,7 @@ GameActions::Result LandLowerAction::QueryExecute(bool isExecuting) const if (surfaceElement == nullptr) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { @@ -143,7 +143,7 @@ GameActions::Result LandLowerAction::QueryExecute(bool isExecuting) const } // Force ride construction to recheck area - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_RECHECK; + _currentTrackSelectionFlags.set(TrackSelectionFlag::recheck); return res; } diff --git a/src/openrct2/actions/LandRaiseAction.cpp b/src/openrct2/actions/LandRaiseAction.cpp index 00c3a52b4a..470f83cf97 100644 --- a/src/openrct2/actions/LandRaiseAction.cpp +++ b/src/openrct2/actions/LandRaiseAction.cpp @@ -96,7 +96,7 @@ GameActions::Result LandRaiseAction::QueryExecute(bool isExecuting) const if (surfaceElement == nullptr) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { @@ -147,7 +147,7 @@ GameActions::Result LandRaiseAction::QueryExecute(bool isExecuting) const } // Force ride construction to recheck area - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_RECHECK; + _currentTrackSelectionFlags.set(TrackSelectionFlag::recheck); return res; } diff --git a/src/openrct2/actions/LandSetHeightAction.cpp b/src/openrct2/actions/LandSetHeightAction.cpp index a6c77d596a..967031b890 100644 --- a/src/openrct2/actions/LandSetHeightAction.cpp +++ b/src/openrct2/actions/LandSetHeightAction.cpp @@ -59,8 +59,8 @@ void LandSetHeightAction::Serialise(DataSerialiser& stream) GameActions::Result LandSetHeightAction::Query() const { - auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) + auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) { return GameActions::Result(GameActions::Status::Disallowed, STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY, kStringIdNone); } @@ -71,7 +71,7 @@ GameActions::Result LandSetHeightAction::Query() const return GameActions::Result(GameActions::Status::Disallowed, kStringIdNone, errorMessage); } - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !gameState.cheats.sandboxMode) { if (!MapIsLocationInPark(_coords)) { @@ -80,9 +80,9 @@ GameActions::Result LandSetHeightAction::Query() const } money64 sceneryRemovalCost = 0; - if (!gameState.Cheats.disableClearanceChecks) + if (!gameState.cheats.disableClearanceChecks) { - if (gameState.Park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) + if (gameState.park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) { // Check for obstructing large trees TileElement* tileElement = CheckTreeObstructions(); @@ -97,7 +97,7 @@ GameActions::Result LandSetHeightAction::Query() const } // Check for ride support limits - if (!gameState.Cheats.disableSupportLimits) + if (!gameState.cheats.disableSupportLimits) { errorMessage = CheckRideSupports(); if (errorMessage != kStringIdNone) @@ -128,7 +128,7 @@ GameActions::Result LandSetHeightAction::Query() const return res; } - if (!gameState.Cheats.disableClearanceChecks) + if (!gameState.cheats.disableClearanceChecks) { uint8_t zCorner = _height; if (_style & kTileSlopeRaisedCornersMask) @@ -161,7 +161,7 @@ GameActions::Result LandSetHeightAction::Execute() const auto surfaceHeight = TileElementHeight(_coords); FootpathRemoveLitter({ _coords, surfaceHeight }); - if (!GetGameState().Cheats.disableClearanceChecks) + if (!getGameState().cheats.disableClearanceChecks) { WallRemoveAt({ _coords, _height * 8 - 16, _height * 8 + 32 }); cost += GetSmallSceneryRemovalCost(); @@ -280,14 +280,14 @@ StringId LandSetHeightAction::CheckRideSupports() const if (ride == nullptr) continue; - const auto* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) continue; int32_t maxHeight = rideEntry->max_height; if (maxHeight == 0) { - maxHeight = ride->GetRideTypeDescriptor().Heights.MaxHeight; + maxHeight = ride->getRideTypeDescriptor().Heights.MaxHeight; } int32_t zDelta = trackElement->ClearanceHeight - _height; diff --git a/src/openrct2/actions/LandSetRightsAction.cpp b/src/openrct2/actions/LandSetRightsAction.cpp index 75988cdd8d..b387bc3e88 100644 --- a/src/openrct2/actions/LandSetRightsAction.cpp +++ b/src/openrct2/actions/LandSetRightsAction.cpp @@ -84,7 +84,7 @@ GameActions::Result LandSetRightsAction::QueryExecute(bool isExecuting) const res.Position = centre; res.Expenditure = ExpenditureType::LandPurchase; - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (!isInEditorMode() && !getGameState().cheats.sandboxMode) { return GameActions::Result(GameActions::Status::NotInEditorMode, kStringIdNone, STR_LAND_NOT_FOR_SALE); } @@ -185,7 +185,7 @@ GameActions::Result LandSetRightsAction::MapBuyLandRightsForTile(const CoordsXY& } } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); const uint8_t currentOwnership = surfaceElement->GetOwnership(); // Are land rights or construction rights currently owned? @@ -193,36 +193,36 @@ GameActions::Result LandSetRightsAction::MapBuyLandRightsForTile(const CoordsXY& { // Buying land if (!(currentOwnership & OWNERSHIP_OWNED) && (_ownership & OWNERSHIP_OWNED)) - res.Cost = gameState.LandPrice; + res.Cost = gameState.landPrice; // Buying construction rights if (!(currentOwnership & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED) && (_ownership & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED)) - res.Cost = gameState.ConstructionRightsPrice; + res.Cost = gameState.constructionRightsPrice; } else { // Selling land if ((currentOwnership & OWNERSHIP_OWNED) && !(_ownership & OWNERSHIP_OWNED)) - res.Cost = -gameState.LandPrice; + res.Cost = -gameState.landPrice; // Selling construction rights if ((currentOwnership & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED) && !(_ownership & OWNERSHIP_CONSTRUCTION_RIGHTS_OWNED)) - res.Cost = -gameState.ConstructionRightsPrice; + res.Cost = -gameState.constructionRightsPrice; } if (isExecuting) { if (_ownership != OWNERSHIP_UNOWNED) { - gameState.PeepSpawns.erase( + gameState.peepSpawns.erase( std::remove_if( - gameState.PeepSpawns.begin(), gameState.PeepSpawns.end(), + gameState.peepSpawns.begin(), gameState.peepSpawns.end(), [x = loc.x, y = loc.y](const auto& spawn) { return floor2(spawn.x, 32) == x && floor2(spawn.y, 32) == y; }), - gameState.PeepSpawns.end()); + gameState.peepSpawns.end()); } surfaceElement->SetOwnership(_ownership); Park::UpdateFencesAroundTile(loc); diff --git a/src/openrct2/actions/LargeSceneryPlaceAction.cpp b/src/openrct2/actions/LargeSceneryPlaceAction.cpp index c312d378f6..a098d45be3 100644 --- a/src/openrct2/actions/LargeSceneryPlaceAction.cpp +++ b/src/openrct2/actions/LargeSceneryPlaceAction.cpp @@ -74,7 +74,7 @@ GameActions::Result LargeSceneryPlaceAction::Query() const auto resultData = LargeSceneryPlaceActionResult{}; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); money64 supportsCost = 0; @@ -152,7 +152,7 @@ GameActions::Result LargeSceneryPlaceAction::Query() const const auto clearanceData = canBuild.GetData(); int32_t tempSceneryGroundFlags = clearanceData.GroundFlags & (ELEMENT_IS_ABOVE_GROUND | ELEMENT_IS_UNDERGROUND); - if (!gameState.Cheats.disableClearanceChecks) + if (!gameState.cheats.disableClearanceChecks) { if ((clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER) || (clearanceData.GroundFlags & ELEMENT_IS_UNDERGROUND)) { @@ -174,8 +174,8 @@ GameActions::Result LargeSceneryPlaceAction::Query() const return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_POSITION_THIS_HERE, STR_OFF_EDGE_OF_MAP); } - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !MapIsLocationOwned({ curTile, zLow }) - && !gameState.Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !MapIsLocationOwned({ curTile, zLow }) + && !gameState.cheats.sandboxMode) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_POSITION_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK); @@ -190,7 +190,7 @@ GameActions::Result LargeSceneryPlaceAction::Query() const } // Force ride construction to recheck area - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_RECHECK; + _currentTrackSelectionFlags.set(TrackSelectionFlag::recheck); res.Cost = sceneryEntry->price + supportsCost; res.SetData(std::move(resultData)); @@ -297,7 +297,7 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { FootpathRemoveLitter({ curTile, zLow }); - if (!GetGameState().Cheats.disableClearanceChecks) + if (!getGameState().cheats.disableClearanceChecks) { WallRemoveAt({ curTile, zLow, zHigh }); } @@ -324,7 +324,7 @@ GameActions::Result LargeSceneryPlaceAction::Execute() const } // Force ride construction to recheck area - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_RECHECK; + _currentTrackSelectionFlags.set(TrackSelectionFlag::recheck); res.Cost = sceneryEntry->price + supportsCost; res.SetData(std::move(resultData)); diff --git a/src/openrct2/actions/LargeSceneryRemoveAction.cpp b/src/openrct2/actions/LargeSceneryRemoveAction.cpp index 772208f532..f6526a3c66 100644 --- a/src/openrct2/actions/LargeSceneryRemoveAction.cpp +++ b/src/openrct2/actions/LargeSceneryRemoveAction.cpp @@ -88,9 +88,9 @@ GameActions::Result LargeSceneryRemoveAction::Query() const auto currentTile = CoordsXYZ{ firstTile.x, firstTile.y, firstTile.z } + currentTileRotatedOffset; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { - if (GetGameState().Park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) + if (getGameState().park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) { if (sceneryEntry->HasFlag(LARGE_SCENERY_FLAG_IS_TREE)) { @@ -168,7 +168,7 @@ GameActions::Result LargeSceneryRemoveAction::Execute() const auto currentTile = CoordsXYZ{ firstTile.x, firstTile.y, firstTile.z } + rotatedCurrentTile; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationOwned({ currentTile.x, currentTile.y, currentTile.z })) { diff --git a/src/openrct2/actions/LargeScenerySetColourAction.cpp b/src/openrct2/actions/LargeScenerySetColourAction.cpp index 96f2768bb7..fcb073927c 100644 --- a/src/openrct2/actions/LargeScenerySetColourAction.cpp +++ b/src/openrct2/actions/LargeScenerySetColourAction.cpp @@ -127,7 +127,7 @@ GameActions::Result LargeScenerySetColourAction::QueryExecute(bool isExecuting) auto rotatedTileCoords = CoordsXYZ{ CoordsXY{ tile.offset }.Rotate(_loc.direction), tile.offset.z }; auto currentTile = CoordsXYZ{ baseTile.x, baseTile.y, baseTile.z } + rotatedTileCoords; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationOwned(currentTile)) { diff --git a/src/openrct2/actions/LoadOrQuitAction.h b/src/openrct2/actions/LoadOrQuitAction.h index ce74be7885..90bf913ff1 100644 --- a/src/openrct2/actions/LoadOrQuitAction.h +++ b/src/openrct2/actions/LoadOrQuitAction.h @@ -22,11 +22,11 @@ class LoadOrQuitAction final : public GameActionBase { private: LoadOrQuitModes _mode{}; - PromptMode _savePromptMode{ PromptMode::SaveBeforeLoad }; + PromptMode _savePromptMode{ PromptMode::saveBeforeLoad }; public: LoadOrQuitAction() = default; - LoadOrQuitAction(LoadOrQuitModes mode, PromptMode savePromptMode = PromptMode::SaveBeforeLoad); + LoadOrQuitAction(LoadOrQuitModes mode, PromptMode savePromptMode = PromptMode::saveBeforeLoad); void AcceptParameters(GameActionParameterVisitor& visitor) override; diff --git a/src/openrct2/actions/MapChangeSizeAction.cpp b/src/openrct2/actions/MapChangeSizeAction.cpp index ba6a95bd7c..754c2bb424 100644 --- a/src/openrct2/actions/MapChangeSizeAction.cpp +++ b/src/openrct2/actions/MapChangeSizeAction.cpp @@ -59,16 +59,16 @@ GameActions::Result MapChangeSizeAction::Query() const GameActions::Result MapChangeSizeAction::Execute() const { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Expand map - while (_targetSize.x > gameState.MapSize.x) + while (_targetSize.x > gameState.mapSize.x) { - gameState.MapSize.x++; + gameState.mapSize.x++; MapExtendBoundarySurfaceX(); } - while (_targetSize.y > gameState.MapSize.y) + while (_targetSize.y > gameState.mapSize.y) { - gameState.MapSize.y++; + gameState.mapSize.y++; MapExtendBoundarySurfaceY(); } @@ -76,9 +76,9 @@ GameActions::Result MapChangeSizeAction::Execute() const ShiftMap(_shift); // Shrink map - if (_targetSize.x < gameState.MapSize.x || _targetSize.y < gameState.MapSize.y) + if (_targetSize.x < gameState.mapSize.x || _targetSize.y < gameState.mapSize.y) { - gameState.MapSize = _targetSize; + gameState.mapSize = _targetSize; MapRemoveOutOfRangeElements(); } diff --git a/src/openrct2/actions/MazePlaceTrackAction.cpp b/src/openrct2/actions/MazePlaceTrackAction.cpp index 7f5aab8b09..2bdbaa1274 100644 --- a/src/openrct2/actions/MazePlaceTrackAction.cpp +++ b/src/openrct2/actions/MazePlaceTrackAction.cpp @@ -64,8 +64,8 @@ GameActions::Result MazePlaceTrackAction::Query() const res.ErrorMessage = STR_OFF_EDGE_OF_MAP; return res; } - auto& gameState = GetGameState(); - if (!MapIsLocationOwned(_loc) && !gameState.Cheats.sandboxMode) + auto& gameState = getGameState(); + if (!MapIsLocationOwned(_loc) && !gameState.cheats.sandboxMode) { res.Error = GameActions::Status::NotOwned; res.ErrorMessage = STR_LAND_NOT_OWNED_BY_PARK; @@ -90,12 +90,12 @@ GameActions::Result MazePlaceTrackAction::Query() const auto clearanceHeight = _loc.z + kMazeClearanceHeight; auto heightDifference = baseHeight - surfaceElement->GetBaseZ(); - if (heightDifference >= 0 && !gameState.Cheats.disableSupportLimits) + if (heightDifference >= 0 && !gameState.cheats.disableSupportLimits) { heightDifference /= kCoordsZPerTinyZ; auto* ride = GetRide(_rideIndex); - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (heightDifference > rtd.Heights.MaxHeight) { res.Error = GameActions::Status::TooHigh; @@ -193,13 +193,13 @@ GameActions::Result MazePlaceTrackAction::Execute() const MapInvalidateTileFull(startLoc); - ride->maze_tiles++; - ride->GetStation().SetBaseZ(trackElement->GetBaseZ()); - ride->GetStation().Start = { 0, 0 }; + ride->mazeTiles++; + ride->getStation().SetBaseZ(trackElement->GetBaseZ()); + ride->getStation().Start = { 0, 0 }; - if (ride->maze_tiles == 1) + if (ride->mazeTiles == 1) { - ride->overall_view = startLoc; + ride->overallView = startLoc; } return res; diff --git a/src/openrct2/actions/MazeSetTrackAction.cpp b/src/openrct2/actions/MazeSetTrackAction.cpp index 883698907f..53c6acb0fb 100644 --- a/src/openrct2/actions/MazeSetTrackAction.cpp +++ b/src/openrct2/actions/MazeSetTrackAction.cpp @@ -99,8 +99,8 @@ GameActions::Result MazeSetTrackAction::Query() const res.ErrorMessage = STR_OFF_EDGE_OF_MAP; return res; } - auto& gameState = GetGameState(); - if (!MapIsLocationOwned(_loc) && !gameState.Cheats.sandboxMode) + auto& gameState = getGameState(); + if (!MapIsLocationOwned(_loc) && !gameState.cheats.sandboxMode) { res.Error = GameActions::Status::NotOwned; res.ErrorMessage = STR_LAND_NOT_OWNED_BY_PARK; @@ -125,12 +125,12 @@ GameActions::Result MazeSetTrackAction::Query() const auto clearanceHeight = _loc.z + 32; auto heightDifference = baseHeight - surfaceElement->GetBaseZ(); - if (heightDifference >= 0 && !gameState.Cheats.disableSupportLimits) + if (heightDifference >= 0 && !gameState.cheats.disableSupportLimits) { heightDifference /= kCoordsZPerTinyZ; auto* ride = GetRide(_rideIndex); - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (heightDifference > rtd.Heights.MaxHeight) { res.Error = GameActions::Status::TooHigh; @@ -232,13 +232,13 @@ GameActions::Result MazeSetTrackAction::Execute() const MapInvalidateTileFull(startLoc); - ride->maze_tiles++; - ride->GetStation().SetBaseZ(tileElement->GetBaseZ()); - ride->GetStation().Start = { 0, 0 }; + ride->mazeTiles++; + ride->getStation().SetBaseZ(tileElement->GetBaseZ()); + ride->getStation().Start = { 0, 0 }; if (_initialPlacement && !(flags & GAME_COMMAND_FLAG_GHOST)) { - ride->overall_view = startLoc; + ride->overallView = startLoc; } } @@ -333,8 +333,8 @@ GameActions::Result MazeSetTrackAction::Execute() const if ((tileElement->AsTrack()->GetMazeEntry() & 0x8888) == 0x8888) { TileElementRemove(tileElement); - ride->ValidateStations(); - ride->maze_tiles--; + ride->validateStations(); + ride->mazeTiles--; } return res; diff --git a/src/openrct2/actions/ParkEntrancePlaceAction.cpp b/src/openrct2/actions/ParkEntrancePlaceAction.cpp index 87971a7bed..090c5c7c49 100644 --- a/src/openrct2/actions/ParkEntrancePlaceAction.cpp +++ b/src/openrct2/actions/ParkEntrancePlaceAction.cpp @@ -56,7 +56,7 @@ void ParkEntrancePlaceAction::Serialise(DataSerialiser& stream) GameActions::Result ParkEntrancePlaceAction::Query() const { - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (!isInEditorMode() && !getGameState().cheats.sandboxMode) { return GameActions::Result(GameActions::Status::NotInEditorMode, STR_CANT_BUILD_THIS_HERE, kStringIdNone); } @@ -79,8 +79,8 @@ GameActions::Result ParkEntrancePlaceAction::Query() const GameActions::Status::NoFreeElements, STR_CANT_BUILD_THIS_HERE, STR_ERR_LANDSCAPE_DATA_AREA_FULL); } - const auto& gameState = GetGameState(); - if (gameState.Park.Entrances.size() >= OpenRCT2::Limits::kMaxParkEntrances) + const auto& gameState = getGameState(); + if (gameState.park.Entrances.size() >= OpenRCT2::Limits::kMaxParkEntrances) { return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_ERR_TOO_MANY_PARK_ENTRANCES); @@ -126,7 +126,7 @@ GameActions::Result ParkEntrancePlaceAction::Execute() const uint32_t flags = GetFlags(); - GetGameState().Park.Entrances.push_back(_loc); + getGameState().park.Entrances.push_back(_loc); auto zLow = _loc.z; auto zHigh = zLow + ParkEntranceHeight; diff --git a/src/openrct2/actions/ParkEntranceRemoveAction.cpp b/src/openrct2/actions/ParkEntranceRemoveAction.cpp index 906f718f34..f92edc0371 100644 --- a/src/openrct2/actions/ParkEntranceRemoveAction.cpp +++ b/src/openrct2/actions/ParkEntranceRemoveAction.cpp @@ -43,7 +43,7 @@ void ParkEntranceRemoveAction::Serialise(DataSerialiser& stream) GameActions::Result ParkEntranceRemoveAction::Query() const { - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (!isInEditorMode() && !getGameState().cheats.sandboxMode) { return GameActions::Result(GameActions::Status::NotInEditorMode, STR_CANT_REMOVE_THIS, kStringIdNone); } @@ -79,8 +79,8 @@ GameActions::Result ParkEntranceRemoveAction::Execute() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REMOVE_THIS, kStringIdNone); } - auto& gameState = GetGameState(); - auto direction = (gameState.Park.Entrances[entranceIndex].direction - 1) & 3; + auto& gameState = getGameState(); + auto direction = (gameState.park.Entrances[entranceIndex].direction - 1) & 3; // Centre (sign) ParkEntranceRemoveSegment(_loc); @@ -93,7 +93,7 @@ GameActions::Result ParkEntranceRemoveAction::Execute() const ParkEntranceRemoveSegment( { _loc.x - CoordsDirectionDelta[direction].x, _loc.y - CoordsDirectionDelta[direction].y, _loc.z }); - gameState.Park.Entrances.erase(gameState.Park.Entrances.begin() + entranceIndex); + gameState.park.Entrances.erase(gameState.park.Entrances.begin() + entranceIndex); return res; } diff --git a/src/openrct2/actions/ParkMarketingAction.cpp b/src/openrct2/actions/ParkMarketingAction.cpp index c538da0f8a..42b031a160 100644 --- a/src/openrct2/actions/ParkMarketingAction.cpp +++ b/src/openrct2/actions/ParkMarketingAction.cpp @@ -55,7 +55,7 @@ GameActions::Result ParkMarketingAction::Query() const return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_START_MARKETING_CAMPAIGN, STR_ERR_VALUE_OUT_OF_RANGE); } - if (GetGameState().Park.Flags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) + if (getGameState().park.Flags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_START_MARKETING_CAMPAIGN, diff --git a/src/openrct2/actions/ParkSetDateAction.cpp b/src/openrct2/actions/ParkSetDateAction.cpp index 3068aa2d0e..5b25fc0bac 100644 --- a/src/openrct2/actions/ParkSetDateAction.cpp +++ b/src/openrct2/actions/ParkSetDateAction.cpp @@ -71,7 +71,7 @@ GameActions::Result ParkSetDateAction::Query() const GameActions::Result ParkSetDateAction::Execute() const { - auto& gameState = GetGameState(); - gameState.Date = OpenRCT2::Date::FromYMD(_year, _month, _day); + auto& gameState = getGameState(); + gameState.date = OpenRCT2::Date::FromYMD(_year, _month, _day); return GameActions::Result(); } diff --git a/src/openrct2/actions/ParkSetEntranceFeeAction.cpp b/src/openrct2/actions/ParkSetEntranceFeeAction.cpp index f58bc951ee..3e5647425e 100644 --- a/src/openrct2/actions/ParkSetEntranceFeeAction.cpp +++ b/src/openrct2/actions/ParkSetEntranceFeeAction.cpp @@ -43,7 +43,7 @@ void ParkSetEntranceFeeAction::Serialise(DataSerialiser& stream) GameActions::Result ParkSetEntranceFeeAction::Query() const { - if ((GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) != 0) + if ((getGameState().park.Flags & PARK_FLAGS_NO_MONEY) != 0) { LOG_ERROR("Can't set park entrance fee because the park has no money"); return GameActions::Result(GameActions::Status::Disallowed, STR_ERR_CANT_CHANGE_PARK_ENTRANCE_FEE, kStringIdNone); @@ -65,7 +65,7 @@ GameActions::Result ParkSetEntranceFeeAction::Query() const GameActions::Result ParkSetEntranceFeeAction::Execute() const { - GetGameState().Park.EntranceFee = _fee; + getGameState().park.EntranceFee = _fee; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::ParkInformation); diff --git a/src/openrct2/actions/ParkSetLoanAction.cpp b/src/openrct2/actions/ParkSetLoanAction.cpp index 318e6dba2b..b753443753 100644 --- a/src/openrct2/actions/ParkSetLoanAction.cpp +++ b/src/openrct2/actions/ParkSetLoanAction.cpp @@ -42,20 +42,20 @@ void ParkSetLoanAction::Serialise(DataSerialiser& stream) GameActions::Result ParkSetLoanAction::Query() const { - auto& gameState = GetGameState(); - if (_value > gameState.BankLoan && _value > gameState.MaxBankLoan) + auto& gameState = getGameState(); + if (_value > gameState.bankLoan && _value > gameState.maxBankLoan) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BORROW_ANY_MORE_MONEY, STR_BANK_REFUSES_TO_INCREASE_LOAN); } - if (_value < gameState.BankLoan && _value < 0.00_GBP) + if (_value < gameState.bankLoan && _value < 0.00_GBP) { return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_PAY_BACK_LOAN, STR_LOAN_CANT_BE_NEGATIVE); } // The “isPayingBack” check is needed to allow increasing the loan when the player is in debt. - const auto isPayingBack = gameState.BankLoan > _value; - const auto amountToPayBack = gameState.BankLoan - _value; - if (isPayingBack && amountToPayBack > gameState.Cash) + const auto isPayingBack = gameState.bankLoan > _value; + const auto amountToPayBack = gameState.bankLoan - _value; + if (isPayingBack && amountToPayBack > gameState.cash) { return GameActions::Result( GameActions::Status::InsufficientFunds, STR_CANT_PAY_BACK_LOAN, STR_NOT_ENOUGH_CASH_AVAILABLE); @@ -65,10 +65,10 @@ GameActions::Result ParkSetLoanAction::Query() const GameActions::Result ParkSetLoanAction::Execute() const { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - gameState.Cash -= (gameState.BankLoan - _value); - gameState.BankLoan = _value; + gameState.cash -= (gameState.bankLoan - _value); + gameState.bankLoan = _value; auto windowManager = OpenRCT2::Ui::GetWindowManager(); windowManager->BroadcastIntent(Intent(INTENT_ACTION_UPDATE_CASH)); diff --git a/src/openrct2/actions/ParkSetNameAction.cpp b/src/openrct2/actions/ParkSetNameAction.cpp index 801d1d5502..5584562bf9 100644 --- a/src/openrct2/actions/ParkSetNameAction.cpp +++ b/src/openrct2/actions/ParkSetNameAction.cpp @@ -56,7 +56,7 @@ GameActions::Result ParkSetNameAction::Query() const GameActions::Result ParkSetNameAction::Execute() const { // Do a no-op if new name is the same as the current name is the same - auto& park = GetGameState().Park; + auto& park = getGameState().park; if (_name != park.Name) { park.Name = _name; diff --git a/src/openrct2/actions/ParkSetParameterAction.cpp b/src/openrct2/actions/ParkSetParameterAction.cpp index 8aa547a543..7bcaa29a47 100644 --- a/src/openrct2/actions/ParkSetParameterAction.cpp +++ b/src/openrct2/actions/ParkSetParameterAction.cpp @@ -57,27 +57,27 @@ GameActions::Result ParkSetParameterAction::Query() const GameActions::Result ParkSetParameterAction::Execute() const { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto* windowMgr = Ui::GetWindowManager(); switch (_parameter) { case ParkParameter::Close: - if (gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) + if (gameState.park.Flags & PARK_FLAGS_PARK_OPEN) { - gameState.Park.Flags &= ~PARK_FLAGS_PARK_OPEN; + gameState.park.Flags &= ~PARK_FLAGS_PARK_OPEN; windowMgr->InvalidateByClass(WindowClass::ParkInformation); } break; case ParkParameter::Open: - if (!(gameState.Park.Flags & PARK_FLAGS_PARK_OPEN)) + if (!(gameState.park.Flags & PARK_FLAGS_PARK_OPEN)) { - gameState.Park.Flags |= PARK_FLAGS_PARK_OPEN; + gameState.park.Flags |= PARK_FLAGS_PARK_OPEN; windowMgr->InvalidateByClass(WindowClass::ParkInformation); } break; case ParkParameter::SamePriceInPark: - gameState.SamePriceThroughoutPark = _value; + gameState.samePriceThroughoutPark = _value; windowMgr->InvalidateByClass(WindowClass::Ride); break; default: diff --git a/src/openrct2/actions/ParkSetResearchFundingAction.cpp b/src/openrct2/actions/ParkSetResearchFundingAction.cpp index 56af4e1be1..26aa1eb83a 100644 --- a/src/openrct2/actions/ParkSetResearchFundingAction.cpp +++ b/src/openrct2/actions/ParkSetResearchFundingAction.cpp @@ -56,9 +56,9 @@ GameActions::Result ParkSetResearchFundingAction::Query() const GameActions::Result ParkSetResearchFundingAction::Execute() const { - auto& gameState = GetGameState(); - gameState.ResearchPriorities = _priorities; - gameState.ResearchFundingLevel = _fundingAmount; + auto& gameState = getGameState(); + gameState.researchPriorities = _priorities; + gameState.researchFundingLevel = _fundingAmount; auto windowManager = OpenRCT2::Ui::GetWindowManager(); windowManager->BroadcastIntent(Intent(INTENT_ACTION_UPDATE_RESEARCH)); diff --git a/src/openrct2/actions/PeepPickupAction.cpp b/src/openrct2/actions/PeepPickupAction.cpp index 6123a24692..68930945e3 100644 --- a/src/openrct2/actions/PeepPickupAction.cpp +++ b/src/openrct2/actions/PeepPickupAction.cpp @@ -147,7 +147,7 @@ GameActions::Result PeepPickupAction::Execute() const if (_owner == NetworkGetCurrentPlayerId()) { // prevent tool_cancel() - InputSetFlag(INPUT_FLAG_TOOL_ACTIVE, false); + gInputFlags.unset(InputFlag::toolActive); } } diff --git a/src/openrct2/actions/PeepSpawnPlaceAction.cpp b/src/openrct2/actions/PeepSpawnPlaceAction.cpp index 71f7452def..f9a0c9ec35 100644 --- a/src/openrct2/actions/PeepSpawnPlaceAction.cpp +++ b/src/openrct2/actions/PeepSpawnPlaceAction.cpp @@ -45,7 +45,7 @@ void PeepSpawnPlaceAction::Serialise(DataSerialiser& stream) GameActions::Result PeepSpawnPlaceAction::Query() const { - if (!(gScreenFlags & SCREEN_FLAGS_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (!isInEditorMode() && !getGameState().cheats.sandboxMode) { return GameActions::Result(GameActions::Status::NotInEditorMode, STR_ERR_CANT_PLACE_PEEP_SPAWN_HERE, kStringIdNone); } @@ -103,37 +103,37 @@ GameActions::Result PeepSpawnPlaceAction::Execute() const spawn.z = _location.z; spawn.direction = _location.direction; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // When attempting to place a peep spawn on a tile that already contains it, // remove that peep spawn instead. - if (!gameState.PeepSpawns.empty()) + if (!gameState.peepSpawns.empty()) { // When searching for existing spawns, ignore the direction. auto foundSpawn = std::find_if( - gameState.PeepSpawns.begin(), gameState.PeepSpawns.end(), [spawn](const CoordsXYZ& existingSpawn) { + gameState.peepSpawns.begin(), gameState.peepSpawns.end(), [spawn](const CoordsXYZ& existingSpawn) { { return existingSpawn.ToTileStart() == spawn.ToTileStart(); } }); - if (foundSpawn != std::end(gameState.PeepSpawns)) + if (foundSpawn != std::end(gameState.peepSpawns)) { - gameState.PeepSpawns.erase(foundSpawn); + gameState.peepSpawns.erase(foundSpawn); MapInvalidateTileFull(spawn); return res; } } // If we have reached our max peep spawns, remove the oldest spawns - while (gameState.PeepSpawns.size() >= Limits::kMaxPeepSpawns) + while (gameState.peepSpawns.size() >= Limits::kMaxPeepSpawns) { - PeepSpawn oldestSpawn = *gameState.PeepSpawns.begin(); - gameState.PeepSpawns.erase(gameState.PeepSpawns.begin()); + PeepSpawn oldestSpawn = *gameState.peepSpawns.begin(); + gameState.peepSpawns.erase(gameState.peepSpawns.begin()); MapInvalidateTileFull(oldestSpawn); } // Set peep spawn - gameState.PeepSpawns.push_back(spawn); + gameState.peepSpawns.push_back(spawn); // Invalidate tile MapInvalidateTileFull(_location); diff --git a/src/openrct2/actions/RideCreateAction.cpp b/src/openrct2/actions/RideCreateAction.cpp index 69f156f454..9affa5cad5 100644 --- a/src/openrct2/actions/RideCreateAction.cpp +++ b/src/openrct2/actions/RideCreateAction.cpp @@ -24,7 +24,6 @@ #include "../ride/RideData.h" #include "../ride/ShopItem.h" #include "../ride/Station.h" -#include "../scenario/Scenario.h" #include "../ui/WindowManager.h" #include "../world/Park.h" @@ -145,45 +144,45 @@ GameActions::Result RideCreateAction::Execute() const ride->type = _rideType; ride->subtype = rideEntryIndex; - ride->SetColourPreset(_colour1); - ride->overall_view.SetNull(); - ride->SetNameToDefault(); + ride->setColourPreset(_colour1); + ride->overallView.SetNull(); + ride->setNameToDefault(); // Default initialize all stations. RideStation station{}; station.Start.SetNull(); station.Entrance.SetNull(); station.Exit.SetNull(); - std::ranges::fill(ride->GetStations(), station); + std::ranges::fill(ride->getStations(), station); - ride->status = RideStatus::Closed; - ride->NumTrains = 1; + ride->status = RideStatus::closed; + ride->numTrains = 1; - auto& gameState = GetGameState(); - if (gameState.Cheats.disableTrainLengthLimit) + auto& gameState = getGameState(); + if (gameState.cheats.disableTrainLengthLimit) { // Reduce amount of proposed trains to prevent 32 trains from always spawning when limits are disabled - if (rideEntry->cars_per_flat_ride == NoFlatRideCars) + if (rideEntry->cars_per_flat_ride == kNoFlatRideCars) { - ride->ProposedNumTrains = 12; + ride->proposedNumTrains = 12; } else { - ride->ProposedNumTrains = rideEntry->cars_per_flat_ride; + ride->proposedNumTrains = rideEntry->cars_per_flat_ride; } } else { - ride->ProposedNumTrains = 32; + ride->proposedNumTrains = 32; } - ride->max_trains = OpenRCT2::Limits::kMaxTrainsPerRide; - ride->num_cars_per_train = 1; - ride->proposed_num_cars_per_train = rideEntry->max_cars_in_train; - ride->min_waiting_time = 10; - ride->max_waiting_time = 60; - ride->depart_flags = RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH | 3; + ride->maxTrains = OpenRCT2::Limits::kMaxTrainsPerRide; + ride->numCarsPerTrain = 1; + ride->proposedNumCarsPerTrain = rideEntry->max_cars_in_train; + ride->minWaitingTime = 10; + ride->maxWaitingTime = 60; + ride->departFlags = RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH | 3; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.HasFlag(RtdFlag::allowMusic)) { auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); @@ -192,19 +191,19 @@ GameActions::Result RideCreateAction::Execute() const { if (rtd.HasFlag(RtdFlag::hasMusicByDefault)) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_MUSIC; + ride->lifecycleFlags |= RIDE_LIFECYCLE_MUSIC; } } } const auto& operatingSettings = rtd.OperatingSettings; - ride->operation_option = (operatingSettings.MinValue * 3 + operatingSettings.MaxValue) / 4; + ride->operationOption = (operatingSettings.MinValue * 3 + operatingSettings.MaxValue) / 4; - ride->lift_hill_speed = rtd.LiftData.minimum_speed; + ride->liftHillSpeed = rtd.LiftData.minimum_speed; ride->ratings.setNull(); - if (!(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) { for (auto i = 0; i < RCT2::ObjectLimits::kMaxShopItemsPerRideEntry; i++) { @@ -213,7 +212,7 @@ GameActions::Result RideCreateAction::Execute() const if (rideEntry->shop_item[0] == ShopItem::None) { - if (!Park::RidePricesUnlocked() || gameState.Park.EntranceFee > 0) + if (!Park::RidePricesUnlocked() || gameState.park.EntranceFee > 0) { ride->price[0] = 0; } @@ -227,7 +226,7 @@ GameActions::Result RideCreateAction::Execute() const ride->price[1] = GetShopItemDescriptor(rideEntry->shop_item[1]).DefaultPrice; } - if (gameState.ScenarioObjective.Type == OBJECTIVE_BUILD_THE_BEST) + if (gameState.scenarioObjective.Type == OBJECTIVE_BUILD_THE_BEST) { ride->price[0] = 0; } @@ -270,31 +269,31 @@ GameActions::Result RideCreateAction::Execute() const } } - ride->value = RIDE_VALUE_UNDEFINED; + ride->value = kRideValueUndefined; ride->satisfaction = 255; ride->popularity = 255; - ride->build_date = GetDate().GetMonthsElapsed(); - ride->music_tune_id = kTuneIDNull; + ride->buildDate = GetDate().GetMonthsElapsed(); + ride->musicTuneId = kTuneIDNull; - ride->breakdown_reason = 255; - ride->upkeep_cost = kMoney64Undefined; + ride->breakdownReason = 255; + ride->upkeepCost = kMoney64Undefined; ride->reliability = kRideInitialReliability; - ride->unreliability_factor = 1; - ride->inspection_interval = RIDE_INSPECTION_EVERY_30_MINUTES; - ride->last_crash_type = RIDE_CRASH_TYPE_NONE; - ride->income_per_hour = kMoney64Undefined; + ride->unreliabilityFactor = 1; + ride->inspectionInterval = RIDE_INSPECTION_EVERY_30_MINUTES; + ride->lastCrashType = RIDE_CRASH_TYPE_NONE; + ride->incomePerHour = kMoney64Undefined; ride->profit = kMoney64Undefined; - ride->entrance_style = kObjectEntryIndexNull; + ride->entranceStyle = kObjectEntryIndexNull; if (rtd.HasFlag(RtdFlag::hasEntranceAndExit)) { - ride->entrance_style = _entranceObjectIndex; + ride->entranceStyle = _entranceObjectIndex; } - ride->num_circuits = 1; - ride->mode = ride->GetDefaultMode(); - ride->MinCarsPerTrain = rideEntry->min_cars_in_train; - ride->MaxCarsPerTrain = rideEntry->max_cars_in_train; + ride->numCircuits = 1; + ride->mode = ride->getDefaultMode(); + ride->minCarsPerTrain = rideEntry->min_cars_in_train; + ride->maxCarsPerTrain = rideEntry->max_cars_in_train; RideSetVehicleColoursToRandomPreset(*ride, _colour2); auto* windowMgr = Ui::GetWindowManager(); diff --git a/src/openrct2/actions/RideDemolishAction.cpp b/src/openrct2/actions/RideDemolishAction.cpp index 14c6debf58..1ac55b3567 100644 --- a/src/openrct2/actions/RideDemolishAction.cpp +++ b/src/openrct2/actions/RideDemolishAction.cpp @@ -30,7 +30,7 @@ using namespace OpenRCT2; -RideDemolishAction::RideDemolishAction(RideId rideIndex, uint8_t modifyType) +RideDemolishAction::RideDemolishAction(RideId rideIndex, RideModifyType modifyType) : _rideIndex(rideIndex) , _modifyType(modifyType) { @@ -63,9 +63,9 @@ GameActions::Result RideDemolishAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_DEMOLISH_RIDE, STR_ERR_RIDE_NOT_FOUND); } - if ((ride->lifecycle_flags & (RIDE_LIFECYCLE_INDESTRUCTIBLE | RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) - && _modifyType == RIDE_MODIFY_DEMOLISH) - && !GetGameState().Cheats.makeAllDestructible) + if ((ride->lifecycleFlags & (RIDE_LIFECYCLE_INDESTRUCTIBLE | RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) + && _modifyType == RideModifyType::demolish) + && !getGameState().cheats.makeAllDestructible) { return GameActions::Result( GameActions::Status::NoClearance, STR_CANT_DEMOLISH_RIDE, @@ -74,20 +74,19 @@ GameActions::Result RideDemolishAction::Query() const GameActions::Result result = GameActions::Result(); - if (_modifyType == RIDE_MODIFY_RENEW) + if (_modifyType == RideModifyType::renew) { - if (ride->status != RideStatus::Closed && ride->status != RideStatus::Simulating) + if (ride->status != RideStatus::closed && ride->status != RideStatus::simulating) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_REFURBISH_RIDE, STR_MUST_BE_CLOSED_FIRST); } - if (ride->num_riders > 0) + if (ride->numRiders > 0) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_REFURBISH_RIDE, STR_RIDE_NOT_YET_EMPTY); } - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_EVER_BEEN_OPENED) - || ride->GetRideTypeDescriptor().AvailableBreakdowns == 0) + if (!(ride->lifecycleFlags & RIDE_LIFECYCLE_EVER_BEEN_OPENED) || ride->getRideTypeDescriptor().AvailableBreakdowns == 0) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_REFURBISH_RIDE, STR_CANT_REFURBISH_NOT_NEEDED); } @@ -110,9 +109,9 @@ GameActions::Result RideDemolishAction::Execute() const switch (_modifyType) { - case RIDE_MODIFY_DEMOLISH: + case RideModifyType::demolish: return DemolishRide(*ride); - case RIDE_MODIFY_RENEW: + case RideModifyType::renew: return RefurbishRide(*ride); default: LOG_ERROR("Unknown ride demolish type %d", _modifyType); @@ -125,10 +124,10 @@ GameActions::Result RideDemolishAction::DemolishRide(Ride& ride) const money64 refundPrice = DemolishTracks(); RideClearForConstruction(ride); - ride.RemovePeeps(); - ride.StopGuestsQueuing(); + ride.removePeeps(); + ride.stopGuestsQueuing(); - ride.ValidateStations(); + ride.validateStations(); RideClearLeftoverEntrances(ride); const auto rideId = ride.id; @@ -148,14 +147,14 @@ GameActions::Result RideDemolishAction::DemolishRide(Ride& ride) const res.Expenditure = ExpenditureType::RideConstruction; res.Cost = refundPrice; - if (!ride.overall_view.IsNull()) + if (!ride.overallView.IsNull()) { - auto xy = ride.overall_view.ToTileCentre(); + auto xy = ride.overallView.ToTileCentre(); res.Position = { xy, TileElementHeight(xy) }; } - ride.Delete(); - GetGameState().Park.Value = Park::CalculateParkValue(); + ride.remove(); + getGameState().park.Value = Park::CalculateParkValue(); // Close windows related to the demolished ride auto* windowMgr = Ui::GetWindowManager(); @@ -196,11 +195,11 @@ money64 RideDemolishAction::DemolishTracks() const uint8_t oldpaused = gGamePaused; gGamePaused = 0; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - for (TileCoordsXY tilePos = {}; tilePos.x < gameState.MapSize.x; ++tilePos.x) + for (TileCoordsXY tilePos = {}; tilePos.x < gameState.mapSize.x; ++tilePos.x) { - for (tilePos.y = 0; tilePos.y < gameState.MapSize.y; ++tilePos.y) + for (tilePos.y = 0; tilePos.y < gameState.mapSize.y; ++tilePos.y) { const auto tileCoords = tilePos.ToCoordsXY(); // Loop over all elements of the tile until there are no more items to remove @@ -274,16 +273,16 @@ GameActions::Result RideDemolishAction::RefurbishRide(Ride& ride) const res.Expenditure = ExpenditureType::RideConstruction; res.Cost = GetRefurbishPrice(ride); - ride.Renew(); + ride.renew(); - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_EVER_BEEN_OPENED; - ride.last_crash_type = RIDE_CRASH_TYPE_NONE; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_EVER_BEEN_OPENED; + ride.lastCrashType = RIDE_CRASH_TYPE_NONE; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_CUSTOMER; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_CUSTOMER; - if (!ride.overall_view.IsNull()) + if (!ride.overallView.IsNull()) { - auto location = ride.overall_view.ToTileCentre(); + auto location = ride.overallView.ToTileCentre(); res.Position = { location, TileElementHeight(location) }; } diff --git a/src/openrct2/actions/RideDemolishAction.h b/src/openrct2/actions/RideDemolishAction.h index 90fd781a4b..52376b4015 100644 --- a/src/openrct2/actions/RideDemolishAction.h +++ b/src/openrct2/actions/RideDemolishAction.h @@ -11,15 +11,21 @@ #include "GameAction.h" +enum class RideModifyType : uint8_t +{ + demolish, + renew, +}; + class RideDemolishAction final : public GameActionBase { private: RideId _rideIndex{ RideId::GetNull() }; - uint8_t _modifyType{ RIDE_MODIFY_DEMOLISH }; + RideModifyType _modifyType{ RideModifyType::demolish }; public: RideDemolishAction() = default; - RideDemolishAction(RideId rideIndex, uint8_t modifyType); + RideDemolishAction(RideId rideIndex, RideModifyType modifyType); void AcceptParameters(GameActionParameterVisitor& visitor) override; diff --git a/src/openrct2/actions/RideEntranceExitPlaceAction.cpp b/src/openrct2/actions/RideEntranceExitPlaceAction.cpp index 249f8ac026..9d721e27fb 100644 --- a/src/openrct2/actions/RideEntranceExitPlaceAction.cpp +++ b/src/openrct2/actions/RideEntranceExitPlaceAction.cpp @@ -71,17 +71,17 @@ GameActions::Result RideEntranceExitPlaceAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_ERR_VALUE_OUT_OF_RANGE); } - if (ride->status != RideStatus::Closed && ride->status != RideStatus::Simulating) + if (ride->status != RideStatus::closed && ride->status != RideStatus::simulating) { return GameActions::Result(GameActions::Status::NotClosed, errorTitle, STR_MUST_BE_CLOSED_FIRST); } - if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) { return GameActions::Result(GameActions::Status::Disallowed, errorTitle, STR_NOT_ALLOWED_TO_MODIFY_STATION); } - const auto& station = ride->GetStation(_stationNum); + const auto& station = ride->getStation(_stationNum); const auto location = _isExit ? station.Exit : station.Entrance; if (!location.IsNull()) @@ -97,12 +97,12 @@ GameActions::Result RideEntranceExitPlaceAction::Query() const } } - auto z = ride->GetStation(_stationNum).GetBaseZ(); + auto z = ride->getStation(_stationNum).GetBaseZ(); if (!LocationValid(_loc)) { return GameActions::Result(GameActions::Status::InvalidParameters, errorTitle, STR_OFF_EDGE_OF_MAP); } - if (!GetGameState().Cheats.sandboxMode && !MapIsLocationOwned({ _loc, z })) + if (!getGameState().cheats.sandboxMode && !MapIsLocationOwned({ _loc, z })) { return GameActions::Result(GameActions::Status::NotOwned, errorTitle, STR_LAND_NOT_OWNED_BY_PARK); } @@ -153,10 +153,10 @@ GameActions::Result RideEntranceExitPlaceAction::Execute() const if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { RideClearForConstruction(*ride); - ride->RemovePeeps(); + ride->removePeeps(); } - auto& station = ride->GetStation(_stationNum); + auto& station = ride->getStation(_stationNum); const auto location = _isExit ? station.Exit : station.Entrance; if (!location.IsNull()) { @@ -173,7 +173,7 @@ GameActions::Result RideEntranceExitPlaceAction::Execute() const auto z = station.GetBaseZ(); if (!(GetFlags() & GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED) && !(GetFlags() & GAME_COMMAND_FLAG_GHOST) - && !GetGameState().Cheats.disableClearanceChecks) + && !getGameState().cheats.disableClearanceChecks) { FootpathRemoveLitter({ _loc, z }); WallRemoveAtZ({ _loc, z }); @@ -236,7 +236,7 @@ GameActions::Result RideEntranceExitPlaceAction::TrackPlaceQuery(const CoordsXYZ const auto errorTitle = isExit ? STR_CANT_BUILD_MOVE_EXIT_FOR_THIS_RIDE_ATTRACTION : STR_CANT_BUILD_MOVE_ENTRANCE_FOR_THIS_RIDE_ATTRACTION; - if (!GetGameState().Cheats.sandboxMode && !MapIsLocationOwned(loc)) + if (!getGameState().cheats.sandboxMode && !MapIsLocationOwned(loc)) { return GameActions::Result(GameActions::Status::NotOwned, errorTitle, STR_LAND_NOT_OWNED_BY_PARK); } diff --git a/src/openrct2/actions/RideEntranceExitPlaceAction.h b/src/openrct2/actions/RideEntranceExitPlaceAction.h index 39fcc7dd24..aecffe796e 100644 --- a/src/openrct2/actions/RideEntranceExitPlaceAction.h +++ b/src/openrct2/actions/RideEntranceExitPlaceAction.h @@ -16,7 +16,7 @@ class RideEntranceExitPlaceAction final : public GameActionBasestatus != RideStatus::Closed && ride->status != RideStatus::Simulating) + if (ride->status != RideStatus::closed && ride->status != RideStatus::simulating) { return GameActions::Result(GameActions::Status::InvalidParameters, STR_MUST_BE_CLOSED_FIRST, kStringIdNone); } - if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) { return GameActions::Result(GameActions::Status::InvalidParameters, STR_NOT_ALLOWED_TO_MODIFY_STATION, kStringIdNone); } @@ -124,7 +124,7 @@ GameActions::Result RideEntranceExitRemoveAction::Execute() const if (!isGhost) { RideClearForConstruction(*ride); - ride->RemovePeeps(); + ride->removePeeps(); InvalidateTestResults(*ride); } @@ -157,7 +157,7 @@ GameActions::Result RideEntranceExitRemoveAction::Execute() const TileElementRemove(entranceElement); - auto& station = ride->GetStation(_stationNum); + auto& station = ride->getStation(_stationNum); if (_isExit) { station.Exit.SetNull(); diff --git a/src/openrct2/actions/RideFreezeRatingAction.cpp b/src/openrct2/actions/RideFreezeRatingAction.cpp index 6e4bf30b29..2789578591 100644 --- a/src/openrct2/actions/RideFreezeRatingAction.cpp +++ b/src/openrct2/actions/RideFreezeRatingAction.cpp @@ -70,7 +70,7 @@ GameActions::Result RideFreezeRatingAction::Execute() const break; } - ride->lifecycle_flags |= RIDE_LIFECYCLE_FIXED_RATINGS; + ride->lifecycleFlags |= RIDE_LIFECYCLE_FIXED_RATINGS; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); diff --git a/src/openrct2/actions/RideSetAppearanceAction.cpp b/src/openrct2/actions/RideSetAppearanceAction.cpp index 4fa37e25a3..958a3c50f1 100644 --- a/src/openrct2/actions/RideSetAppearanceAction.cpp +++ b/src/openrct2/actions/RideSetAppearanceAction.cpp @@ -62,7 +62,7 @@ GameActions::Result RideSetAppearanceAction::Query() const case RideSetAppearanceType::TrackColourMain: case RideSetAppearanceType::TrackColourAdditional: case RideSetAppearanceType::TrackColourSupports: - if (_index >= std::size(ride->track_colour)) + if (_index >= std::size(ride->trackColours)) { LOG_ERROR("Invalid track colour %u", _index); return GameActions::Result( @@ -72,7 +72,7 @@ GameActions::Result RideSetAppearanceAction::Query() const case RideSetAppearanceType::VehicleColourBody: case RideSetAppearanceType::VehicleColourTrim: case RideSetAppearanceType::VehicleColourTertiary: - if (_index >= std::size(ride->vehicle_colours)) + if (_index >= std::size(ride->vehicleColours)) { LOG_ERROR("Invalid vehicle colour %u", _index); return GameActions::Result( @@ -104,43 +104,43 @@ GameActions::Result RideSetAppearanceAction::Execute() const switch (_type) { case RideSetAppearanceType::TrackColourMain: - ride->track_colour[_index].main = _value; + ride->trackColours[_index].main = _value; GfxInvalidateScreen(); break; case RideSetAppearanceType::TrackColourAdditional: - ride->track_colour[_index].additional = _value; + ride->trackColours[_index].additional = _value; GfxInvalidateScreen(); break; case RideSetAppearanceType::TrackColourSupports: - ride->track_colour[_index].supports = _value; + ride->trackColours[_index].supports = _value; GfxInvalidateScreen(); break; case RideSetAppearanceType::VehicleColourBody: - ride->vehicle_colours[_index].Body = _value; + ride->vehicleColours[_index].Body = _value; RideUpdateVehicleColours(*ride); break; case RideSetAppearanceType::VehicleColourTrim: - ride->vehicle_colours[_index].Trim = _value; + ride->vehicleColours[_index].Trim = _value; RideUpdateVehicleColours(*ride); break; case RideSetAppearanceType::VehicleColourTertiary: - ride->vehicle_colours[_index].Tertiary = _value; + ride->vehicleColours[_index].Tertiary = _value; RideUpdateVehicleColours(*ride); break; case RideSetAppearanceType::VehicleColourScheme: ride->vehicleColourSettings = static_cast(_value); - for (uint32_t i = 1; i < std::size(ride->vehicle_colours); i++) + for (uint32_t i = 1; i < std::size(ride->vehicleColours); i++) { - ride->vehicle_colours[i] = ride->vehicle_colours[0]; + ride->vehicleColours[i] = ride->vehicleColours[0]; } RideUpdateVehicleColours(*ride); break; case RideSetAppearanceType::EntranceStyle: - ride->entrance_style = _value; + ride->entranceStyle = _value; GfxInvalidateScreen(); break; case RideSetAppearanceType::SellingItemColourIsRandom: - ride->SetLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS, static_cast(_value)); + ride->setLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS, static_cast(_value)); break; } @@ -148,9 +148,9 @@ GameActions::Result RideSetAppearanceAction::Execute() const windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); auto res = GameActions::Result(); - if (!ride->overall_view.IsNull()) + if (!ride->overallView.IsNull()) { - auto location = ride->overall_view.ToTileCentre(); + auto location = ride->overallView.ToTileCentre(); res.Position = { location, TileElementHeight(location) }; } diff --git a/src/openrct2/actions/RideSetColourSchemeAction.cpp b/src/openrct2/actions/RideSetColourSchemeAction.cpp index 67bd91a9e7..e3439109cc 100644 --- a/src/openrct2/actions/RideSetColourSchemeAction.cpp +++ b/src/openrct2/actions/RideSetColourSchemeAction.cpp @@ -77,7 +77,7 @@ GameActions::Result RideSetColourSchemeAction::Execute() const res.Expenditure = ExpenditureType::RideConstruction; res.ErrorTitle = STR_CANT_SET_COLOUR_SCHEME; - GetTrackElementOriginAndApplyChanges(_loc, _trackType, _newColourScheme, nullptr, TRACK_ELEMENT_SET_COLOUR_SCHEME); + GetTrackElementOriginAndApplyChanges(_loc, _trackType, _newColourScheme, nullptr, { TrackElementSetFlag::colourScheme }); return res; } diff --git a/src/openrct2/actions/RideSetNameAction.cpp b/src/openrct2/actions/RideSetNameAction.cpp index eab6a2fdd8..39b8b4f3ea 100644 --- a/src/openrct2/actions/RideSetNameAction.cpp +++ b/src/openrct2/actions/RideSetNameAction.cpp @@ -55,7 +55,7 @@ GameActions::Result RideSetNameAction::Query() const GameActions::Status::InvalidParameters, STR_CANT_RENAME_RIDE_ATTRACTION, STR_ERR_RIDE_NOT_FOUND); } - if (!_name.empty() && Ride::NameExists(_name, ride->id)) + if (!_name.empty() && Ride::nameExists(_name, ride->id)) { return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_RENAME_RIDE_ATTRACTION, STR_ERROR_EXISTING_NAME); @@ -76,11 +76,11 @@ GameActions::Result RideSetNameAction::Execute() const if (_name.empty()) { - ride->SetNameToDefault(); + ride->setNameToDefault(); } else { - ride->custom_name = _name; + ride->customName = _name; } ScrollingTextInvalidate(); @@ -93,7 +93,7 @@ GameActions::Result RideSetNameAction::Execute() const windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_GUEST_LIST)); auto res = GameActions::Result(); - auto location = ride->overall_view.ToTileCentre(); + auto location = ride->overallView.ToTileCentre(); res.Position = { location, TileElementHeight(location) }; return res; diff --git a/src/openrct2/actions/RideSetPriceAction.cpp b/src/openrct2/actions/RideSetPriceAction.cpp index e6d96827ae..4fc90b3512 100644 --- a/src/openrct2/actions/RideSetPriceAction.cpp +++ b/src/openrct2/actions/RideSetPriceAction.cpp @@ -101,9 +101,9 @@ GameActions::Result RideSetPriceAction::Execute() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, kStringIdEmpty); } - if (!ride->overall_view.IsNull()) + if (!ride->overallView.IsNull()) { - auto location = ride->overall_view.ToTileCentre(); + auto location = ride->overallView.ToTileCentre(); res.Position = { location, TileElementHeight(location) }; } @@ -114,7 +114,7 @@ GameActions::Result RideSetPriceAction::Execute() const { shopItem = ShopItem::Admission; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType != RtdSpecialType::toilet) { shopItem = rideEntry->shop_item[0]; @@ -138,8 +138,8 @@ GameActions::Result RideSetPriceAction::Execute() const shopItem = rideEntry->shop_item[1]; if (shopItem == ShopItem::None) { - shopItem = ride->GetRideTypeDescriptor().PhotoItem; - if ((ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) == 0) + shopItem = ride->getRideTypeDescriptor().PhotoItem; + if ((ride->lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) == 0) { ride->price[1] = _price; windowMgr->InvalidateByClass(WindowClass::Ride); @@ -167,7 +167,7 @@ void RideSetPriceAction::RideSetCommonPrice(ShopItem shopItem) const { auto invalidate = false; auto rideEntry = GetRideEntryByIndex(ride.subtype); - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::toilet && shopItem == ShopItem::Admission) { if (ride.price[0] != _price) diff --git a/src/openrct2/actions/RideSetSettingAction.cpp b/src/openrct2/actions/RideSetSettingAction.cpp index 732a6212ec..842982b3ac 100644 --- a/src/openrct2/actions/RideSetSettingAction.cpp +++ b/src/openrct2/actions/RideSetSettingAction.cpp @@ -58,19 +58,19 @@ GameActions::Result RideSetSettingAction::Query() const switch (_setting) { case RideSetSetting::Mode: - if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_CHANGE_OPERATING_MODE, STR_HAS_BROKEN_DOWN_AND_REQUIRES_FIXING); } - if (ride->status != RideStatus::Closed && ride->status != RideStatus::Simulating) + if (ride->status != RideStatus::closed && ride->status != RideStatus::simulating) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_CHANGE_OPERATING_MODE, STR_MUST_BE_CLOSED_FIRST); } - if (!RideIsModeValid(*ride) && !GetGameState().Cheats.showAllOperatingModes) + if (!RideIsModeValid(*ride) && !getGameState().cheats.showAllOperatingModes) { LOG_ERROR("Invalid ride mode: %u", _value); return GameActions::Result( @@ -116,7 +116,7 @@ GameActions::Result RideSetSettingAction::Query() const case RideSetSetting::MusicType: { auto& objManager = GetContext()->GetObjectManager(); - auto musicObj = objManager.GetLoadedObject(ObjectType::music, _value); + auto musicObj = objManager.GetLoadedObject(_value); if (musicObj == nullptr) { LOG_ERROR("Invalid music style: %u", _value); @@ -134,7 +134,7 @@ GameActions::Result RideSetSettingAction::Query() const } break; case RideSetSetting::NumCircuits: - if (ride->lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT && _value > 1) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_CABLE_LIFT && _value > 1) { return GameActions::Result( GameActions::Status::InvalidParameters, STR_CANT_CHANGE_OPERATING_MODE, @@ -149,7 +149,7 @@ GameActions::Result RideSetSettingAction::Query() const } break; case RideSetSetting::RideType: - if (!GetGameState().Cheats.allowArbitraryRideTypeChanges) + if (!getGameState().cheats.allowArbitraryRideTypeChanges) { LOG_ERROR("Arbitrary ride type changes not allowed."); return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_CHANGE_OPERATING_MODE, kStringIdNone); @@ -179,76 +179,76 @@ GameActions::Result RideSetSettingAction::Execute() const case RideSetSetting::Mode: InvalidateTestResults(*ride); RideClearForConstruction(*ride); - ride->RemovePeeps(); + ride->removePeeps(); ride->mode = static_cast(_value); - ride->UpdateMaxVehicles(); - ride->UpdateNumberOfCircuits(); + ride->updateMaxVehicles(); + ride->updateNumberOfCircuits(); break; case RideSetSetting::Departure: - ride->depart_flags = _value; + ride->departFlags = _value; break; case RideSetSetting::MinWaitingTime: - ride->min_waiting_time = _value; - ride->max_waiting_time = std::max(_value, ride->max_waiting_time); + ride->minWaitingTime = _value; + ride->maxWaitingTime = std::max(_value, ride->maxWaitingTime); break; case RideSetSetting::MaxWaitingTime: - ride->max_waiting_time = _value; - ride->min_waiting_time = std::min(_value, ride->min_waiting_time); + ride->maxWaitingTime = _value; + ride->minWaitingTime = std::min(_value, ride->minWaitingTime); break; case RideSetSetting::Operation: InvalidateTestResults(*ride); - ride->operation_option = _value; + ride->operationOption = _value; break; case RideSetSetting::InspectionInterval: if (_value == RIDE_INSPECTION_NEVER) { - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; + ride->lifecycleFlags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; } - ride->inspection_interval = _value; + ride->inspectionInterval = _value; break; case RideSetSetting::Music: - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_MUSIC; + ride->lifecycleFlags &= ~RIDE_LIFECYCLE_MUSIC; if (_value) { - ride->lifecycle_flags |= RIDE_LIFECYCLE_MUSIC; + ride->lifecycleFlags |= RIDE_LIFECYCLE_MUSIC; } break; case RideSetSetting::MusicType: if (_value != ride->music) { ride->music = _value; - ride->music_tune_id = kTuneIDNull; + ride->musicTuneId = kTuneIDNull; } break; case RideSetSetting::LiftHillSpeed: - if (_value != ride->lift_hill_speed) + if (_value != ride->liftHillSpeed) { - ride->lift_hill_speed = _value; + ride->liftHillSpeed = _value; InvalidateTestResults(*ride); } break; case RideSetSetting::NumCircuits: - if (_value != ride->num_circuits) + if (_value != ride->numCircuits) { - ride->num_circuits = _value; + ride->numCircuits = _value; InvalidateTestResults(*ride); } break; case RideSetSetting::RideType: ride->type = _value; - ride->UpdateRideTypeForAllPieces(); + ride->updateRideTypeForAllPieces(); GfxInvalidateScreen(); break; } auto res = GameActions::Result(); - if (!ride->overall_view.IsNull()) + if (!ride->overallView.IsNull()) { - auto location = ride->overall_view.ToTileCentre(); + auto location = ride->overallView.ToTileCentre(); res.Position = { location, TileElementHeight(location) }; } auto* windowMgr = Ui::GetWindowManager(); @@ -258,30 +258,30 @@ GameActions::Result RideSetSettingAction::Execute() const bool RideSetSettingAction::RideIsModeValid(const Ride& ride) const { - return ride.GetRideTypeDescriptor().RideModes & (1uLL << _value); + return ride.getRideTypeDescriptor().RideModes & (1uLL << _value); } bool RideSetSettingAction::RideIsValidLiftHillSpeed(const Ride& ride) const { - auto& gameState = GetGameState(); - int32_t minSpeed = gameState.Cheats.unlockOperatingLimits ? 0 : ride.GetRideTypeDescriptor().LiftData.minimum_speed; - int32_t maxSpeed = gameState.Cheats.unlockOperatingLimits ? 255 : ride.GetRideTypeDescriptor().LiftData.maximum_speed; + auto& gameState = getGameState(); + int32_t minSpeed = gameState.cheats.unlockOperatingLimits ? 0 : ride.getRideTypeDescriptor().LiftData.minimum_speed; + int32_t maxSpeed = gameState.cheats.unlockOperatingLimits ? 255 : ride.getRideTypeDescriptor().LiftData.maximum_speed; return _value >= minSpeed && _value <= maxSpeed; } bool RideSetSettingAction::RideIsValidNumCircuits() const { int32_t minNumCircuits = 1; - int32_t maxNumCircuits = GetGameState().Cheats.unlockOperatingLimits ? 255 : Limits::kMaxCircuitsPerRide; + int32_t maxNumCircuits = getGameState().cheats.unlockOperatingLimits ? 255 : Limits::kMaxCircuitsPerRide; return _value >= minNumCircuits && _value <= maxNumCircuits; } bool RideSetSettingAction::RideIsValidOperationOption(const Ride& ride) const { - const auto& operatingSettings = ride.GetRideTypeDescriptor().OperatingSettings; + const auto& operatingSettings = ride.getRideTypeDescriptor().OperatingSettings; uint8_t minValue = operatingSettings.MinValue; uint8_t maxValue = operatingSettings.MaxValue; - if (GetGameState().Cheats.unlockOperatingLimits) + if (getGameState().cheats.unlockOperatingLimits) { minValue = 0; maxValue = 255; @@ -294,20 +294,20 @@ StringId RideSetSettingAction::GetOperationErrorMessage(const Ride& ride) const { switch (ride.mode) { - case RideMode::StationToStation: + case RideMode::stationToStation: return STR_CANT_CHANGE_SPEED; - case RideMode::Race: + case RideMode::race: return STR_CANT_CHANGE_NUMBER_OF_LAPS; - case RideMode::Dodgems: + case RideMode::dodgems: return STR_CANT_CHANGE_TIME_LIMIT; - case RideMode::Swing: + case RideMode::swing: return STR_CANT_CHANGE_NUMBER_OF_SWINGS; - case RideMode::Rotation: - case RideMode::ForwardRotation: - case RideMode::BackwardRotation: + case RideMode::rotation: + case RideMode::forwardRotation: + case RideMode::backwardRotation: return STR_CANT_CHANGE_NUMBER_OF_ROTATIONS; default: - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) { return STR_CANT_CHANGE_THIS; } diff --git a/src/openrct2/actions/RideSetStatusAction.cpp b/src/openrct2/actions/RideSetStatusAction.cpp index 15d3f5520e..a3ff08ad13 100644 --- a/src/openrct2/actions/RideSetStatusAction.cpp +++ b/src/openrct2/actions/RideSetStatusAction.cpp @@ -66,7 +66,7 @@ GameActions::Result RideSetStatusAction::Query() const return res; } - if (_status >= RideStatus::Count) + if (_status >= RideStatus::count) { LOG_ERROR("Invalid ride status %u for ride %u", EnumValue(_status), _rideIndex.ToUnderlying()); res.Error = GameActions::Status::InvalidParameters; @@ -78,10 +78,10 @@ GameActions::Result RideSetStatusAction::Query() const res.ErrorTitle = _StatusErrorTitles[EnumValue(_status)]; Formatter ft(res.ErrorMessageArgs.data()); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); if (_status != ride->status) { - if (_status == RideStatus::Simulating && (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (_status == RideStatus::simulating && (ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { // Simulating will force clear the track, so make sure player can't cheat around a break down res.Error = GameActions::Status::Disallowed; @@ -92,14 +92,14 @@ GameActions::Result RideSetStatusAction::Query() const ResultWithMessage modeSwitchResult = { true }; switch (_status) { - case RideStatus::Open: - modeSwitchResult = ride->Open(false); + case RideStatus::open: + modeSwitchResult = ride->open(false); break; - case RideStatus::Testing: - modeSwitchResult = ride->Test(false); + case RideStatus::testing: + modeSwitchResult = ride->test(false); break; - case RideStatus::Simulating: - modeSwitchResult = ride->Simulate(false); + case RideStatus::simulating: + modeSwitchResult = ride->simulate(false); break; default: break; @@ -134,10 +134,10 @@ GameActions::Result RideSetStatusAction::Execute() const Formatter ft(res.ErrorMessageArgs.data()); ft.Increment(6); - ride->FormatNameTo(ft); - if (!ride->overall_view.IsNull()) + ride->formatNameTo(ft); + if (!ride->overallView.IsNull()) { - auto location = ride->overall_view.ToTileCentre(); + auto location = ride->overallView.ToTileCentre(); res.Position = { location, TileElementHeight(location) }; } @@ -145,30 +145,30 @@ GameActions::Result RideSetStatusAction::Execute() const switch (_status) { - case RideStatus::Closed: - if (ride->status == _status || ride->status == RideStatus::Simulating) + case RideStatus::closed: + if (ride->status == _status || ride->status == RideStatus::simulating) { - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (!(ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_CRASHED; + ride->lifecycleFlags &= ~RIDE_LIFECYCLE_CRASHED; RideClearForConstruction(*ride); - ride->RemovePeeps(); + ride->removePeeps(); } } - ride->status = RideStatus::Closed; - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; - ride->race_winner = EntityId::GetNull(); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride->status = RideStatus::closed; + ride->lifecycleFlags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; + ride->raceWinner = EntityId::GetNull(); + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); break; - case RideStatus::Simulating: + case RideStatus::simulating: { - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_CRASHED; + ride->lifecycleFlags &= ~RIDE_LIFECYCLE_CRASHED; RideClearForConstruction(*ride); - ride->RemovePeeps(); + ride->removePeeps(); - const auto modeSwitchResult = ride->Simulate(true); + const auto modeSwitchResult = ride->simulate(true); if (!modeSwitchResult.Successful) { res.Error = GameActions::Status::Unknown; @@ -177,27 +177,27 @@ GameActions::Result RideSetStatusAction::Execute() const } ride->status = _status; - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; - ride->race_winner = EntityId::GetNull(); - ride->current_issues = 0; - ride->last_issue_time = 0; - ride->GetMeasurement(); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride->lifecycleFlags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; + ride->raceWinner = EntityId::GetNull(); + ride->currentIssues = 0; + ride->lastIssueTime = 0; + ride->getMeasurement(); + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); break; } - case RideStatus::Testing: - case RideStatus::Open: + case RideStatus::testing: + case RideStatus::open: { if (ride->status == _status) { return res; } - if (ride->status == RideStatus::Simulating) + if (ride->status == RideStatus::simulating) { RideClearForConstruction(*ride); - ride->RemovePeeps(); + ride->removePeeps(); } // Fix #3183: Make sure we close the construction window so the ride finishes any editing code before opening @@ -208,9 +208,9 @@ GameActions::Result RideSetStatusAction::Execute() const windowMgr->Close(*constructionWindow); } - if (_status == RideStatus::Testing) + if (_status == RideStatus::testing) { - const auto modeSwitchResult = ride->Test(true); + const auto modeSwitchResult = ride->test(true); if (!modeSwitchResult.Successful) { res.Error = GameActions::Status::Unknown; @@ -220,7 +220,7 @@ GameActions::Result RideSetStatusAction::Execute() const } else { - const auto modeSwitchResult = ride->Open(true); + const auto modeSwitchResult = ride->open(true); if (!modeSwitchResult.Successful) { res.Error = GameActions::Status::Unknown; @@ -229,12 +229,12 @@ GameActions::Result RideSetStatusAction::Execute() const } } - ride->race_winner = EntityId::GetNull(); + ride->raceWinner = EntityId::GetNull(); ride->status = _status; - ride->current_issues = 0; - ride->last_issue_time = 0; - ride->GetMeasurement(); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride->currentIssues = 0; + ride->lastIssueTime = 0; + ride->getMeasurement(); + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); break; } diff --git a/src/openrct2/actions/RideSetStatusAction.h b/src/openrct2/actions/RideSetStatusAction.h index 96f937ac46..0f602919a0 100644 --- a/src/openrct2/actions/RideSetStatusAction.h +++ b/src/openrct2/actions/RideSetStatusAction.h @@ -15,7 +15,7 @@ class RideSetStatusAction final : public GameActionBaselifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) { return GameActions::Result(GameActions::Status::Broken, errTitle, STR_HAS_BROKEN_DOWN_AND_REQUIRES_FIXING); } - if (ride->status != RideStatus::Closed && ride->status != RideStatus::Simulating) + if (ride->status != RideStatus::closed && ride->status != RideStatus::simulating) { return GameActions::Result(GameActions::Status::NotClosed, errTitle, STR_MUST_BE_CLOSED_FIRST); } @@ -137,16 +137,16 @@ GameActions::Result RideSetVehicleAction::Execute() const { case RideSetVehicleType::NumTrains: RideClearForConstruction(*ride); - ride->RemovePeeps(); - ride->vehicle_change_timeout = 100; + ride->removePeeps(); + ride->vehicleChangeTimeout = 100; - ride->ProposedNumTrains = _value; + ride->proposedNumTrains = _value; break; case RideSetVehicleType::NumCarsPerTrain: { RideClearForConstruction(*ride); - ride->RemovePeeps(); - ride->vehicle_change_timeout = 100; + ride->removePeeps(); + ride->vehicleChangeTimeout = 100; InvalidateTestResults(*ride); auto rideEntry = GetRideEntryByIndex(ride->subtype); @@ -156,19 +156,19 @@ GameActions::Result RideSetVehicleAction::Execute() const return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, kStringIdNone); } uint8_t clampValue = _value; - static_assert(sizeof(clampValue) == sizeof(ride->proposed_num_cars_per_train)); - if (!GetGameState().Cheats.disableTrainLengthLimit) + static_assert(sizeof(clampValue) == sizeof(ride->proposedNumCarsPerTrain)); + if (!getGameState().cheats.disableTrainLengthLimit) { clampValue = std::clamp(clampValue, rideEntry->min_cars_in_train, rideEntry->max_cars_in_train); } - ride->proposed_num_cars_per_train = clampValue; + ride->proposedNumCarsPerTrain = clampValue; break; } case RideSetVehicleType::RideEntry: { RideClearForConstruction(*ride); - ride->RemovePeeps(); - ride->vehicle_change_timeout = 100; + ride->removePeeps(); + ride->vehicleChangeTimeout = 100; InvalidateTestResults(*ride); ride->subtype = _value; @@ -180,20 +180,20 @@ GameActions::Result RideSetVehicleAction::Execute() const } RideSetVehicleColoursToRandomPreset(*ride, _colour); - if (!GetGameState().Cheats.disableTrainLengthLimit) + if (!getGameState().cheats.disableTrainLengthLimit) { - ride->proposed_num_cars_per_train = std::clamp( - ride->proposed_num_cars_per_train, rideEntry->min_cars_in_train, rideEntry->max_cars_in_train); + ride->proposedNumCarsPerTrain = std::clamp( + ride->proposedNumCarsPerTrain, rideEntry->min_cars_in_train, rideEntry->max_cars_in_train); } break; } case RideSetVehicleType::TrainsReversed: { RideClearForConstruction(*ride); - ride->RemovePeeps(); - ride->vehicle_change_timeout = 100; + ride->removePeeps(); + ride->vehicleChangeTimeout = 100; - ride->SetLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS, _value); + ride->setLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS, _value); break; } @@ -202,13 +202,13 @@ GameActions::Result RideSetVehicleAction::Execute() const return GameActions::Result(GameActions::Status::InvalidParameters, errTitle, kStringIdNone); } - ride->num_circuits = 1; - ride->UpdateMaxVehicles(); + ride->numCircuits = 1; + ride->updateMaxVehicles(); auto res = GameActions::Result(); - if (!ride->overall_view.IsNull()) + if (!ride->overallView.IsNull()) { - auto location = ride->overall_view.ToTileCentre(); + auto location = ride->overallView.ToTileCentre(); res.Position = { location, TileElementHeight(res.Position) }; } @@ -224,13 +224,13 @@ bool RideSetVehicleAction::RideIsVehicleTypeValid(const Ride& ride) const { bool selectionShouldBeExpanded; ride_type_t rideTypeIterator, rideTypeIteratorMax; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); { - const auto& rtd = ride.GetRideTypeDescriptor(); - if (gameState.Cheats.showVehiclesFromOtherTrackTypes + const auto& rtd = ride.getRideTypeDescriptor(); + if (gameState.cheats.showVehiclesFromOtherTrackTypes && !( - ride.GetRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide) || rtd.specialType == RtdSpecialType::maze + ride.getRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide) || rtd.specialType == RtdSpecialType::maze || rtd.specialType == RtdSpecialType::miniGolf)) { selectionShouldBeExpanded = true; @@ -263,7 +263,7 @@ bool RideSetVehicleAction::RideIsVehicleTypeValid(const Ride& ride) const { if (rideEntryIndex == _value) { - if (!RideEntryIsInvented(rideEntryIndex) && !gameState.Cheats.ignoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !gameState.cheats.ignoreResearchStatus) { return false; } diff --git a/src/openrct2/actions/ScenarioSetSettingAction.cpp b/src/openrct2/actions/ScenarioSetSettingAction.cpp index 27e5f935ae..5485bfcd51 100644 --- a/src/openrct2/actions/ScenarioSetSettingAction.cpp +++ b/src/openrct2/actions/ScenarioSetSettingAction.cpp @@ -14,7 +14,6 @@ #include "../OpenRCT2.h" #include "../entity/Peep.h" #include "../management/Finance.h" -#include "../scenario/Scenario.h" #include "../ui/WindowManager.h" #include "../world/Park.h" @@ -47,32 +46,32 @@ GameActions::Result ScenarioSetSettingAction::Query() const GameActions::Result ScenarioSetSettingAction::Execute() const { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto* windowMgr = Ui::GetWindowManager(); switch (_setting) { case ScenarioSetSetting::NoMoney: - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) { if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_NO_MONEY; + gameState.park.Flags |= PARK_FLAGS_NO_MONEY; } else { - gameState.Park.Flags &= ~PARK_FLAGS_NO_MONEY; + gameState.park.Flags &= ~PARK_FLAGS_NO_MONEY; } } else { if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_NO_MONEY; + gameState.park.Flags |= PARK_FLAGS_NO_MONEY; } else { - gameState.Park.Flags &= ~PARK_FLAGS_NO_MONEY; + gameState.park.Flags &= ~PARK_FLAGS_NO_MONEY; } // Invalidate all windows that have anything to do with finance windowMgr->InvalidateByClass(WindowClass::Ride); @@ -84,168 +83,168 @@ GameActions::Result ScenarioSetSettingAction::Execute() const } break; case ScenarioSetSetting::InitialCash: - gameState.InitialCash = std::clamp(_value, 0.00_GBP, 1000000.00_GBP); - gameState.Cash = gameState.InitialCash; + gameState.initialCash = std::clamp(_value, 0.00_GBP, 1000000.00_GBP); + gameState.cash = gameState.initialCash; windowMgr->InvalidateByClass(WindowClass::Finances); windowMgr->InvalidateByClass(WindowClass::BottomToolbar); break; case ScenarioSetSetting::InitialLoan: - gameState.BankLoan = std::clamp(_value, 0.00_GBP, 5000000.00_GBP); - gameState.MaxBankLoan = std::max(gameState.BankLoan, gameState.MaxBankLoan); + gameState.bankLoan = std::clamp(_value, 0.00_GBP, 5000000.00_GBP); + gameState.maxBankLoan = std::max(gameState.bankLoan, gameState.maxBankLoan); windowMgr->InvalidateByClass(WindowClass::Finances); break; case ScenarioSetSetting::MaximumLoanSize: - gameState.MaxBankLoan = std::clamp(_value, 0.00_GBP, 5000000.00_GBP); - gameState.BankLoan = std::min(gameState.BankLoan, gameState.MaxBankLoan); + gameState.maxBankLoan = std::clamp(_value, 0.00_GBP, 5000000.00_GBP); + gameState.bankLoan = std::min(gameState.bankLoan, gameState.maxBankLoan); windowMgr->InvalidateByClass(WindowClass::Finances); break; case ScenarioSetSetting::AnnualInterestRate: - gameState.BankLoanInterestRate = std::clamp(_value, 0, MaxBankLoanInterestRate); + gameState.bankLoanInterestRate = std::clamp(_value, 0, MaxBankLoanInterestRate); windowMgr->InvalidateByClass(WindowClass::Finances); break; case ScenarioSetSetting::ForbidMarketingCampaigns: if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_FORBID_MARKETING_CAMPAIGN; + gameState.park.Flags |= PARK_FLAGS_FORBID_MARKETING_CAMPAIGN; } else { - gameState.Park.Flags &= ~PARK_FLAGS_FORBID_MARKETING_CAMPAIGN; + gameState.park.Flags &= ~PARK_FLAGS_FORBID_MARKETING_CAMPAIGN; } break; case ScenarioSetSetting::AverageCashPerGuest: - gameState.GuestInitialCash = std::clamp(_value, 0.00_GBP, 1000.00_GBP); + gameState.guestInitialCash = std::clamp(_value, 0.00_GBP, 1000.00_GBP); break; case ScenarioSetSetting::GuestInitialHappiness: - gameState.GuestInitialHappiness = std::clamp(_value, 40, 250); + gameState.guestInitialHappiness = std::clamp(_value, 40, 250); break; case ScenarioSetSetting::GuestInitialHunger: - gameState.GuestInitialHunger = std::clamp(_value, 40, 250); + gameState.guestInitialHunger = std::clamp(_value, 40, 250); break; case ScenarioSetSetting::GuestInitialThirst: - gameState.GuestInitialThirst = std::clamp(_value, 40, 250); + gameState.guestInitialThirst = std::clamp(_value, 40, 250); break; case ScenarioSetSetting::GuestsPreferLessIntenseRides: if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_PREF_LESS_INTENSE_RIDES; + gameState.park.Flags |= PARK_FLAGS_PREF_LESS_INTENSE_RIDES; } else { - gameState.Park.Flags &= ~PARK_FLAGS_PREF_LESS_INTENSE_RIDES; + gameState.park.Flags &= ~PARK_FLAGS_PREF_LESS_INTENSE_RIDES; } break; case ScenarioSetSetting::GuestsPreferMoreIntenseRides: if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_PREF_MORE_INTENSE_RIDES; + gameState.park.Flags |= PARK_FLAGS_PREF_MORE_INTENSE_RIDES; } else { - gameState.Park.Flags &= ~PARK_FLAGS_PREF_MORE_INTENSE_RIDES; + gameState.park.Flags &= ~PARK_FLAGS_PREF_MORE_INTENSE_RIDES; } break; case ScenarioSetSetting::CostToBuyLand: - gameState.LandPrice = std::clamp(_value, 5.00_GBP, 200.00_GBP); + gameState.landPrice = std::clamp(_value, 5.00_GBP, 200.00_GBP); break; case ScenarioSetSetting::CostToBuyConstructionRights: - gameState.ConstructionRightsPrice = std::clamp(_value, 5.00_GBP, 200.00_GBP); + gameState.constructionRightsPrice = std::clamp(_value, 5.00_GBP, 200.00_GBP); break; case ScenarioSetSetting::ParkChargeMethod: - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) { if (_value == 0) { - gameState.Park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY; - gameState.Park.Flags &= ~PARK_FLAGS_UNLOCK_ALL_PRICES; - gameState.Park.EntranceFee = 0.00_GBP; + gameState.park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY; + gameState.park.Flags &= ~PARK_FLAGS_UNLOCK_ALL_PRICES; + gameState.park.EntranceFee = 0.00_GBP; } else if (_value == 1) { - gameState.Park.Flags &= ~PARK_FLAGS_PARK_FREE_ENTRY; - gameState.Park.Flags &= ~PARK_FLAGS_UNLOCK_ALL_PRICES; - gameState.Park.EntranceFee = 10.00_GBP; + gameState.park.Flags &= ~PARK_FLAGS_PARK_FREE_ENTRY; + gameState.park.Flags &= ~PARK_FLAGS_UNLOCK_ALL_PRICES; + gameState.park.EntranceFee = 10.00_GBP; } else { - gameState.Park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY; - gameState.Park.Flags |= PARK_FLAGS_UNLOCK_ALL_PRICES; - gameState.Park.EntranceFee = 10.00_GBP; + gameState.park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY; + gameState.park.Flags |= PARK_FLAGS_UNLOCK_ALL_PRICES; + gameState.park.EntranceFee = 10.00_GBP; } } else { if (_value == 0) { - gameState.Park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY; - gameState.Park.Flags &= ~PARK_FLAGS_UNLOCK_ALL_PRICES; + gameState.park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY; + gameState.park.Flags &= ~PARK_FLAGS_UNLOCK_ALL_PRICES; } else if (_value == 1) { - gameState.Park.Flags &= ~PARK_FLAGS_PARK_FREE_ENTRY; - gameState.Park.Flags &= ~PARK_FLAGS_UNLOCK_ALL_PRICES; + gameState.park.Flags &= ~PARK_FLAGS_PARK_FREE_ENTRY; + gameState.park.Flags &= ~PARK_FLAGS_UNLOCK_ALL_PRICES; } else { - gameState.Park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY; - gameState.Park.Flags |= PARK_FLAGS_UNLOCK_ALL_PRICES; + gameState.park.Flags |= PARK_FLAGS_PARK_FREE_ENTRY; + gameState.park.Flags |= PARK_FLAGS_UNLOCK_ALL_PRICES; } windowMgr->InvalidateByClass(WindowClass::ParkInformation); windowMgr->InvalidateByClass(WindowClass::Ride); } break; case ScenarioSetSetting::ParkChargeEntryFee: - gameState.Park.EntranceFee = std::clamp(_value, 0.00_GBP, kMaxEntranceFee); + gameState.park.EntranceFee = std::clamp(_value, 0.00_GBP, kMaxEntranceFee); windowMgr->InvalidateByClass(WindowClass::ParkInformation); break; case ScenarioSetSetting::ForbidTreeRemoval: if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_FORBID_TREE_REMOVAL; + gameState.park.Flags |= PARK_FLAGS_FORBID_TREE_REMOVAL; } else { - gameState.Park.Flags &= ~PARK_FLAGS_FORBID_TREE_REMOVAL; + gameState.park.Flags &= ~PARK_FLAGS_FORBID_TREE_REMOVAL; } break; case ScenarioSetSetting::ForbidLandscapeChanges: if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_FORBID_LANDSCAPE_CHANGES; + gameState.park.Flags |= PARK_FLAGS_FORBID_LANDSCAPE_CHANGES; } else { - gameState.Park.Flags &= ~PARK_FLAGS_FORBID_LANDSCAPE_CHANGES; + gameState.park.Flags &= ~PARK_FLAGS_FORBID_LANDSCAPE_CHANGES; } break; case ScenarioSetSetting::ForbidHighConstruction: if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_FORBID_HIGH_CONSTRUCTION; + gameState.park.Flags |= PARK_FLAGS_FORBID_HIGH_CONSTRUCTION; } else { - gameState.Park.Flags &= ~PARK_FLAGS_FORBID_HIGH_CONSTRUCTION; + gameState.park.Flags &= ~PARK_FLAGS_FORBID_HIGH_CONSTRUCTION; } break; case ScenarioSetSetting::ParkRatingHigherDifficultyLevel: if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_DIFFICULT_PARK_RATING; + gameState.park.Flags |= PARK_FLAGS_DIFFICULT_PARK_RATING; } else { - gameState.Park.Flags &= ~PARK_FLAGS_DIFFICULT_PARK_RATING; + gameState.park.Flags &= ~PARK_FLAGS_DIFFICULT_PARK_RATING; } break; case ScenarioSetSetting::GuestGenerationHigherDifficultyLevel: if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_DIFFICULT_GUEST_GENERATION; + gameState.park.Flags |= PARK_FLAGS_DIFFICULT_GUEST_GENERATION; } else { - gameState.Park.Flags &= ~PARK_FLAGS_DIFFICULT_GUEST_GENERATION; + gameState.park.Flags &= ~PARK_FLAGS_DIFFICULT_GUEST_GENERATION; } break; case ScenarioSetSetting::AllowEarlyCompletion: @@ -255,11 +254,11 @@ GameActions::Result ScenarioSetSettingAction::Execute() const { if (_value != 0) { - gameState.Park.Flags |= PARK_FLAGS_RCT1_INTEREST; + gameState.park.Flags |= PARK_FLAGS_RCT1_INTEREST; } else { - gameState.Park.Flags &= ~PARK_FLAGS_RCT1_INTEREST; + gameState.park.Flags &= ~PARK_FLAGS_RCT1_INTEREST; } break; } diff --git a/src/openrct2/actions/SignSetNameAction.cpp b/src/openrct2/actions/SignSetNameAction.cpp index 64a4b150ef..11d1d2ae34 100644 --- a/src/openrct2/actions/SignSetNameAction.cpp +++ b/src/openrct2/actions/SignSetNameAction.cpp @@ -51,6 +51,27 @@ GameActions::Result SignSetNameAction::Query() const LOG_ERROR("Banner not found for bannerIndex %d", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_SIGN, kStringIdNone); } + + TileElement* tileElement = BannerGetTileElement(_bannerIndex); + + if (tileElement == nullptr) + { + LOG_ERROR("Banner tile element not found for bannerIndex %d", _bannerIndex); + return GameActions::Result( + GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_ERR_BANNER_ELEMENT_NOT_FOUND); + } + + CoordsXYZ loc = { banner->position.ToCoordsXY(), tileElement->GetBaseZ() }; + + if (!LocationValid(loc)) + { + return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_OFF_EDGE_OF_MAP); + } + if (!MapCanBuildAt({ loc.x, loc.y, loc.z - 16 })) + { + return GameActions::Result(GameActions::Status::NotOwned, STR_CANT_RENAME_BANNER, STR_LAND_NOT_OWNED_BY_PARK); + } + return GameActions::Result(); } diff --git a/src/openrct2/actions/SignSetStyleAction.cpp b/src/openrct2/actions/SignSetStyleAction.cpp index 121d6ceddc..a97d50db5b 100644 --- a/src/openrct2/actions/SignSetStyleAction.cpp +++ b/src/openrct2/actions/SignSetStyleAction.cpp @@ -58,6 +58,8 @@ GameActions::Result SignSetStyleAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, kStringIdNone); } + CoordsXYZ loc; + if (_isLarge) { TileElement* tileElement = BannerGetTileElement(_bannerIndex); @@ -72,6 +74,7 @@ GameActions::Result SignSetStyleAction::Query() const "Tile element has type %u, expected %d (LargeScenery)", tileElement->GetType(), TileElementType::LargeScenery); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, kStringIdNone); } + loc = { banner->position.ToCoordsXY(), tileElement->GetBaseZ() }; } else { @@ -82,6 +85,16 @@ GameActions::Result SignSetStyleAction::Query() const LOG_ERROR("Wall element not found for bannerIndex", _bannerIndex); return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, kStringIdNone); } + loc = { banner->position.ToCoordsXY(), wallElement->GetBaseZ() }; + } + + if (!LocationValid(loc)) + { + return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_RENAME_BANNER, STR_OFF_EDGE_OF_MAP); + } + if (!MapCanBuildAt({ loc.x, loc.y, loc.z - 16 })) + { + return GameActions::Result(GameActions::Status::NotOwned, STR_CANT_RENAME_BANNER, STR_LAND_NOT_OWNED_BY_PARK); } return GameActions::Result(); diff --git a/src/openrct2/actions/SmallSceneryPlaceAction.cpp b/src/openrct2/actions/SmallSceneryPlaceAction.cpp index ee4a801e94..318e3b0f69 100644 --- a/src/openrct2/actions/SmallSceneryPlaceAction.cpp +++ b/src/openrct2/actions/SmallSceneryPlaceAction.cpp @@ -171,8 +171,8 @@ GameActions::Result SmallSceneryPlaceAction::Query() const targetHeight = surfaceHeight; } - auto& gameState = GetGameState(); - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode + auto& gameState = getGameState(); + if (gLegacyScene != LegacyScene::scenarioEditor && !gameState.cheats.sandboxMode && !MapIsLocationOwned({ _loc.x, _loc.y, targetHeight })) { return GameActions::Result(GameActions::Status::NotOwned, STR_CANT_POSITION_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK); @@ -180,7 +180,7 @@ GameActions::Result SmallSceneryPlaceAction::Query() const auto* surfaceElement = MapGetSurfaceElementAt(_loc); - if (surfaceElement != nullptr && !gameState.Cheats.disableClearanceChecks && surfaceElement->GetWaterHeight() > 0) + if (surfaceElement != nullptr && !gameState.cheats.disableClearanceChecks && surfaceElement->GetWaterHeight() > 0) { int32_t water_height = surfaceElement->GetWaterHeight() - 1; if (water_height > targetHeight) @@ -190,7 +190,7 @@ GameActions::Result SmallSceneryPlaceAction::Query() const } } - if (!gameState.Cheats.disableClearanceChecks && !(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE))) + if (!gameState.cheats.disableClearanceChecks && !(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE))) { if (isOnWater) { @@ -208,13 +208,13 @@ GameActions::Result SmallSceneryPlaceAction::Query() const } } - if (!gameState.Cheats.disableClearanceChecks && (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_REQUIRE_FLAT_SURFACE)) + if (!gameState.cheats.disableClearanceChecks && (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_REQUIRE_FLAT_SURFACE)) && !supportsRequired && !isOnWater && surfaceElement != nullptr && (surfaceElement->GetSlope() != kTileSlopeFlat)) { return GameActions::Result(GameActions::Status::Disallowed, STR_CANT_POSITION_THIS_HERE, STR_LEVEL_LAND_REQUIRED); } - if (!gameState.Cheats.disableSupportLimits && !(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE)) && supportsRequired) + if (!gameState.cheats.disableSupportLimits && !(sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_STACKABLE)) && supportsRequired) { if (!isOnWater) { @@ -367,7 +367,7 @@ GameActions::Result SmallSceneryPlaceAction::Execute() const if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { FootpathRemoveLitter({ _loc, targetHeight }); - if (!GetGameState().Cheats.disableClearanceChecks && (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_NO_WALLS))) + if (!getGameState().cheats.disableClearanceChecks && (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_NO_WALLS))) { WallRemoveAt({ _loc, targetHeight, targetHeight + sceneryEntry->height }); } diff --git a/src/openrct2/actions/SmallSceneryRemoveAction.cpp b/src/openrct2/actions/SmallSceneryRemoveAction.cpp index c22f41dab3..31886c2e31 100644 --- a/src/openrct2/actions/SmallSceneryRemoveAction.cpp +++ b/src/openrct2/actions/SmallSceneryRemoveAction.cpp @@ -74,11 +74,11 @@ GameActions::Result SmallSceneryRemoveAction::Query() const res.Expenditure = ExpenditureType::Landscaping; res.Position = _loc; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !(GetFlags() & GAME_COMMAND_FLAG_GHOST) - && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !(GetFlags() & GAME_COMMAND_FLAG_GHOST) + && !getGameState().cheats.sandboxMode) { // Check if allowed to remove item - if (GetGameState().Park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) + if (getGameState().park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) { if (entry->HasFlag(SMALL_SCENERY_FLAG_IS_TREE)) { diff --git a/src/openrct2/actions/SmallScenerySetColourAction.cpp b/src/openrct2/actions/SmallScenerySetColourAction.cpp index 9e9455350a..2ae5015e33 100644 --- a/src/openrct2/actions/SmallScenerySetColourAction.cpp +++ b/src/openrct2/actions/SmallScenerySetColourAction.cpp @@ -83,7 +83,7 @@ GameActions::Result SmallScenerySetColourAction::QueryExecute(bool isExecuting) return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_OFF_EDGE_OF_MAP); } - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationOwned(_loc)) { diff --git a/src/openrct2/actions/StaffHireNewAction.cpp b/src/openrct2/actions/StaffHireNewAction.cpp index 572afd8daf..5c7b4063fc 100644 --- a/src/openrct2/actions/StaffHireNewAction.cpp +++ b/src/openrct2/actions/StaffHireNewAction.cpp @@ -15,6 +15,7 @@ #include "../GameState.h" #include "../core/MemoryStream.h" #include "../drawing/Drawing.h" +#include "../entity/EntityList.h" #include "../entity/EntityRegistry.h" #include "../entity/Staff.h" #include "../localisation/StringIds.h" @@ -22,7 +23,6 @@ #include "../object/ObjectManager.h" #include "../object/PeepAnimationsObject.h" #include "../ride/Ride.h" -#include "../scenario/Scenario.h" #include "../ui/WindowManager.h" #include "../world/Entrance.h" #include "../world/Park.h" @@ -186,14 +186,14 @@ GameActions::Result StaffHireNewAction::QueryExecute(bool execute) const newPeep->PathfindGoal.x = 0xFF; newPeep->PathfindGoal.y = 0xFF; newPeep->PathfindGoal.z = 0xFF; - newPeep->PathfindGoal.direction = INVALID_DIRECTION; + newPeep->PathfindGoal.direction = kInvalidDirection; uint8_t colour = StaffGetColour(static_cast(_staffType)); newPeep->TshirtColour = colour; newPeep->TrousersColour = colour; // Staff energy determines their walking speed - switch (GetGameState().Cheats.selectedStaffSpeed) + switch (getGameState().cheats.selectedStaffSpeed) { case StaffSpeedCheat::None: newPeep->Energy = kCheatsStaffNormalSpeed; @@ -280,11 +280,11 @@ void StaffHireNewAction::AutoPositionNewStaff(Peep* newPeep) const else { // No walking guests; pick random park entrance - const auto& gameState = GetGameState(); - if (!gameState.Park.Entrances.empty()) + const auto& gameState = getGameState(); + if (!gameState.park.Entrances.empty()) { - auto rand = ScenarioRandMax(static_cast(gameState.Park.Entrances.size())); - const auto& entrance = gameState.Park.Entrances[rand]; + auto rand = ScenarioRandMax(static_cast(gameState.park.Entrances.size())); + const auto& entrance = gameState.park.Entrances[rand]; auto dir = entrance.direction; newLocation = entrance; // TODO: Replace with CoordsDirectionDelta diff --git a/src/openrct2/actions/SurfaceSetStyleAction.cpp b/src/openrct2/actions/SurfaceSetStyleAction.cpp index 26c8ca98cb..51a7a03dd2 100644 --- a/src/openrct2/actions/SurfaceSetStyleAction.cpp +++ b/src/openrct2/actions/SurfaceSetStyleAction.cpp @@ -55,7 +55,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const if (_surfaceStyle != kObjectEntryIndexNull) { const auto surfaceObj = static_cast( - objManager.GetLoadedObject(ObjectType::terrainSurface, _surfaceStyle)); + objManager.GetLoadedObject(_surfaceStyle)); if (surfaceObj == nullptr) { @@ -85,11 +85,11 @@ GameActions::Result SurfaceSetStyleAction::Query() const res.Position.y = yMid; res.Position.z = heightMid; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Do nothing if not in editor, sandbox mode or landscaping is forbidden - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode - && (gameState.Park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES)) + if (gLegacyScene != LegacyScene::scenarioEditor && !gameState.cheats.sandboxMode + && (gameState.park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES)) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_CHANGE_LAND_TYPE, STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY); @@ -105,7 +105,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const if (!LocationValid(coords)) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !gameState.cheats.sandboxMode) { if (!MapIsLocationInPark(coords)) continue; @@ -123,8 +123,7 @@ GameActions::Result SurfaceSetStyleAction::Query() const if (_surfaceStyle != curSurfaceStyle) { - const auto surfaceObject = static_cast( - objManager.GetLoadedObject(ObjectType::terrainSurface, _surfaceStyle)); + const auto* surfaceObject = objManager.GetLoadedObject(_surfaceStyle); if (surfaceObject != nullptr) { surfaceCost += surfaceObject->Price; @@ -173,7 +172,7 @@ GameActions::Result SurfaceSetStyleAction::Execute() const if (!LocationValid(coords)) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationInPark(coords)) continue; @@ -192,8 +191,7 @@ GameActions::Result SurfaceSetStyleAction::Execute() const if (_surfaceStyle != curSurfaceStyle) { auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); - const auto surfaceObject = static_cast( - objManager.GetLoadedObject(ObjectType::terrainSurface, _surfaceStyle)); + const auto* surfaceObject = objManager.GetLoadedObject(_surfaceStyle); if (surfaceObject != nullptr) { surfaceCost += surfaceObject->Price; diff --git a/src/openrct2/actions/TrackDesignAction.cpp b/src/openrct2/actions/TrackDesignAction.cpp index 3674077571..7feb1f1b65 100644 --- a/src/openrct2/actions/TrackDesignAction.cpp +++ b/src/openrct2/actions/TrackDesignAction.cpp @@ -12,6 +12,7 @@ #include "../Context.h" #include "../Diagnostic.h" #include "../GameState.h" +#include "../config/Config.h" #include "../management/Finance.h" #include "../management/Research.h" #include "../object/ObjectManager.h" @@ -65,21 +66,21 @@ GameActions::Result TrackDesignAction::Query() const GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_OFF_EDGE_OF_MAP); } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto& objManager = GetContext()->GetObjectManager(); auto entryIndex = objManager.GetLoadedObjectEntryIndex(_td.trackAndVehicle.vehicleObject); if (entryIndex == kObjectEntryIndexNull) { // Force a fallback if the entry is not invented yet a track design of it is selected, // which can happen in select-by-track-type mode - if (!RideEntryIsInvented(entryIndex) && !gameState.Cheats.ignoreResearchStatus) + if (!RideEntryIsInvented(entryIndex) && !gameState.cheats.ignoreResearchStatus) { entryIndex = kObjectEntryIndexNull; } } // Colours do not matter as will be overwritten - auto rideCreateAction = RideCreateAction(_td.trackAndVehicle.rtdIndex, entryIndex, 0, 0, gameState.LastEntranceStyle); + auto rideCreateAction = RideCreateAction(_td.trackAndVehicle.rtdIndex, entryIndex, 0, 0, gameState.lastEntranceStyle); rideCreateAction.SetFlags(GetFlags()); auto r = GameActions::ExecuteNested(&rideCreateAction); if (r.Error != GameActions::Status::Ok) @@ -111,7 +112,7 @@ GameActions::Result TrackDesignAction::Query() const queryRes = TrackDesignPlace(_td, flags, placeScenery, *ride, _loc); } - auto gameAction = RideDemolishAction(ride->id, RIDE_MODIFY_DEMOLISH); + auto gameAction = RideDemolishAction(ride->id, RideModifyType::demolish); gameAction.SetFlags(GetFlags()); GameActions::ExecuteNested(&gameAction); @@ -139,21 +140,21 @@ GameActions::Result TrackDesignAction::Execute() const res.Position.z = _loc.z; res.Expenditure = ExpenditureType::RideConstruction; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto& objManager = GetContext()->GetObjectManager(); auto entryIndex = objManager.GetLoadedObjectEntryIndex(_td.trackAndVehicle.vehicleObject); if (entryIndex != kObjectEntryIndexNull) { // Force a fallback if the entry is not invented yet a track design using it is selected. // This can happen on rides with multiple vehicles where some have been invented and some haven’t. - if (!RideEntryIsInvented(entryIndex) && !gameState.Cheats.ignoreResearchStatus) + if (!RideEntryIsInvented(entryIndex) && !gameState.cheats.ignoreResearchStatus) { entryIndex = kObjectEntryIndexNull; } } // Colours do not matter as will be overwritten - auto rideCreateAction = RideCreateAction(_td.trackAndVehicle.rtdIndex, entryIndex, 0, 0, gameState.LastEntranceStyle); + auto rideCreateAction = RideCreateAction(_td.trackAndVehicle.rtdIndex, entryIndex, 0, 0, gameState.lastEntranceStyle); rideCreateAction.SetFlags(GetFlags()); auto r = GameActions::ExecuteNested(&rideCreateAction); if (r.Error != GameActions::Status::Ok) @@ -184,7 +185,7 @@ GameActions::Result TrackDesignAction::Execute() const if (queryRes.Error != GameActions::Status::Ok) { - auto gameAction = RideDemolishAction(ride->id, RIDE_MODIFY_DEMOLISH); + auto gameAction = RideDemolishAction(ride->id, RideModifyType::demolish); gameAction.SetFlags(GetFlags()); GameActions::ExecuteNested(&gameAction); @@ -202,7 +203,7 @@ GameActions::Result TrackDesignAction::Execute() const auto execRes = TrackDesignPlace(_td, flags, placeScenery, *ride, _loc); if (execRes.Error != GameActions::Status::Ok) { - auto gameAction = RideDemolishAction(ride->id, RIDE_MODIFY_DEMOLISH); + auto gameAction = RideDemolishAction(ride->id, RideModifyType::demolish); gameAction.SetFlags(GetFlags()); GameActions::ExecuteNested(&gameAction); @@ -238,24 +239,28 @@ GameActions::Result TrackDesignAction::Execute() const auto numCircuits = std::max(1, _td.operation.numCircuits); SetOperatingSettingNested(ride->id, RideSetSetting::NumCircuits, numCircuits, flags); - ride->SetToDefaultInspectionInterval(); - ride->lifecycle_flags |= RIDE_LIFECYCLE_NOT_CUSTOM_DESIGN; + + uint8_t defaultInspectionInterval = Config::Get().general.DefaultInspectionInterval; + if (defaultInspectionInterval <= RIDE_INSPECTION_NEVER) + SetOperatingSettingNested(ride->id, RideSetSetting::InspectionInterval, defaultInspectionInterval, flags); + + ride->lifecycleFlags |= RIDE_LIFECYCLE_NOT_CUSTOM_DESIGN; ride->vehicleColourSettings = _td.appearance.vehicleColourSettings; - ride->entrance_style = objManager.GetLoadedObjectEntryIndex(_td.appearance.stationObjectIdentifier); - if (ride->entrance_style == kObjectEntryIndexNull) + ride->entranceStyle = objManager.GetLoadedObjectEntryIndex(_td.appearance.stationObjectIdentifier); + if (ride->entranceStyle == kObjectEntryIndexNull) { - ride->entrance_style = gameState.LastEntranceStyle; + ride->entranceStyle = gameState.lastEntranceStyle; } - for (size_t i = 0; i < std::min(std::size(ride->track_colour), std::size(_td.appearance.trackColours)); i++) + for (size_t i = 0; i < std::min(std::size(ride->trackColours), std::size(_td.appearance.trackColours)); i++) { - ride->track_colour[i] = _td.appearance.trackColours[i]; + ride->trackColours[i] = _td.appearance.trackColours[i]; } for (size_t i = 0; i < Limits::kMaxVehicleColours; i++) { - ride->vehicle_colours[i] = _td.appearance.vehicleColours[i]; + ride->vehicleColours[i] = _td.appearance.vehicleColours[i]; } for (int32_t count = 1; count == 1 || r.Error != GameActions::Status::Ok; ++count) diff --git a/src/openrct2/actions/TrackPlaceAction.cpp b/src/openrct2/actions/TrackPlaceAction.cpp index 264b8509fb..35b591dc51 100644 --- a/src/openrct2/actions/TrackPlaceAction.cpp +++ b/src/openrct2/actions/TrackPlaceAction.cpp @@ -99,8 +99,8 @@ GameActions::Result TrackPlaceAction::Query() const GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_ERR_VALUE_OUT_OF_RANGE); } - auto& gameState = GetGameState(); - if (_rideType != ride->type && !gameState.Cheats.allowArbitraryRideTypeChanges) + auto& gameState = getGameState(); + if (_rideType != ride->type && !gameState.cheats.allowArbitraryRideTypeChanges) { return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, kStringIdNone); @@ -128,9 +128,9 @@ GameActions::Result TrackPlaceAction::Query() const auto resultData = TrackPlaceActionResult{}; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); - if ((ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) && _trackType == TrackElemType::EndStation) + if ((ride->lifecycleFlags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) && _trackType == TrackElemType::EndStation) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_NOT_ALLOWED_TO_MODIFY_STATION); @@ -138,7 +138,7 @@ GameActions::Result TrackPlaceAction::Query() const if (!(GetActionFlags() & GameActions::Flags::AllowWhilePaused)) { - if (GameIsPaused() && !gameState.Cheats.buildInPauseMode) + if (GameIsPaused() && !gameState.cheats.buildInPauseMode) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, @@ -150,7 +150,7 @@ GameActions::Result TrackPlaceAction::Query() const { if (_trackType == TrackElemType::OnRidePhoto) { - if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, @@ -159,7 +159,7 @@ GameActions::Result TrackPlaceAction::Query() const } else if (_trackType == TrackElemType::CableLiftHill) { - if (ride->lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, @@ -168,7 +168,7 @@ GameActions::Result TrackPlaceAction::Query() const } // Backwards steep lift hills are allowed, even on roller coasters that do not support forwards steep lift hills. if (_trackPlaceFlags.has(LiftHillAndInverted::liftHill) && !rtd.SupportsTrackGroup(TrackGroup::liftHillSteep) - && !gameState.Cheats.enableChainLiftOnAllTrack) + && !gameState.cheats.enableChainLiftOnAllTrack) { const auto& ted = GetTrackElementDescriptor(_trackType); if (ted.flags & TRACK_ELEM_FLAG_IS_STEEP_UP) @@ -194,7 +194,7 @@ GameActions::Result TrackPlaceAction::Query() const return GameActions::Result( GameActions::Status::InvalidParameters, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_OFF_EDGE_OF_MAP); } - if (!MapIsLocationOwned(tileCoords) && !gameState.Cheats.sandboxMode) + if (!MapIsLocationOwned(tileCoords) && !gameState.cheats.sandboxMode) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, STR_LAND_NOT_OWNED_BY_PARK); @@ -210,7 +210,7 @@ GameActions::Result TrackPlaceAction::Query() const STR_TILE_ELEMENT_LIMIT_REACHED); } - if (!gameState.Cheats.allowTrackPlaceInvalidHeights) + if (!gameState.cheats.allowTrackPlaceInvalidHeights) { if (ted.flags & TRACK_ELEM_FLAG_STARTS_AT_HALF_HEIGHT) { @@ -313,7 +313,7 @@ GameActions::Result TrackPlaceAction::Query() const } } - if (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER && !gameState.Cheats.disableClearanceChecks) + if (clearanceData.GroundFlags & ELEMENT_IS_UNDERWATER && !gameState.cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_RIDE_CONSTRUCTION_CANT_CONSTRUCT_THIS_HERE, @@ -379,7 +379,7 @@ GameActions::Result TrackPlaceAction::Query() const STR_ERR_SURFACE_ELEMENT_NOT_FOUND); } - if (!gameState.Cheats.disableSupportLimits) + if (!gameState.cheats.disableSupportLimits) { int32_t ride_height = clearanceZ - surfaceElement->GetBaseZ(); if (ride_height >= 0) @@ -450,7 +450,7 @@ GameActions::Result TrackPlaceAction::Execute() const auto resultData = TrackPlaceActionResult{}; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); const auto& ted = GetTrackElementDescriptor(_trackType); @@ -504,8 +504,8 @@ GameActions::Result TrackPlaceAction::Execute() const } } - auto& gameState = GetGameState(); - if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST) && !gameState.Cheats.disableClearanceChecks) + auto& gameState = getGameState(); + if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST) && !gameState.cheats.disableClearanceChecks) { FootpathRemoveLitter(mapLoc); if (rtd.HasFlag(RtdFlag::noWallsAroundTrack)) @@ -560,7 +560,7 @@ GameActions::Result TrackPlaceAction::Execute() const supportCosts += (supportHeight / (2 * kCoordsZStep)) * rtd.BuildCosts.SupportPrice; int32_t entranceDirections = 0; - if (!ride->overall_view.IsNull()) + if (!ride->overallView.IsNull()) { if (!(GetFlags() & GAME_COMMAND_FLAG_NO_SPEND)) { @@ -568,9 +568,9 @@ GameActions::Result TrackPlaceAction::Execute() const } } - if (entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN || ride->overall_view.IsNull()) + if (entranceDirections & TRACK_SEQUENCE_FLAG_ORIGIN || ride->overallView.IsNull()) { - ride->overall_view = mapLoc; + ride->overallView = mapLoc; } auto* trackElement = TileElementInsert(mapLoc, quarterTile.GetBaseQuarterOccupied()); @@ -639,7 +639,7 @@ GameActions::Result TrackPlaceAction::Execute() const uint32_t availableDirections = entranceDirections & 0x0F; if (availableDirections != 0) { - if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST) && !gameState.Cheats.disableClearanceChecks) + if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST) && !gameState.cheats.disableClearanceChecks) { for (int32_t chosenDirection = Numerics::bitScanForward(availableDirections); chosenDirection != -1; chosenDirection = Numerics::bitScanForward(availableDirections)) @@ -665,8 +665,8 @@ GameActions::Result TrackPlaceAction::Execute() const { TrackAddStationElement({ mapLoc, _origin.direction }, _rideIndex, GAME_COMMAND_FLAG_APPLY, _fromTrackDesign); } - ride->ValidateStations(); - ride->UpdateMaxVehicles(); + ride->validateStations(); + ride->updateMaxVehicles(); } auto* tileElement = trackElement->as(); @@ -681,7 +681,7 @@ GameActions::Result TrackPlaceAction::Execute() const } } - if (!gameState.Cheats.disableClearanceChecks || !(GetFlags() & GAME_COMMAND_FLAG_GHOST)) + if (!gameState.cheats.disableClearanceChecks || !(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { FootpathConnectEdges(mapLoc, tileElement, GetFlags()); } @@ -695,27 +695,27 @@ GameActions::Result TrackPlaceAction::Execute() const switch (_trackType) { case TrackElemType::OnRidePhoto: - ride->lifecycle_flags |= RIDE_LIFECYCLE_ON_RIDE_PHOTO; + ride->lifecycleFlags |= RIDE_LIFECYCLE_ON_RIDE_PHOTO; break; case TrackElemType::CableLiftHill: - ride->lifecycle_flags |= RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED; - ride->CableLiftLoc = originLocation; + ride->lifecycleFlags |= RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED; + ride->cableLiftLoc = originLocation; break; case TrackElemType::DiagBlockBrakes: case TrackElemType::BlockBrakes: { - ride->num_block_brakes++; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_OPERATING; + ride->numBlockBrakes++; + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_OPERATING; // change the current mode to its circuit blocked equivalent - RideMode newMode = RideMode::ContinuousCircuitBlockSectioned; - if (ride->mode == RideMode::PoweredLaunch) + RideMode newMode = RideMode::continuousCircuitBlockSectioned; + if (ride->mode == RideMode::poweredLaunch) { - if (rtd.SupportsRideMode(RideMode::PoweredLaunchBlockSectioned) - || GetGameState().Cheats.showAllOperatingModes) - newMode = RideMode::PoweredLaunchBlockSectioned; + if (rtd.SupportsRideMode(RideMode::poweredLaunchBlockSectioned) + || getGameState().cheats.showAllOperatingModes) + newMode = RideMode::poweredLaunchBlockSectioned; else - newMode = RideMode::PoweredLaunch; + newMode = RideMode::poweredLaunch; } auto rideSetSetting = RideSetSettingAction(ride->id, RideSetSetting::Mode, static_cast(newMode)); @@ -736,7 +736,7 @@ GameActions::Result TrackPlaceAction::Execute() const break; [[fallthrough]]; case TrackElemType::CableLiftHill: - ride->num_block_brakes++; + ride->numBlockBrakes++; break; default: break; diff --git a/src/openrct2/actions/TrackRemoveAction.cpp b/src/openrct2/actions/TrackRemoveAction.cpp index 5191487256..b2bc9a3746 100644 --- a/src/openrct2/actions/TrackRemoveAction.cpp +++ b/src/openrct2/actions/TrackRemoveAction.cpp @@ -240,14 +240,14 @@ GameActions::Result TrackRemoveAction::Query() const _support_height = 10; } - supportCosts += (_support_height / 2) * ride->GetRideTypeDescriptor().BuildCosts.SupportPrice; + supportCosts += (_support_height / 2) * ride->getRideTypeDescriptor().BuildCosts.SupportPrice; } - money64 price = ride->GetRideTypeDescriptor().BuildCosts.TrackPrice; + money64 price = ride->getRideTypeDescriptor().BuildCosts.TrackPrice; price *= ted.priceModifier; price >>= 16; price = supportCosts + price; - if (ride->lifecycle_flags & RIDE_LIFECYCLE_EVER_BEEN_OPENED) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_EVER_BEEN_OPENED) { // 70% modifier for opened rides price = (price * 45875) / 65536; @@ -416,7 +416,7 @@ GameActions::Result TrackRemoveAction::Execute() const _support_height = 10; } - supportCosts += (_support_height / 2) * ride->GetRideTypeDescriptor().BuildCosts.SupportPrice; + supportCosts += (_support_height / 2) * ride->getRideTypeDescriptor().BuildCosts.SupportPrice; // If the removed tile is a station modify station properties. // Don't do this if the ride is simulating and the tile is a ghost to prevent desyncs. @@ -433,22 +433,22 @@ GameActions::Result TrackRemoveAction::Execute() const } } - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::trackMustBeOnWater)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::trackMustBeOnWater)) { surfaceElement->SetHasTrackThatNeedsWater(false); } InvalidateTestResults(*ride); FootpathQueueChainReset(); - if (!GetGameState().Cheats.disableClearanceChecks || !(tileElement->IsGhost())) + if (!getGameState().cheats.disableClearanceChecks || !(tileElement->IsGhost())) { FootpathRemoveEdgesAt(mapLoc, tileElement); } TileElementRemove(tileElement); - ride->ValidateStations(); + ride->validateStations(); if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST)) { - ride->UpdateMaxVehicles(); + ride->updateMaxVehicles(); } } @@ -457,21 +457,21 @@ GameActions::Result TrackRemoveAction::Execute() const switch (trackType) { case TrackElemType::OnRidePhoto: - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_ON_RIDE_PHOTO; + ride->lifecycleFlags &= ~RIDE_LIFECYCLE_ON_RIDE_PHOTO; break; case TrackElemType::CableLiftHill: - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED; + ride->lifecycleFlags &= ~RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED; break; case TrackElemType::BlockBrakes: case TrackElemType::DiagBlockBrakes: - ride->num_block_brakes--; - if (ride->num_block_brakes == 0) + ride->numBlockBrakes--; + if (ride->numBlockBrakes == 0) { - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_OPERATING; - RideMode newMode = RideMode::ContinuousCircuit; - if (ride->mode == RideMode::PoweredLaunchBlockSectioned) + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_OPERATING; + RideMode newMode = RideMode::continuousCircuit; + if (ride->mode == RideMode::poweredLaunchBlockSectioned) { - newMode = RideMode::PoweredLaunch; + newMode = RideMode::poweredLaunch; } auto rideSetSetting = RideSetSettingAction(ride->id, RideSetSetting::Mode, static_cast(newMode)); @@ -493,18 +493,18 @@ GameActions::Result TrackRemoveAction::Execute() const break; [[fallthrough]]; case TrackElemType::CableLiftHill: - ride->num_block_brakes--; + ride->numBlockBrakes--; break; default: break; } } - money64 price = ride->GetRideTypeDescriptor().BuildCosts.TrackPrice; + money64 price = ride->getRideTypeDescriptor().BuildCosts.TrackPrice; price *= ted.priceModifier; price >>= 16; price = supportCosts + price; - if (ride->lifecycle_flags & RIDE_LIFECYCLE_EVER_BEEN_OPENED) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_EVER_BEEN_OPENED) { // 70% modifier for opened rides price = (price * 45875) / 65536; diff --git a/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp b/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp index ba362afdb1..9ef8b09c75 100644 --- a/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp +++ b/src/openrct2/actions/TrackSetBrakeSpeedAction.cpp @@ -11,6 +11,7 @@ #include "../Diagnostic.h" #include "../management/Finance.h" +#include "../ride/RideConstruction.h" #include "../world/tile_element/TrackElement.h" using namespace OpenRCT2; @@ -82,7 +83,7 @@ GameActions::Result TrackSetBrakeSpeedAction::QueryExecute(bool isExecuting) con { GetTrackElementOriginAndApplyChanges( { _loc, tileElement->GetDirection() }, tileElement->AsTrack()->GetTrackType(), _brakeSpeed, nullptr, - TRACK_ELEMENT_SET_BRAKE_BOOSTER_SPEED); + { TrackElementSetFlag::brakeBoosterSpeed }); } return res; } diff --git a/src/openrct2/actions/WallPlaceAction.cpp b/src/openrct2/actions/WallPlaceAction.cpp index 158067f1a5..373ac29003 100644 --- a/src/openrct2/actions/WallPlaceAction.cpp +++ b/src/openrct2/actions/WallPlaceAction.cpp @@ -89,10 +89,10 @@ GameActions::Result WallPlaceAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_OFF_EDGE_OF_MAP); } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto mapSizeMax = GetMapSizeMaxXY(); - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) - && !gameState.Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) + && !gameState.cheats.sandboxMode) { if (_loc.z == 0) { @@ -151,14 +151,14 @@ GameActions::Result WallPlaceAction::Query() const { uint16_t waterHeight = surfaceElement->GetWaterHeight(); - if (targetHeight < waterHeight && !gameState.Cheats.disableClearanceChecks) + if (targetHeight < waterHeight && !gameState.cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, STR_CANT_BUILD_THIS_UNDERWATER); } } - if (targetHeight < surfaceElement->GetBaseZ() && !gameState.Cheats.disableClearanceChecks) + if (targetHeight < surfaceElement->GetBaseZ() && !gameState.cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND); @@ -171,7 +171,7 @@ GameActions::Result WallPlaceAction::Query() const newBaseHeight += 2; if (surfaceElement->GetSlope() & (1 << newEdge)) { - if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.disableClearanceChecks) + if (targetHeight / 8 < newBaseHeight && !gameState.cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND); @@ -187,7 +187,7 @@ GameActions::Result WallPlaceAction::Query() const if (surfaceElement->GetSlope() & (1 << newEdge)) { newBaseHeight += 2; - if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.disableClearanceChecks) + if (targetHeight / 8 < newBaseHeight && !gameState.cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, @@ -202,7 +202,7 @@ GameActions::Result WallPlaceAction::Query() const newEdge = (_edge + 3) & 3; if (surfaceElement->GetSlope() & (1 << newEdge)) { - if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.disableClearanceChecks) + if (targetHeight / 8 < newBaseHeight && !gameState.cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, STR_CAN_ONLY_BUILD_THIS_ABOVE_GROUND); @@ -218,7 +218,7 @@ GameActions::Result WallPlaceAction::Query() const if (surfaceElement->GetSlope() & (1 << newEdge)) { newBaseHeight += 2; - if (targetHeight / 8 < newBaseHeight && !gameState.Cheats.disableClearanceChecks) + if (targetHeight / 8 < newBaseHeight && !gameState.cheats.disableClearanceChecks) { return GameActions::Result( GameActions::Status::Disallowed, STR_CANT_BUILD_THIS_HERE, @@ -261,7 +261,7 @@ GameActions::Result WallPlaceAction::Query() const clearanceHeight += wallEntry->height; bool wallAcrossTrack = false; - if (!(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) && !gameState.Cheats.disableClearanceChecks) + if (!(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) && !gameState.cheats.disableClearanceChecks) { auto result = WallCheckObstruction(wallEntry, targetHeight / 8, clearanceHeight, &wallAcrossTrack); if (result.Error != GameActions::Status::Ok) @@ -286,7 +286,7 @@ GameActions::Result WallPlaceAction::Query() const GameActions::Result WallPlaceAction::Execute() const { auto res = GameActions::Result(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); res.ErrorTitle = STR_CANT_BUILD_THIS_HERE; res.Position = _loc; @@ -339,7 +339,7 @@ GameActions::Result WallPlaceAction::Execute() const clearanceHeight += wallEntry->height; bool wallAcrossTrack = false; - if (!(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) && !gameState.Cheats.disableClearanceChecks) + if (!(GetFlags() & GAME_COMMAND_FLAG_TRACK_DESIGN) && !gameState.cheats.disableClearanceChecks) { auto result = WallCheckObstruction(wallEntry, targetHeight / kCoordsZStep, clearanceHeight, &wallAcrossTrack); if (result.Error != GameActions::Status::Ok) @@ -439,7 +439,7 @@ bool WallPlaceAction::WallCheckObstructionWithTrack( return false; } - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::allowDoorsOnTrack)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::allowDoorsOnTrack)) { return false; } diff --git a/src/openrct2/actions/WallPlaceAction.h b/src/openrct2/actions/WallPlaceAction.h index 1581221be4..620aabf20e 100644 --- a/src/openrct2/actions/WallPlaceAction.h +++ b/src/openrct2/actions/WallPlaceAction.h @@ -28,7 +28,7 @@ class WallPlaceAction final : public GameActionBase private: ObjectEntryIndex _wallType{ kObjectEntryIndexNull }; CoordsXYZ _loc; - Direction _edge{ INVALID_DIRECTION }; + Direction _edge{ kInvalidDirection }; int32_t _primaryColour{ COLOUR_BLACK }; int32_t _secondaryColour{ COLOUR_BLACK }; int32_t _tertiaryColour{ COLOUR_BLACK }; diff --git a/src/openrct2/actions/WallRemoveAction.cpp b/src/openrct2/actions/WallRemoveAction.cpp index e1f32726f2..ec1bba608b 100644 --- a/src/openrct2/actions/WallRemoveAction.cpp +++ b/src/openrct2/actions/WallRemoveAction.cpp @@ -50,7 +50,7 @@ GameActions::Result WallRemoveAction::Query() const } const bool isGhost = GetFlags() & GAME_COMMAND_FLAG_GHOST; - if (!isGhost && !(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode + if (!isGhost && gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode && !MapIsLocationOwned(_loc)) { return GameActions::Result(GameActions::Status::NotOwned, STR_CANT_REMOVE_THIS, STR_LAND_NOT_OWNED_BY_PARK); diff --git a/src/openrct2/actions/WallSetColourAction.cpp b/src/openrct2/actions/WallSetColourAction.cpp index 7293988486..cf77121e42 100644 --- a/src/openrct2/actions/WallSetColourAction.cpp +++ b/src/openrct2/actions/WallSetColourAction.cpp @@ -67,7 +67,7 @@ GameActions::Result WallSetColourAction::Query() const return GameActions::Result(GameActions::Status::InvalidParameters, STR_CANT_REPAINT_THIS, STR_OFF_EDGE_OF_MAP); } - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !MapIsLocationInPark(_loc) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !MapIsLocationInPark(_loc) && !getGameState().cheats.sandboxMode) { return GameActions::Result(GameActions::Status::NotOwned, STR_CANT_REPAINT_THIS, STR_LAND_NOT_OWNED_BY_PARK); } diff --git a/src/openrct2/actions/WaterLowerAction.cpp b/src/openrct2/actions/WaterLowerAction.cpp index a25f4be1b3..656e0cce08 100644 --- a/src/openrct2/actions/WaterLowerAction.cpp +++ b/src/openrct2/actions/WaterLowerAction.cpp @@ -80,7 +80,7 @@ GameActions::Result WaterLowerAction::QueryExecute(bool isExecuting) const if (surfaceElement == nullptr) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { @@ -126,7 +126,7 @@ GameActions::Result WaterLowerAction::QueryExecute(bool isExecuting) const Audio::Play3D(Audio::SoundId::LayingOutWater, res.Position); } // Force ride construction to recheck area - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_RECHECK; + _currentTrackSelectionFlags.set(TrackSelectionFlag::recheck); return res; } @@ -139,7 +139,7 @@ uint8_t WaterLowerAction::GetLowestHeight(const MapRange& validRange) const { for (int32_t x = validRange.GetLeft(); x <= validRange.GetRight(); x += kCoordsXYStep) { - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { diff --git a/src/openrct2/actions/WaterRaiseAction.cpp b/src/openrct2/actions/WaterRaiseAction.cpp index 68b51702a8..5cc656699f 100644 --- a/src/openrct2/actions/WaterRaiseAction.cpp +++ b/src/openrct2/actions/WaterRaiseAction.cpp @@ -80,7 +80,7 @@ GameActions::Result WaterRaiseAction::QueryExecute(bool isExecuting) const if (surfaceElement == nullptr) continue; - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { @@ -139,7 +139,7 @@ GameActions::Result WaterRaiseAction::QueryExecute(bool isExecuting) const OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::LayingOutWater, res.Position); } // Force ride construction to recheck area - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_RECHECK; + _currentTrackSelectionFlags.set(TrackSelectionFlag::recheck); return res; } @@ -152,7 +152,7 @@ uint16_t WaterRaiseAction::GetHighestHeight(const MapRange& validRange) const { for (int32_t x = validRange.GetLeft(); x <= validRange.GetRight(); x += kCoordsXYStep) { - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ x, y })) { diff --git a/src/openrct2/actions/WaterSetHeightAction.cpp b/src/openrct2/actions/WaterSetHeightAction.cpp index 1940e75885..64dd87c871 100644 --- a/src/openrct2/actions/WaterSetHeightAction.cpp +++ b/src/openrct2/actions/WaterSetHeightAction.cpp @@ -51,9 +51,9 @@ GameActions::Result WaterSetHeightAction::Query() const res.Expenditure = ExpenditureType::Landscaping; res.Position = { _coords, _height * kCoordsZStep }; - auto& gameState = GetGameState(); - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode - && gameState.Park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) + auto& gameState = getGameState(); + if (gLegacyScene != LegacyScene::scenarioEditor && !gameState.cheats.sandboxMode + && gameState.park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) { return GameActions::Result(GameActions::Status::Disallowed, kStringIdNone, STR_FORBIDDEN_BY_THE_LOCAL_AUTHORITY); } @@ -69,7 +69,7 @@ GameActions::Result WaterSetHeightAction::Query() const return GameActions::Result(GameActions::Status::NotOwned, kStringIdNone, STR_LAND_NOT_OWNED_BY_PARK); } - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gameState.Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !gameState.cheats.sandboxMode) { if (!MapIsLocationInPark(_coords)) { @@ -121,7 +121,7 @@ GameActions::Result WaterSetHeightAction::Execute() const int32_t surfaceHeight = TileElementHeight(_coords); FootpathRemoveLitter({ _coords, surfaceHeight }); - if (!GetGameState().Cheats.disableClearanceChecks) + if (!getGameState().cheats.disableClearanceChecks) WallRemoveAtZ({ _coords, surfaceHeight }); SurfaceElement* surfaceElement = MapGetSurfaceElementAt(_coords); diff --git a/src/openrct2/audio/Audio.cpp b/src/openrct2/audio/Audio.cpp index f8691c7327..450185930f 100644 --- a/src/openrct2/audio/Audio.cpp +++ b/src/openrct2/audio/Audio.cpp @@ -189,14 +189,12 @@ namespace OpenRCT2::Audio uint32_t sampleIndex = EnumValue(id); if (id >= SoundId::LiftRMC) { - audioObject = static_cast( - objManager.GetLoadedObject(ObjectType::audio, _soundsAdditionalAudioObjectEntryIndex)); + audioObject = objManager.GetLoadedObject(_soundsAdditionalAudioObjectEntryIndex); sampleIndex -= EnumValue(SoundId::LiftRMC); } else { - audioObject = static_cast( - objManager.GetLoadedObject(ObjectType::audio, _soundsAudioObjectEntryIndex)); + audioObject = objManager.GetLoadedObject(_soundsAudioObjectEntryIndex); } return std::make_tuple(audioObject, sampleIndex); } @@ -255,7 +253,7 @@ namespace OpenRCT2::Audio static bool IsRCT1TitleMusicAvailable() { auto env = GetContext()->GetPlatformEnvironment(); - auto rct1path = env->GetDirectoryPath(DIRBASE::RCT1); + auto rct1path = env->GetDirectoryPath(DirBase::rct1); return !rct1path.empty(); } @@ -294,7 +292,7 @@ namespace OpenRCT2::Audio void PlayTitleMusic() { - if (gGameSoundsOff || !(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) || IntroIsPlaying()) + if (gGameSoundsOff || gLegacyScene != LegacyScene::titleSequence || IntroIsPlaying()) { StopTitleMusic(); return; @@ -322,15 +320,20 @@ namespace OpenRCT2::Audio } } - void StopAll() + void StopSFX() { - StopTitleMusic(); StopVehicleSounds(); - RideAudio::StopAllChannels(); PeepStopCrowdNoise(); ClimateStopWeatherSound(); } + void StopAll() + { + StopSFX(); + StopTitleMusic(); + RideAudio::StopAllChannels(); + } + int32_t GetDeviceCount() { return static_cast(_audioDevices.size()); @@ -363,7 +366,7 @@ namespace OpenRCT2::Audio if (_titleAudioObjectEntryIndex != kObjectEntryIndexNull) { auto& objManager = GetContext()->GetObjectManager(); - auto* obj = objManager.GetLoadedObject(ObjectType::audio, _titleAudioObjectEntryIndex); + auto* obj = objManager.GetLoadedObject(_titleAudioObjectEntryIndex); if (obj != nullptr) { objManager.UnloadObjects({ obj->GetDescriptor() }); @@ -417,11 +420,7 @@ namespace OpenRCT2::Audio void Pause() { gGameSoundsOff = true; - StopVehicleSounds(); - RideAudio::StopAllChannels(); - PeepStopCrowdNoise(); - ClimateStopWeatherSound(); - StopTitleMusic(); + StopAll(); } void Resume() diff --git a/src/openrct2/audio/Audio.h b/src/openrct2/audio/Audio.h index bb20663922..7a46a82c27 100644 --- a/src/openrct2/audio/Audio.h +++ b/src/openrct2/audio/Audio.h @@ -169,6 +169,16 @@ namespace OpenRCT2::Audio */ const std::string& GetDeviceName(int32_t index); + /** + * Stops all sound effects. + */ + void StopSFX(); + + /** + * Stops all sound. + */ + void StopAll(); + /** * Returns the currently used device index, -1 if not available. */ @@ -200,7 +210,7 @@ namespace OpenRCT2::Audio void InitRideSounds(int32_t device); /** - * Temporarily stops playing sounds until audio_unpause_sounds() is called. + * Temporarily stops playing sounds until Resume() is called. * rct2: 0x006BABB4 */ void Pause(); @@ -217,9 +227,7 @@ namespace OpenRCT2::Audio /** * Plays the specified sound at a virtual location. * @param soundId The sound effect to play. - * @param x The x coordinate of the location. - * @param y The y coordinate of the location. - * @param z The z coordinate of the location. + * @param loc The coordinates of the location. */ void Play3D(SoundId soundId, const CoordsXYZ& loc); @@ -253,15 +261,11 @@ namespace OpenRCT2::Audio void ToggleAllSounds(); /** - * Resumes playing sounds that had been paused by a call to audio_pause_sounds(). + * Resumes playing sounds that had been paused by a call to Pause(). * rct2: 0x006BABD8 */ void Resume(); - void StopAll(); - - AudioObject* GetBaseAudioObject(); - std::shared_ptr CreateAudioChannel( SoundId soundId, bool loop = false, int32_t volume = kMixerVolumeMax, float pan = 0.5f, double rate = 1, bool forget = false); diff --git a/src/openrct2/command_line/ConvertCommand.cpp b/src/openrct2/command_line/ConvertCommand.cpp index 1013dc538a..35d6289be2 100644 --- a/src/openrct2/command_line/ConvertCommand.cpp +++ b/src/openrct2/command_line/ConvertCommand.cpp @@ -16,7 +16,6 @@ #include "../core/Path.hpp" #include "../object/ObjectManager.h" #include "../park/ParkFile.h" -#include "../scenario/Scenario.h" #include "../ui/WindowManager.h" #include "CommandLine.hpp" @@ -93,12 +92,12 @@ exitcode_t CommandLine::HandleCommandConvert(CommandLineArgEnumerator* enumerato context->Initialise(); auto& objManager = context->GetObjectManager(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); try { auto importer = ParkImporter::Create(sourcePath); - auto loadResult = importer->Load(sourcePath.c_str()); + auto loadResult = importer->Load(sourcePath.c_str(), false); objManager.LoadObjects(loadResult.RequiredObjects); diff --git a/src/openrct2/command_line/ParkInfoCommands.cpp b/src/openrct2/command_line/ParkInfoCommands.cpp index bd7678415f..2c74873f76 100644 --- a/src/openrct2/command_line/ParkInfoCommands.cpp +++ b/src/openrct2/command_line/ParkInfoCommands.cpp @@ -55,7 +55,7 @@ static exitcode_t HandleObjectsInfo(CommandLineArgEnumerator* argEnumerator) auto context = OpenRCT2::CreateContext(); context->Initialise(); - auto stream = OpenRCT2::FileStream(sourcePath, OpenRCT2::FILE_MODE_OPEN); + auto stream = OpenRCT2::FileStream(sourcePath, OpenRCT2::FileMode::open); ClassifiedFileInfo info; if (!TryClassifyFile(&stream, &info)) { @@ -63,7 +63,7 @@ static exitcode_t HandleObjectsInfo(CommandLineArgEnumerator* argEnumerator) return EXITCODE_FAIL; } - if (info.Type != FILE_TYPE::PARK && info.Type != FILE_TYPE::SAVED_GAME && info.Type != FILE_TYPE::SCENARIO) + if (info.Type != FileType::park && info.Type != FileType::savedGame && info.Type != FileType::scenario) { Console::Error::WriteLine("Invalid file type."); return EXITCODE_FAIL; @@ -71,7 +71,7 @@ static exitcode_t HandleObjectsInfo(CommandLineArgEnumerator* argEnumerator) auto& objectRepository = context->GetObjectRepository(); std::unique_ptr parkImporter; - if (info.Type == FILE_TYPE::PARK) + if (info.Type == FileType::park) { parkImporter = ParkImporter::CreateParkFile(objectRepository); } diff --git a/src/openrct2/command_line/RootCommands.cpp b/src/openrct2/command_line/RootCommands.cpp index d9325ae468..4f5b964c43 100644 --- a/src/openrct2/command_line/RootCommands.cpp +++ b/src/openrct2/command_line/RootCommands.cpp @@ -373,7 +373,7 @@ static exitcode_t HandleCommandSetRCT2(CommandLineArgEnumerator* enumerator) // Update RCT2 path in config auto env = OpenRCT2::CreatePlatformEnvironment(); - auto configPath = env->GetFilePath(OpenRCT2::PATHID::CONFIG); + auto configPath = env->GetFilePath(OpenRCT2::PathId::config); Config::SetDefaults(); Config::OpenFromPath(configPath); Config::Get().general.RCT2Path = path; diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index b6a03abf35..a76719edf3 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -124,6 +124,11 @@ namespace OpenRCT2::Config ConfigEnumEntry("GLASSY", VirtualFloorStyles::Glassy), }); + static const auto Enum_ScenarioSelectMode = ConfigEnum({ + ConfigEnumEntry("ORIGIN", ScenarioSelectMode::origin), + ConfigEnumEntry("DIFFICULTY", ScenarioSelectMode::difficulty), + }); + /** * Config enum wrapping LanguagesDescriptors. */ @@ -224,7 +229,8 @@ namespace OpenRCT2::Config #endif // _DEBUG model->TrapCursor = reader->GetBoolean("trap_cursor", false); model->AutoOpenShops = reader->GetBoolean("auto_open_shops", false); - model->ScenarioSelectMode = reader->GetInt32("scenario_select_mode", SCENARIO_SELECT_MODE_ORIGIN); + model->scenarioSelectMode = reader->GetEnum( + "scenario_select_mode", ScenarioSelectMode::origin, Enum_ScenarioSelectMode); model->ScenarioUnlockingEnabled = reader->GetBoolean("scenario_unlocking_enabled", true); model->ScenarioHideMegaPark = reader->GetBoolean("scenario_hide_mega_park", true); model->LastSaveGameDirectory = reader->GetString("last_game_directory", ""); @@ -258,6 +264,7 @@ namespace OpenRCT2::Config model->FileBrowserHeight = reader->GetInt32("file_browser_height", 0); model->FileBrowserShowSizeColumn = reader->GetBoolean("file_browser_show_size_column", true); model->FileBrowserShowDateColumn = reader->GetBoolean("file_browser_show_date_column", true); + model->FileBrowserShowPreviews = reader->GetBoolean("file_browser_show_previews", true); } } @@ -316,7 +323,7 @@ namespace OpenRCT2::Config writer->WriteBoolean("multithreading", model->MultiThreading); writer->WriteBoolean("trap_cursor", model->TrapCursor); writer->WriteBoolean("auto_open_shops", model->AutoOpenShops); - writer->WriteInt32("scenario_select_mode", model->ScenarioSelectMode); + writer->WriteEnum("scenario_select_mode", model->scenarioSelectMode, Enum_ScenarioSelectMode); writer->WriteBoolean("scenario_unlocking_enabled", model->ScenarioUnlockingEnabled); writer->WriteBoolean("scenario_hide_mega_park", model->ScenarioHideMegaPark); writer->WriteString("last_game_directory", model->LastSaveGameDirectory); @@ -348,6 +355,7 @@ namespace OpenRCT2::Config writer->WriteInt32("file_browser_height", model->FileBrowserHeight); writer->WriteBoolean("file_browser_show_size_column", model->FileBrowserShowSizeColumn); writer->WriteBoolean("file_browser_show_date_column", model->FileBrowserShowDateColumn); + writer->WriteBoolean("file_browser_show_previews", model->FileBrowserShowPreviews); } static void ReadInterface(IIniReader* reader) @@ -639,7 +647,7 @@ namespace OpenRCT2::Config { try { - auto fs = FileStream(path, FILE_MODE_OPEN); + auto fs = FileStream(path, FileMode::open); auto reader = CreateIniReader(&fs); ReadGeneral(reader.get()); ReadInterface(reader.get()); @@ -663,7 +671,7 @@ namespace OpenRCT2::Config auto directory = Path::GetDirectory(path); Path::CreateDirectory(directory); - auto fs = FileStream(path, FILE_MODE_WRITE); + auto fs = FileStream(path, FileMode::write); auto writer = CreateIniWriter(&fs); WriteGeneral(writer.get()); WriteInterface(writer.get()); @@ -747,7 +755,7 @@ namespace OpenRCT2::Config } } - auto discordPath = Platform::GetFolderPath(SPECIAL_FOLDER::RCT2_DISCORD); + auto discordPath = Platform::GetFolderPath(SpecialFolder::rct2Discord); if (!discordPath.empty() && Platform::OriginalGameDataExists(discordPath)) { return discordPath; @@ -769,7 +777,7 @@ namespace OpenRCT2::Config desc.Filters.emplace_back(LanguageGetString(STR_GOG_INSTALLER), "*.exe"); desc.Filters.emplace_back(LanguageGetString(STR_ALL_FILES), "*"); - const auto userHomePath = Platform::GetFolderPath(SPECIAL_FOLDER::USER_HOME); + const auto userHomePath = Platform::GetFolderPath(SpecialFolder::userHome); desc.InitialDirectory = userHomePath; return ContextOpenCommonFileDialog(desc); @@ -811,7 +819,7 @@ namespace OpenRCT2::Config u8string GetDefaultPath() { auto env = GetContext()->GetPlatformEnvironment(); - return Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"config.ini"); + return Path::Combine(env->GetDirectoryPath(DirBase::user), u8"config.ini"); } bool SaveToPath(u8string_view path) @@ -879,10 +887,10 @@ namespace OpenRCT2::Config chosenOption = hdd; } - std::string installPath; + std::vector possibleInstallPaths{}; if (chosenOption == hdd) { - installPath = uiContext->ShowDirectoryDialog(LanguageGetString(STR_PICK_RCT2_DIR)); + possibleInstallPaths.emplace_back(uiContext->ShowDirectoryDialog(LanguageGetString(STR_PICK_RCT2_DIR))); } else if (chosenOption == gog) { @@ -895,7 +903,7 @@ namespace OpenRCT2::Config } const std::string dest = Path::Combine( - GetContext()->GetPlatformEnvironment()->GetDirectoryPath(DIRBASE::CONFIG), "rct2"); + GetContext()->GetPlatformEnvironment()->GetDirectoryPath(DirBase::config), "rct2"); while (true) { @@ -915,17 +923,22 @@ namespace OpenRCT2::Config uiContext->ShowMessageBox(LanguageGetString(STR_NOT_THE_GOG_INSTALLER)); } - installPath = Path::Combine(dest, u8"app"); + // New installer extracts to ‘dest’, old installer installs in ‘dest/app’. + possibleInstallPaths.emplace_back(dest); + possibleInstallPaths.emplace_back(Path::Combine(dest, u8"app")); } - if (installPath.empty()) + if (possibleInstallPaths.empty()) { return false; } - Get().general.RCT2Path = installPath; - if (Platform::OriginalGameDataExists(installPath)) + for (const auto& possiblePath : possibleInstallPaths) { - return true; + if (Platform::OriginalGameDataExists(possiblePath)) + { + Get().general.RCT2Path = possiblePath; + return true; + } } uiContext->ShowMessageBox(FormatStringIDLegacy(STR_COULD_NOT_FIND_AT_PATH, &g1DatPath)); diff --git a/src/openrct2/config/Config.h b/src/openrct2/config/Config.h index 399bb38702..998f9d7204 100644 --- a/src/openrct2/config/Config.h +++ b/src/openrct2/config/Config.h @@ -20,6 +20,8 @@ #undef interface #endif +enum class ScenarioSelectMode : uint8_t; + namespace OpenRCT2::Config { struct General @@ -97,7 +99,7 @@ namespace OpenRCT2::Config bool AutoOpenShops; int32_t DefaultInspectionInterval; int32_t WindowLimit; - int32_t ScenarioSelectMode; + ScenarioSelectMode scenarioSelectMode; bool ScenarioUnlockingEnabled; bool ScenarioHideMegaPark; bool SteamOverlayPause; @@ -121,6 +123,7 @@ namespace OpenRCT2::Config int16_t FileBrowserHeight; bool FileBrowserShowSizeColumn; bool FileBrowserShowDateColumn; + bool FileBrowserShowPreviews; }; struct Interface diff --git a/src/openrct2/core/BackgroundWorker.hpp b/src/openrct2/core/BackgroundWorker.hpp new file mode 100644 index 0000000000..cb35352719 --- /dev/null +++ b/src/openrct2/core/BackgroundWorker.hpp @@ -0,0 +1,325 @@ +/***************************************************************************** + * Copyright (c) 2014-2025 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace OpenRCT2 +{ + namespace Detail + { + template + struct ResultType; + + template + struct ResultType + { + using type = std::invoke_result_t; + }; + + template + struct ResultType + { + using type = std::invoke_result_t; + }; + + class JobBase + { + public: + virtual ~JobBase() = default; + + virtual void run() = 0; + virtual void dispatch() = 0; + + void cancel() + { + _stopSource.store(true); + _valid.store(false); + } + + bool isCompleted() const + { + return _completed.load(); + } + + bool isValid() const + { + return _valid.load(); + } + + protected: + std::atomic_bool _valid{ true }; + std::atomic_bool _completed{ false }; + std::atomic_bool _stopSource{ false }; + }; + + template + class JobImpl final : public JobBase + { + public: + using WorkFunc = std::function; + using CompletionFunc = std::function; + + JobImpl(WorkFunc work, CompletionFunc completion) + : _workFn(std::move(work)) + , _completionFn(std::move(completion)) + { + } + + void run() override + { + if (!_stopSource.load()) + { + _result.emplace(_workFn(_stopSource)); + _completed.store(true); + } + } + + void dispatch() override + { + if (!_stopSource.load() && _completed.load() && _completionFn) + { + _completionFn(std::move(_result.value())); + _valid.store(false); + } + } + + private: + WorkFunc _workFn; + CompletionFunc _completionFn; + std::optional _result; + }; + + template<> + class JobImpl final : public JobBase + { + public: + using WorkFunc = std::function; + using CompletionFunc = std::function; + + JobImpl(WorkFunc work, CompletionFunc completion) + : _workFn(std::move(work)) + , _completionFn(std::move(completion)) + { + } + + void run() override + { + if (!_stopSource.load()) + { + _workFn(_stopSource); + _completed.store(true); + } + } + + void dispatch() override + { + if (!_stopSource.load() && _completed.load() && _completionFn) + { + _completionFn(); + } + } + + private: + WorkFunc _workFn; + CompletionFunc _completionFn; + }; + + } // namespace Detail + + class BackgroundWorker + { + public: + class Job + { + public: + Job() = default; + explicit Job(std::shared_ptr job) + : _jobRef(job) + { + } + + bool isValid() const + { + auto job = _jobRef.lock(); + return job && job->isValid(); + } + + void cancel() + { + if (auto job = _jobRef.lock()) + { + job->cancel(); + } + } + + private: + std::weak_ptr _jobRef; + }; + + public: + BackgroundWorker() + { + const auto threadsAvailable = std::max(std::thread::hardware_concurrency(), 1u); + + // NOTE: We don't want to use all available threads, this is for background work only. + // Adjust the number of threads if needed. + const auto numThreads = std::min(threadsAvailable, 2u); + + for (auto i = 0u; i < numThreads; ++i) + { + _workThreads.emplace_back([this] { processJobs(); }); + } + } + + ~BackgroundWorker() + { + { + std::lock_guard lock(_mtx); + _shouldStop = true; + } + _cv.notify_all(); + for (auto& thread : _workThreads) + { + if (thread.joinable()) + { + thread.join(); + } + } + } + + template + Job addJob(WorkFunc&& work, CompletionFunc&& completion) + { + static_assert( + std::is_invocable_v || std::is_invocable_v, + "Work function must be callable with or without stop_token"); + + constexpr bool expectsToken = std::is_invocable_v; + using Result = typename Detail::ResultType>::type; + + const auto wrappedFunc = [wf = std::forward(work)](std::atomic_bool& token) { + if constexpr (std::is_invocable_v) + { + return wf(token); + } + else + { + return wf(); + } + }; + + if constexpr (std::is_void_v) + { + static_assert(std::is_invocable_v, "Completion function must take no arguments for void work"); + } + else + { + static_assert(std::is_invocable_v, "Completion function must match work result type"); + } + + auto job = std::make_shared>( + std::move(wrappedFunc), std::forward(completion)); + + { + std::lock_guard lock(_mtx); + _jobs.push_back(job); + _pending.push_back(job); + } + _cv.notify_one(); + + return Job(job); + } + + void dispatchCompleted() + { + std::vector> completed; + + { + std::lock_guard lock(_mtx); + _jobs.erase( + std::remove_if( + _jobs.begin(), _jobs.end(), + [&](const auto& job) { + // Check if job is completed and valid + if (job->isCompleted() && job->isValid()) + { + completed.push_back(std::move(job)); + return true; + } + // Remove invalid jobs + if (!job->isValid()) + { + return true; + } + // Keep the job in the list. + return false; + }), + _jobs.end()); + } + + for (auto& job : completed) + { + job->dispatch(); + } + } + + bool empty() const + { + std::lock_guard lock(_mtx); + return _jobs.empty(); + } + + size_t size() const + { + std::lock_guard lock(_mtx); + return _jobs.size(); + } + + private: + void processJobs() + { + while (true) + { + std::shared_ptr job; + { + std::unique_lock lock(_mtx); + _cv.wait(lock, [this] { return !_pending.empty() || _shouldStop; }); + + if (_shouldStop) + { + break; + } + + job = _pending.front(); + _pending.pop_front(); + } + job->run(); + } + } + + mutable std::mutex _mtx; + std::vector _workThreads; + std::condition_variable _cv; + std::atomic_bool _shouldStop{ false }; + std::vector> _jobs; + std::deque> _pending; + }; + +} // namespace OpenRCT2 diff --git a/src/openrct2/core/File.cpp b/src/openrct2/core/File.cpp index c5fcc0b02e..1296e1cba0 100644 --- a/src/openrct2/core/File.cpp +++ b/src/openrct2/core/File.cpp @@ -124,7 +124,7 @@ namespace OpenRCT2::File void WriteAllBytes(u8string_view path, const void* buffer, size_t length) { - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_WRITE); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::write); fs.Write(buffer, length); } diff --git a/src/openrct2/core/FileIndex.hpp b/src/openrct2/core/FileIndex.hpp index 8113f4ec0b..ac22a656a5 100644 --- a/src/openrct2/core/FileIndex.hpp +++ b/src/openrct2/core/FileIndex.hpp @@ -219,7 +219,7 @@ private: try { LOG_VERBOSE("FileIndex:Loading index: '%s'", _indexPath.c_str()); - auto fs = OpenRCT2::FileStream(_indexPath, OpenRCT2::FILE_MODE_OPEN); + auto fs = OpenRCT2::FileStream(_indexPath, OpenRCT2::FileMode::open); // Read header, check if we need to re-scan auto header = fs.ReadValue(); @@ -260,7 +260,7 @@ private: { LOG_VERBOSE("FileIndex:Writing index: '%s'", _indexPath.c_str()); OpenRCT2::Path::CreateDirectory(OpenRCT2::Path::GetDirectory(_indexPath)); - auto fs = OpenRCT2::FileStream(_indexPath, OpenRCT2::FILE_MODE_WRITE); + auto fs = OpenRCT2::FileStream(_indexPath, OpenRCT2::FileMode::write); // Write header FileIndexHeader header; diff --git a/src/openrct2/core/FileScanner.cpp b/src/openrct2/core/FileScanner.cpp index dba2fa71f0..936dbe64f3 100644 --- a/src/openrct2/core/FileScanner.cpp +++ b/src/openrct2/core/FileScanner.cpp @@ -29,15 +29,15 @@ using namespace OpenRCT2; -enum class DIRECTORY_CHILD_TYPE +enum class DirectoryChildType { - DC_DIRECTORY, - DC_FILE, + directory, + file, }; struct DirectoryChild { - DIRECTORY_CHILD_TYPE Type; + DirectoryChildType Type; std::string Name; // Files only @@ -122,7 +122,7 @@ public: else { const DirectoryChild* child = &state->Listing[state->Index]; - if (child->Type == DIRECTORY_CHILD_TYPE::DC_DIRECTORY) + if (child->Type == DirectoryChildType::directory) { if (_recurse) { @@ -233,11 +233,11 @@ private: result.Name = String::toUtf8(child->cFileName); if (child->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { - result.Type = DIRECTORY_CHILD_TYPE::DC_DIRECTORY; + result.Type = DirectoryChildType::directory; } else { - result.Type = DIRECTORY_CHILD_TYPE::DC_FILE; + result.Type = DirectoryChildType::file; result.Size = (static_cast(child->nFileSizeHigh) << 32uLL) | static_cast(child->nFileSizeLow); result.LastModified = (static_cast(child->ftLastWriteTime.dwHighDateTime) << 32uLL) | static_cast(child->ftLastWriteTime.dwLowDateTime); @@ -289,11 +289,11 @@ private: result.Name = std::string(node->d_name); if (node->d_type == DT_DIR) { - result.Type = DIRECTORY_CHILD_TYPE::DC_DIRECTORY; + result.Type = DirectoryChildType::directory; } else { - result.Type = DIRECTORY_CHILD_TYPE::DC_FILE; + result.Type = DirectoryChildType::file; // Get the full path of the file auto path = Path::Combine(directory, node->d_name); @@ -307,7 +307,7 @@ private: if (S_ISDIR(statInfo.st_mode)) { - result.Type = DIRECTORY_CHILD_TYPE::DC_DIRECTORY; + result.Type = DirectoryChildType::directory; } } } @@ -354,7 +354,7 @@ std::vector Path::GetDirectories(const std::string& path) std::vector subDirectories; for (const auto& c : children) { - if (c.Type == DIRECTORY_CHILD_TYPE::DC_DIRECTORY) + if (c.Type == DirectoryChildType::directory) { subDirectories.push_back(c.Name); } diff --git a/src/openrct2/core/FileStream.cpp b/src/openrct2/core/FileStream.cpp index 2be57e3ef7..2a432cb5d9 100644 --- a/src/openrct2/core/FileStream.cpp +++ b/src/openrct2/core/FileStream.cpp @@ -27,37 +27,37 @@ namespace OpenRCT2 { - FileStream::FileStream(const fs::path& path, int32_t fileMode) + FileStream::FileStream(const fs::path& path, FileMode fileMode) : FileStream(path.u8string(), fileMode) { } - FileStream::FileStream(const std::string& path, int32_t fileMode) + FileStream::FileStream(const std::string& path, FileMode fileMode) : FileStream(path.c_str(), fileMode) { } - FileStream::FileStream(std::string_view path, int32_t fileMode) + FileStream::FileStream(std::string_view path, FileMode fileMode) : FileStream(std::string(path), fileMode) { } - FileStream::FileStream(const utf8* path, int32_t fileMode) + FileStream::FileStream(const utf8* path, FileMode fileMode) { const char* mode; switch (fileMode) { - case FILE_MODE_OPEN: + case FileMode::open: mode = "rb"; _canRead = true; _canWrite = false; break; - case FILE_MODE_WRITE: + case FileMode::write: mode = "w+b"; _canRead = true; _canWrite = true; break; - case FILE_MODE_APPEND: + case FileMode::append: mode = "a"; _canRead = false; _canWrite = true; @@ -81,7 +81,7 @@ namespace OpenRCT2 auto modeW = String::toWideChar(mode); _file = _wfopen(pathW.c_str(), modeW.c_str()); #else - if (fileMode == FILE_MODE_OPEN) + if (fileMode == FileMode::open) { struct stat fileStat; // Only allow regular files to be opened as its possible to open directories. diff --git a/src/openrct2/core/FileStream.h b/src/openrct2/core/FileStream.h index 7430566636..2eff04acdd 100644 --- a/src/openrct2/core/FileStream.h +++ b/src/openrct2/core/FileStream.h @@ -14,11 +14,11 @@ namespace OpenRCT2 { - enum + enum class FileMode : uint8_t { - FILE_MODE_OPEN, - FILE_MODE_WRITE, - FILE_MODE_APPEND, + open, + write, + append, }; /** @@ -35,10 +35,10 @@ namespace OpenRCT2 uint64_t _fileSize = 0; public: - FileStream(const fs::path& path, int32_t fileMode); - FileStream(const std::string& path, int32_t fileMode); - FileStream(std::string_view path, int32_t fileMode); - FileStream(const utf8* path, int32_t fileMode); + FileStream(const fs::path& path, FileMode fileMode); + FileStream(const std::string& path, FileMode fileMode); + FileStream(std::string_view path, FileMode fileMode); + FileStream(const utf8* path, FileMode fileMode); ~FileStream() override; bool CanRead() const override; diff --git a/src/openrct2/core/FlagHolder.hpp b/src/openrct2/core/FlagHolder.hpp index 5e2fee481d..8b7a780ebc 100644 --- a/src/openrct2/core/FlagHolder.hpp +++ b/src/openrct2/core/FlagHolder.hpp @@ -16,6 +16,14 @@ struct FlagHolder { THolderType holder{}; + FlagHolder() = default; + + template + constexpr FlagHolder(TTypes... types) + : holder(EnumsToFlags(types...)) + { + } + constexpr void clearAll() { holder = 0; @@ -31,9 +39,35 @@ struct FlagHolder return (holder & EnumToFlag(flag)) != 0; } - constexpr void set(TEnumType flag) + template + [[nodiscard]] constexpr bool hasAny(TTypes... types) const { - holder |= EnumToFlag(flag); + return (holder & EnumsToFlags(types...)) != 0; + } + + template + [[nodiscard]] constexpr bool hasAll(TTypes... types) const + { + return (holder & EnumsToFlags(types...)) == EnumsToFlags(types...); + } + + template + constexpr void set(TTypes... types) + { + holder |= EnumsToFlags(types...); + } + + /** + * For situations where you don’t know upfront whether to set or unset the flag, + * e.g. in game actions where this is passed as a variable. + * Otherwise, use set/unset, which are slightly more efficient. + */ + constexpr void set(TEnumType flag, bool on) + { + if (on) + set(flag); + else + unset(flag); } constexpr void unset(TEnumType flag) @@ -41,8 +75,21 @@ struct FlagHolder holder &= ~EnumToFlag(flag); } + template + constexpr void unset(TTypes... types) + { + holder &= ~EnumsToFlags(types...); + } + constexpr void flip(TEnumType flag) { holder ^= EnumToFlag(flag); } + + constexpr FlagHolder operator|(const FlagHolder& other) const noexcept + { + FlagHolder res = *this; + res.holder |= other.holder; + return res; + } }; diff --git a/src/openrct2/core/Guard.cpp b/src/openrct2/core/Guard.cpp index e602dc8d75..aef1762171 100644 --- a/src/openrct2/core/Guard.cpp +++ b/src/openrct2/core/Guard.cpp @@ -23,17 +23,18 @@ #include #include #include +#include namespace OpenRCT2::Guard { static constexpr const utf8* kAssertionMessage = "An assertion failed, please report this to the OpenRCT2 developers."; // The default behaviour when an assertion is raised. - static ASSERT_BEHAVIOUR _assertBehaviour = + static AssertBehaviour _assertBehaviour = #ifdef _WIN32 - ASSERT_BEHAVIOUR::MESSAGE_BOX + AssertBehaviour::messageBox #else - ASSERT_BEHAVIOUR::CASSERT + AssertBehaviour::cAssert #endif ; @@ -44,16 +45,29 @@ namespace OpenRCT2::Guard static void ForceCrash(); #endif - ASSERT_BEHAVIOUR GetAssertBehaviour() + AssertBehaviour GetAssertBehaviour() { return _assertBehaviour; } - void SetAssertBehaviour(ASSERT_BEHAVIOUR behaviour) + void SetAssertBehaviour(AssertBehaviour behaviour) { _assertBehaviour = behaviour; } + void Assert(bool expression, const std::source_location& location) + { + if (expression) + return; + + std::stringstream messageStream; + messageStream << "Assertion failed in " << location.file_name() << ":" << location.line(); + + std::string message = messageStream.str(); + + Assert(expression, message.c_str()); + } + void Assert(bool expression, const char* message, ...) { va_list args; @@ -85,14 +99,14 @@ namespace OpenRCT2::Guard switch (_assertBehaviour) { - case ASSERT_BEHAVIOUR::ABORT: + case AssertBehaviour::abort: abort(); default: - case ASSERT_BEHAVIOUR::CASSERT: + case AssertBehaviour::cAssert: assert(false); break; #ifdef _WIN32 - case ASSERT_BEHAVIOUR::MESSAGE_BOX: + case AssertBehaviour::messageBox: { // Show message box if we are not building for testing auto buffer = CreateDialogAssertMessage(formattedMessage); diff --git a/src/openrct2/core/Guard.hpp b/src/openrct2/core/Guard.hpp index bcb0b8d254..1160de6ff6 100644 --- a/src/openrct2/core/Guard.hpp +++ b/src/openrct2/core/Guard.hpp @@ -11,15 +11,16 @@ #include #include +#include #include #include #include -enum class ASSERT_BEHAVIOUR +enum class AssertBehaviour { - ABORT, - CASSERT, - MESSAGE_BOX, + abort, + cAssert, + messageBox, }; /** @@ -27,10 +28,11 @@ enum class ASSERT_BEHAVIOUR */ namespace OpenRCT2::Guard { - ASSERT_BEHAVIOUR GetAssertBehaviour(); - void SetAssertBehaviour(ASSERT_BEHAVIOUR behaviour); + AssertBehaviour GetAssertBehaviour(); + void SetAssertBehaviour(AssertBehaviour behaviour); - void Assert(bool expression, const char* message = nullptr, ...); + void Assert(bool expression, const std::source_location& location = std::source_location::current()); + void Assert(bool expression, const char* message, ...); void Assert_VA(bool expression, const char* message, va_list args); void Fail(const char* message = nullptr, ...); void Fail_VA(const char* message, va_list args); diff --git a/src/openrct2/core/Identifier.hpp b/src/openrct2/core/Identifier.hpp index 0ec335f797..9d0190774b 100644 --- a/src/openrct2/core/Identifier.hpp +++ b/src/openrct2/core/Identifier.hpp @@ -9,6 +9,7 @@ #pragma once +#include #include #include @@ -62,43 +63,5 @@ public: return _handle == ValueType::Null; } - constexpr bool operator==(const ValueType other) const noexcept - { - return _handle == other; - } - - constexpr bool operator!=(const ValueType other) const noexcept - { - return _handle != other; - } - - constexpr bool operator==(const TIdentifier& other) const noexcept - { - return _handle == other._handle; - } - - constexpr bool operator!=(const TIdentifier& other) const noexcept - { - return _handle != other._handle; - } - - constexpr bool operator<(const TIdentifier& other) const noexcept - { - return ToUnderlying() < other.ToUnderlying(); - } - - constexpr bool operator<=(const TIdentifier& other) const noexcept - { - return ToUnderlying() <= other.ToUnderlying(); - } - - constexpr bool operator>(const TIdentifier& other) const noexcept - { - return ToUnderlying() > other.ToUnderlying(); - } - - constexpr bool operator>=(const TIdentifier& other) const noexcept - { - return ToUnderlying() >= other.ToUnderlying(); - } + auto operator<=>(const TIdentifier&) const = default; }; diff --git a/src/openrct2/core/Imaging.cpp b/src/openrct2/core/Imaging.cpp index f3c5e93306..24042a0898 100644 --- a/src/openrct2/core/Imaging.cpp +++ b/src/openrct2/core/Imaging.cpp @@ -36,7 +36,7 @@ namespace OpenRCT2::Imaging { static constexpr auto kExceptionImageFormatUnknown = "Unknown image format."; - static std::unordered_map _readerImplementations; + static std::unordered_map _readerImplementations; static void PngReadData(png_structp png_ptr, png_bytep data, png_size_t length) { @@ -259,22 +259,22 @@ namespace OpenRCT2::Imaging } } - IMAGE_FORMAT GetImageFormatFromPath(std::string_view path) + ImageFormat GetImageFormatFromPath(std::string_view path) { if (String::endsWith(path, ".png", true)) { - return IMAGE_FORMAT::PNG; + return ImageFormat::png; } if (String::endsWith(path, ".bmp", true)) { - return IMAGE_FORMAT::BITMAP; + return ImageFormat::bitmap; } - return IMAGE_FORMAT::UNKNOWN; + return ImageFormat::unknown; } - static ImageReaderFunc GetReader(IMAGE_FORMAT format) + static ImageReaderFunc GetReader(ImageFormat format) { auto result = _readerImplementations.find(format); if (result != _readerImplementations.end()) @@ -284,20 +284,20 @@ namespace OpenRCT2::Imaging return {}; } - void SetReader(IMAGE_FORMAT format, ImageReaderFunc impl) + void SetReader(ImageFormat format, ImageReaderFunc impl) { _readerImplementations[format] = impl; } - static Image ReadFromStream(std::istream& istream, IMAGE_FORMAT format) + static Image ReadFromStream(std::istream& istream, ImageFormat format) { switch (format) { - case IMAGE_FORMAT::PNG: + case ImageFormat::png: return ReadPng(istream, false); - case IMAGE_FORMAT::PNG_32: + case ImageFormat::png32: return ReadPng(istream, true); - case IMAGE_FORMAT::AUTOMATIC: + case ImageFormat::automatic: throw std::invalid_argument("format can not be automatic."); default: { @@ -311,11 +311,11 @@ namespace OpenRCT2::Imaging } } - Image ReadFromFile(std::string_view path, IMAGE_FORMAT format) + Image ReadFromFile(std::string_view path, ImageFormat format) { switch (format) { - case IMAGE_FORMAT::AUTOMATIC: + case ImageFormat::automatic: return ReadFromFile(path, GetImageFormatFromPath(path)); default: { @@ -325,20 +325,20 @@ namespace OpenRCT2::Imaging } } - Image ReadFromBuffer(const std::vector& buffer, IMAGE_FORMAT format) + Image ReadFromBuffer(const std::vector& buffer, ImageFormat format) { ivstream istream(buffer); return ReadFromStream(istream, format); } - void WriteToFile(std::string_view path, const Image& image, IMAGE_FORMAT format) + void WriteToFile(std::string_view path, const Image& image, ImageFormat format) { switch (format) { - case IMAGE_FORMAT::AUTOMATIC: + case ImageFormat::automatic: WriteToFile(path, image, GetImageFormatFromPath(path)); break; - case IMAGE_FORMAT::PNG: + case ImageFormat::png: { #ifndef __EMSCRIPTEN__ std::ofstream fs(fs::u8path(path), std::ios::binary); diff --git a/src/openrct2/core/Imaging.h b/src/openrct2/core/Imaging.h index dba0a2f7a9..8a4a7c2ccb 100644 --- a/src/openrct2/core/Imaging.h +++ b/src/openrct2/core/Imaging.h @@ -20,13 +20,13 @@ struct DrawPixelInfo; -enum class IMAGE_FORMAT +enum class ImageFormat { - UNKNOWN, - AUTOMATIC, // Automatically detect from file extension - BITMAP, - PNG, - PNG_32, // Force load to 32bpp buffer + unknown, + automatic, // Automatically detect from file extension + bitmap, + png, + png32, // Force load to 32bpp buffer }; struct Image @@ -42,14 +42,14 @@ struct Image uint32_t Stride{}; }; -using ImageReaderFunc = std::function; +using ImageReaderFunc = std::function; namespace OpenRCT2::Imaging { - IMAGE_FORMAT GetImageFormatFromPath(std::string_view path); - Image ReadFromFile(std::string_view path, IMAGE_FORMAT format = IMAGE_FORMAT::AUTOMATIC); - Image ReadFromBuffer(const std::vector& buffer, IMAGE_FORMAT format = IMAGE_FORMAT::AUTOMATIC); - void WriteToFile(std::string_view path, const Image& image, IMAGE_FORMAT format = IMAGE_FORMAT::AUTOMATIC); + ImageFormat GetImageFormatFromPath(std::string_view path); + Image ReadFromFile(std::string_view path, ImageFormat format = ImageFormat::automatic); + Image ReadFromBuffer(const std::vector& buffer, ImageFormat format = ImageFormat::automatic); + void WriteToFile(std::string_view path, const Image& image, ImageFormat format = ImageFormat::automatic); - void SetReader(IMAGE_FORMAT format, ImageReaderFunc impl); + void SetReader(ImageFormat format, ImageReaderFunc impl); } // namespace OpenRCT2::Imaging diff --git a/src/openrct2/core/Json.cpp b/src/openrct2/core/Json.cpp index b346123249..4912797bfb 100644 --- a/src/openrct2/core/Json.cpp +++ b/src/openrct2/core/Json.cpp @@ -18,7 +18,7 @@ namespace OpenRCT2::Json { json_t ReadFromFile(u8string_view path, size_t maxSize) { - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::open); size_t fileLength = static_cast(fs.GetLength()); if (fileLength > maxSize) @@ -50,7 +50,7 @@ namespace OpenRCT2::Json std::string jsonOutput = jsonData.dump(indentSize); // Write to file - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_WRITE); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::write); fs.Write(jsonOutput.data(), jsonOutput.size()); } diff --git a/src/openrct2/core/SawyerCoding.cpp b/src/openrct2/core/SawyerCoding.cpp index 03d7f1150c..503ed0b69a 100644 --- a/src/openrct2/core/SawyerCoding.cpp +++ b/src/openrct2/core/SawyerCoding.cpp @@ -10,11 +10,12 @@ #include "SawyerCoding.h" #include "../platform/Platform.h" -#include "../scenario/Scenario.h" #include "Numerics.hpp" #include +#include #include +#include #include namespace OpenRCT2::SawyerCoding diff --git a/src/openrct2/core/UnitConversion.cpp b/src/openrct2/core/UnitConversion.cpp index c3cd36d14e..8ed4b2aa6e 100644 --- a/src/openrct2/core/UnitConversion.cpp +++ b/src/openrct2/core/UnitConversion.cpp @@ -62,7 +62,7 @@ namespace OpenRCT2 int32_t ToHumanReadableSpeed(int32_t baseSpeed) { // Divide this value by 29127 to get the human-readable max speed - // (in RCT2, display_speed = (max_speed * 9) >> 18) + // (in RCT2, display_speed = (maxSpeed * 9) >> 18) return (baseSpeed * 9) >> 18; } diff --git a/src/openrct2/core/Zip.cpp b/src/openrct2/core/Zip.cpp index 96ae528b12..30a5e065d3 100644 --- a/src/openrct2/core/Zip.cpp +++ b/src/openrct2/core/Zip.cpp @@ -70,14 +70,14 @@ class ZipArchive final : public IZipArchive { private: zip_t* _zip; - ZIP_ACCESS _access; + ZipAccess _access; std::vector> _writeBuffers; public: - ZipArchive(std::string_view path, ZIP_ACCESS access) + ZipArchive(std::string_view path, ZipAccess access) { auto zipOpenMode = ZIP_RDONLY; - if (access == ZIP_ACCESS::WRITE) + if (access == ZipAccess::write) { zipOpenMode = ZIP_CREATE; } @@ -378,12 +378,12 @@ private: namespace OpenRCT2::Zip { - std::unique_ptr Open(std::string_view path, ZIP_ACCESS access) + std::unique_ptr Open(std::string_view path, ZipAccess access) { return std::make_unique(path, access); } - std::unique_ptr TryOpen(std::string_view path, ZIP_ACCESS access) + std::unique_ptr TryOpen(std::string_view path, ZipAccess access) { std::unique_ptr result; try diff --git a/src/openrct2/core/Zip.h b/src/openrct2/core/Zip.h index 631b39145e..b8c3c656ca 100644 --- a/src/openrct2/core/Zip.h +++ b/src/openrct2/core/Zip.h @@ -49,14 +49,14 @@ struct IZipArchive [[nodiscard]] bool Exists(std::string_view path) const; }; -enum class ZIP_ACCESS +enum class ZipAccess { - READ, - WRITE, + read, + write, }; namespace OpenRCT2::Zip { - [[nodiscard]] std::unique_ptr Open(std::string_view path, ZIP_ACCESS zipAccess); - [[nodiscard]] std::unique_ptr TryOpen(std::string_view path, ZIP_ACCESS zipAccess); + [[nodiscard]] std::unique_ptr Open(std::string_view path, ZipAccess zipAccess); + [[nodiscard]] std::unique_ptr TryOpen(std::string_view path, ZipAccess zipAccess); } // namespace OpenRCT2::Zip diff --git a/src/openrct2/core/ZipAndroid.cpp b/src/openrct2/core/ZipAndroid.cpp index b01c586e46..13fb35b24d 100644 --- a/src/openrct2/core/ZipAndroid.cpp +++ b/src/openrct2/core/ZipAndroid.cpp @@ -28,7 +28,7 @@ private: jobject _zip; public: - ZipArchive(std::string_view path, ZIP_ACCESS access) + ZipArchive(std::string_view path, ZipAccess access) { // retrieve the JNI environment. JNIEnv* env = (JNIEnv*)SDL_AndroidGetJNIEnv(); @@ -139,12 +139,12 @@ public: namespace OpenRCT2::Zip { - std::unique_ptr Open(std::string_view path, ZIP_ACCESS access) + std::unique_ptr Open(std::string_view path, ZipAccess access) { return std::make_unique(path, access); } - std::unique_ptr TryOpen(std::string_view path, ZIP_ACCESS access) + std::unique_ptr TryOpen(std::string_view path, ZipAccess access) { std::unique_ptr result; try diff --git a/src/openrct2/drawing/Drawing.Sprite.cpp b/src/openrct2/drawing/Drawing.Sprite.cpp index 7dd40f7612..9dc66af313 100644 --- a/src/openrct2/drawing/Drawing.Sprite.cpp +++ b/src/openrct2/drawing/Drawing.Sprite.cpp @@ -451,8 +451,8 @@ bool GfxLoadG1(const IPlatformEnvironment& env) LOG_VERBOSE("GfxLoadG1(...)"); try { - auto path = env.FindFile(DIRBASE::RCT2, DIRID::DATA, u8"g1.dat"); - auto fs = FileStream(path, FILE_MODE_OPEN); + auto path = env.FindFile(DirBase::rct2, DirId::data, u8"g1.dat"); + auto fs = FileStream(path, FileMode::open); _g1.header = fs.ReadValue(); LOG_VERBOSE("g1.dat, number of entries: %u", _g1.header.num_entries); @@ -528,11 +528,11 @@ bool GfxLoadG2() auto env = GetContext()->GetPlatformEnvironment(); - std::string path = Path::Combine(env->GetDirectoryPath(DIRBASE::OPENRCT2), u8"g2.dat"); + std::string path = Path::Combine(env->GetDirectoryPath(DirBase::openrct2), u8"g2.dat"); try { - auto fs = FileStream(path, FILE_MODE_OPEN); + auto fs = FileStream(path, FileMode::open); _g2.header = fs.ReadValue(); // Read element headers @@ -601,8 +601,8 @@ bool GfxLoadCsg() auto pathDataPath = FindCsg1datAtLocation(Config::Get().general.RCT1Path); try { - auto fileHeader = FileStream(pathHeaderPath, FILE_MODE_OPEN); - auto fileData = FileStream(pathDataPath, FILE_MODE_OPEN); + auto fileHeader = FileStream(pathHeaderPath, FileMode::open); + auto fileData = FileStream(pathDataPath, FileMode::open); size_t fileHeaderSize = fileHeader.GetLength(); size_t fileDataSize = fileData.GetLength(); diff --git a/src/openrct2/drawing/Drawing.cpp b/src/openrct2/drawing/Drawing.cpp index 6d913a7772..5b6d707a1a 100644 --- a/src/openrct2/drawing/Drawing.cpp +++ b/src/openrct2/drawing/Drawing.cpp @@ -1011,7 +1011,7 @@ void UpdatePaletteEffects() uint32_t shade = 0; if (Config::Get().general.RenderWeatherGloom) { - auto paletteId = ClimateGetWeatherGloomPaletteId(GetGameState().WeatherCurrent); + auto paletteId = ClimateGetWeatherGloomPaletteId(getGameState().weatherCurrent); if (paletteId != FilterPaletteID::PaletteNull) { shade = 1; diff --git a/src/openrct2/drawing/IDrawingEngine.h b/src/openrct2/drawing/IDrawingEngine.h index 1c2c0e0e72..7c132e07c8 100644 --- a/src/openrct2/drawing/IDrawingEngine.h +++ b/src/openrct2/drawing/IDrawingEngine.h @@ -9,8 +9,9 @@ #pragma once -#include "./Weather.h" +#include "../core/FlagHolder.hpp" #include "ColourPalette.h" +#include "Weather.h" #include #include @@ -24,20 +25,19 @@ enum class DrawingEngine : int32_t Count, }; -enum DRAWING_ENGINE_FLAGS +enum DrawingEngineFlag { - DEF_NONE = 0, - /** * Whether or not the engine will only draw changed blocks of the screen each frame. */ - DEF_DIRTY_OPTIMISATIONS = 1 << 0, + dirtyOptimisations, /** * The drawing engine is capable of processing the drawing in parallel. */ - DEF_PARALLEL_DRAWING = 1 << 1, + parallelDrawing = 1 << 1, }; +using DrawingEngineFlags = FlagHolder; struct DrawPixelInfo; @@ -73,7 +73,7 @@ namespace OpenRCT2::Drawing virtual IDrawingContext* GetDrawingContext() = 0; virtual DrawPixelInfo* GetDrawingPixelInfo() = 0; - virtual DRAWING_ENGINE_FLAGS GetFlags() = 0; + virtual DrawingEngineFlags GetFlags() = 0; virtual void InvalidateImage(uint32_t image) = 0; }; diff --git a/src/openrct2/drawing/LightFX.cpp b/src/openrct2/drawing/LightFX.cpp index d0b1e9b392..c2b896a9e2 100644 --- a/src/openrct2/drawing/LightFX.cpp +++ b/src/openrct2/drawing/LightFX.cpp @@ -835,7 +835,7 @@ namespace OpenRCT2::Drawing::LightFx void ApplyPaletteFilter(uint8_t i, uint8_t* r, uint8_t* g, uint8_t* b) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); float night = static_cast(pow(gDayNightCycle, 1.5)); @@ -866,9 +866,9 @@ namespace OpenRCT2::Drawing::LightFx // overExpose += ((lightMax - lightAvg) / lightMax) * 0.01f; - if (gameState.WeatherCurrent.temperature > 20) + if (gameState.weatherCurrent.temperature > 20) { - float offset = (static_cast(gameState.WeatherCurrent.temperature - 20)) * 0.04f; + float offset = (static_cast(gameState.weatherCurrent.temperature - 20)) * 0.04f; offset *= 1.0f - night; lightAvg /= 1.0f + offset; // overExpose += offset * 0.1f; @@ -890,12 +890,12 @@ namespace OpenRCT2::Drawing::LightFx natLightB *= 1.0f + overExpose; overExpose *= 255.0f; - float targetFogginess = static_cast(gameState.WeatherCurrent.level) / 8.0f; + float targetFogginess = static_cast(gameState.weatherCurrent.level) / 8.0f; targetFogginess += (night * night) * 0.15f; - if (gameState.WeatherCurrent.temperature < 10) + if (gameState.weatherCurrent.temperature < 10) { - targetFogginess += (static_cast(10 - gameState.WeatherCurrent.temperature)) * 0.01f; + targetFogginess += (static_cast(10 - gameState.weatherCurrent.temperature)) * 0.01f; } fogginess -= (fogginess - targetFogginess) * 0.00001f; @@ -933,7 +933,7 @@ namespace OpenRCT2::Drawing::LightFx natLightG /= 1.0f + lightPolution; natLightB /= 1.0f + lightPolution; - reduceColourLit += static_cast(gameState.WeatherCurrent.level) / 2.0f; + reduceColourLit += static_cast(gameState.weatherCurrent.level) / 2.0f; reduceColourNat /= 1.0f + fogginess; reduceColourLit /= 1.0f + fogginess; diff --git a/src/openrct2/drawing/NewDrawing.cpp b/src/openrct2/drawing/NewDrawing.cpp index 2277e252da..96e4139116 100644 --- a/src/openrct2/drawing/NewDrawing.cpp +++ b/src/openrct2/drawing/NewDrawing.cpp @@ -128,7 +128,7 @@ bool DrawingEngineHasDirtyOptimisations() auto drawingEngine = GetDrawingEngine(); if (drawingEngine != nullptr) { - result = (drawingEngine->GetFlags() & DEF_DIRTY_OPTIMISATIONS); + result = drawingEngine->GetFlags().has(DrawingEngineFlag::dirtyOptimisations); } return result; } diff --git a/src/openrct2/drawing/Weather.cpp b/src/openrct2/drawing/Weather.cpp index d675cd2d5a..9b426efada 100644 --- a/src/openrct2/drawing/Weather.cpp +++ b/src/openrct2/drawing/Weather.cpp @@ -14,7 +14,6 @@ #include "../config/Config.h" #include "../interface/Viewport.h" #include "../ride/TrackDesign.h" -#include "../scenario/Scenario.h" #include "../ui/UiContext.h" #include "../world/Climate.h" #include "Drawing.h" @@ -54,27 +53,28 @@ const DrawWeatherFunc DrawSnowFunctions[] = { */ void DrawWeather(DrawPixelInfo& dpi, IWeatherDrawer* weatherDrawer) { - if (Config::Get().general.RenderWeatherEffects) + if (!Config::Get().general.RenderWeatherEffects) + return; + + uint32_t viewFlags = 0; + + const auto* viewport = WindowGetViewport(WindowGetMain()); + if (viewport != nullptr) + viewFlags = viewport->flags; + + auto weatherLevel = getGameState().weatherCurrent.level; + if (weatherLevel == WeatherLevel::None || gTrackDesignSaveMode || (viewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) + return; + + // Get weather draw function and draw weather + auto drawFunc = DrawRainFunctions[EnumValue(weatherLevel)]; + if (ClimateIsSnowing() || ClimateTransitioningToSnow()) { - uint32_t viewFlags = 0; - - const auto* viewport = WindowGetViewport(WindowGetMain()); - if (viewport != nullptr) - viewFlags = viewport->flags; - - // Get weather draw function and draw weather - auto weatherLevel = GetGameState().WeatherCurrent.level; - if (weatherLevel != WeatherLevel::None && !gTrackDesignSaveMode && !(viewFlags & VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)) - { - auto drawFunc = DrawRainFunctions[EnumValue(weatherLevel)]; - if (ClimateIsSnowing()) - { - drawFunc = DrawSnowFunctions[EnumValue(weatherLevel)]; - } - auto uiContext = GetContext()->GetUiContext(); - uiContext->DrawWeatherAnimation(weatherDrawer, dpi, drawFunc); - } + drawFunc = DrawSnowFunctions[EnumValue(weatherLevel)]; } + + auto uiContext = GetContext()->GetUiContext(); + uiContext->DrawWeatherAnimation(weatherDrawer, dpi, drawFunc); } /** @@ -84,7 +84,7 @@ void DrawWeather(DrawPixelInfo& dpi, IWeatherDrawer* weatherDrawer) static void DrawLightRain( DrawPixelInfo& dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; int32_t x_start = -static_cast(currentTicks) + 8; int32_t y_start = (currentTicks * 3) + 7; @@ -108,7 +108,7 @@ static void DrawLightRain( static void DrawHeavyRain( DrawPixelInfo& dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; int32_t x_start = -static_cast(currentTicks); int32_t y_start = currentTicks * 5; @@ -142,7 +142,7 @@ static void DrawHeavyRain( static void DrawLightSnow( DrawPixelInfo& dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; const uint32_t t = currentTicks / 2; const int32_t negT = -static_cast(t); @@ -166,7 +166,7 @@ static void DrawLightSnow( static void DrawHeavySnow( DrawPixelInfo& dpi, IWeatherDrawer* weatherDrawer, int32_t left, int32_t top, int32_t width, int32_t height) { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; int32_t x_start = -static_cast(currentTicks * 3) + 1; int32_t y_start = currentTicks + 23; diff --git a/src/openrct2/drawing/X8DrawingEngine.cpp b/src/openrct2/drawing/X8DrawingEngine.cpp index 53def4d799..d6f6002992 100644 --- a/src/openrct2/drawing/X8DrawingEngine.cpp +++ b/src/openrct2/drawing/X8DrawingEngine.cpp @@ -273,9 +273,9 @@ DrawPixelInfo* X8DrawingEngine::GetDrawingPixelInfo() return &_bitsDPI; } -DRAWING_ENGINE_FLAGS X8DrawingEngine::GetFlags() +DrawingEngineFlags X8DrawingEngine::GetFlags() { - return static_cast(DEF_DIRTY_OPTIMISATIONS | DEF_PARALLEL_DRAWING); + return { DrawingEngineFlag::dirtyOptimisations, DrawingEngineFlag::parallelDrawing }; } void X8DrawingEngine::InvalidateImage([[maybe_unused]] uint32_t image) diff --git a/src/openrct2/drawing/X8DrawingEngine.h b/src/openrct2/drawing/X8DrawingEngine.h index ec6e9ab611..d1e3834dab 100644 --- a/src/openrct2/drawing/X8DrawingEngine.h +++ b/src/openrct2/drawing/X8DrawingEngine.h @@ -108,7 +108,7 @@ namespace OpenRCT2 std::string Screenshot() override; IDrawingContext* GetDrawingContext() override; DrawPixelInfo* GetDrawingPixelInfo() override; - DRAWING_ENGINE_FLAGS GetFlags() override; + DrawingEngineFlags GetFlags() override; void InvalidateImage(uint32_t image) override; DrawPixelInfo* GetDPI(); diff --git a/src/openrct2/entity/Duck.cpp b/src/openrct2/entity/Duck.cpp index 7f230aa456..cbcc9116d4 100644 --- a/src/openrct2/entity/Duck.cpp +++ b/src/openrct2/entity/Duck.cpp @@ -13,9 +13,9 @@ #include "../SpriteIds.h" #include "../audio/Audio.h" #include "../core/DataSerialiser.h" +#include "../entity/EntityList.h" #include "../paint/Paint.h" #include "../profiling/Profiling.h" -#include "../scenario/Scenario.h" #include "../world/tile_element/SurfaceElement.h" #include "EntityRegistry.h" @@ -89,7 +89,7 @@ void Duck::Remove() void Duck::UpdateFlyToWater() { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; if ((currentTicks & 3) != 0) return; @@ -153,7 +153,7 @@ void Duck::UpdateFlyToWater() void Duck::UpdateSwim() { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; if (((currentTicks + Id.ToUnderlying()) & 3) != 0) return; @@ -251,7 +251,7 @@ void Duck::UpdateDoubleDrink() void Duck::UpdateFlyAway() { - if ((GetGameState().CurrentTicks & 3) == 0) + if ((getGameState().currentTicks & 3) == 0) { frame++; if (frame >= std::size(kDuckAnimationFlyAway)) diff --git a/src/openrct2/entity/EntityList.h b/src/openrct2/entity/EntityList.h index f8d52f85b7..4fa21bbe10 100644 --- a/src/openrct2/entity/EntityList.h +++ b/src/openrct2/entity/EntityList.h @@ -45,7 +45,7 @@ public: while (iter != end && Entity == nullptr) { - Entity = GetEntity(*iter++); + Entity = TryGetEntity(*iter++); } return *this; } @@ -119,7 +119,7 @@ public: while (iter != end && Entity == nullptr) { - Entity = GetEntity(*iter++); + Entity = TryGetEntity(*iter++); } return *this; } diff --git a/src/openrct2/entity/EntityRegistry.cpp b/src/openrct2/entity/EntityRegistry.cpp index 7791b65977..522aab3cf3 100644 --- a/src/openrct2/entity/EntityRegistry.cpp +++ b/src/openrct2/entity/EntityRegistry.cpp @@ -19,13 +19,13 @@ #include "../core/Guard.hpp" #include "../core/MemoryStream.h" #include "../core/String.hpp" +#include "../entity/EntityList.h" #include "../entity/Peep.h" #include "../entity/Staff.h" #include "../interface/Viewport.h" #include "../peep/RideUseSystem.h" #include "../profiling/Profiling.h" #include "../ride/Vehicle.h" -#include "../scenario/Scenario.h" #include "Balloon.h" #include "Duck.h" #include "EntityTweener.h" @@ -112,9 +112,9 @@ std::string EntitiesChecksum::ToString() const EntityBase* TryGetEntity(EntityId entityIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); const auto idx = entityIndex.ToUnderlying(); - return idx >= kMaxEntities ? nullptr : &gameState.Entities[idx].base; + return idx >= kMaxEntities ? nullptr : &gameState.entities[idx].base; } EntityBase* GetEntity(EntityId entityIndex) @@ -175,8 +175,8 @@ void ResetAllEntities() FreeEntity(*spr); } - auto& gameState = GetGameState(); - std::fill(std::begin(gameState.Entities), std::end(gameState.Entities), Entity_t()); + auto& gameState = getGameState(); + std::fill(std::begin(gameState.entities), std::end(gameState.entities), Entity_t()); OpenRCT2::RideUse::GetHistory().Clear(); OpenRCT2::RideUse::GetTypeHistory().Clear(); for (int32_t i = 0; i < kMaxEntities; ++i) @@ -452,7 +452,7 @@ void UpdateEntitiesSpatialIndex() { for (auto& entityId : entityList) { - auto* entity = GetEntity(entityId); + auto* entity = TryGetEntity(entityId); if (entity == nullptr || entity->Type == EntityType::Null) continue; @@ -475,9 +475,29 @@ CoordsXYZ EntityBase::GetLocation() const void EntityBase::SetLocation(const CoordsXYZ& newLocation) { + if (GetLocation() == newLocation) + { + // No change, this can happen quite often when the entity is interpolated. + return; + } + x = newLocation.x; y = newLocation.y; z = newLocation.z; + + if (SpatialIndex & kSpatialIndexDirtyMask) + { + // Already marked as dirty. + return; + } + + const auto newSpatialIndex = ComputeSpatialIndex({ x, y }); + if (newSpatialIndex == GetSpatialIndex(this)) + { + // Avoid marking it dirty when we don't leave the current tile. + return; + } + SpatialIndex |= kSpatialIndexDirtyMask; } diff --git a/src/openrct2/entity/EntityRegistry.h b/src/openrct2/entity/EntityRegistry.h index 28fb5768d9..69d6aaeeed 100644 --- a/src/openrct2/entity/EntityRegistry.h +++ b/src/openrct2/entity/EntityRegistry.h @@ -29,22 +29,44 @@ namespace OpenRCT2 constexpr uint16_t kMaxEntities = 65535; -EntityBase* GetEntity(EntityId sprite_idx); +EntityBase* GetEntity(EntityId entityId); template -T* GetEntity(EntityId sprite_idx) +T* GetEntity(EntityId entityId) { - auto spr = GetEntity(sprite_idx); - return spr != nullptr ? spr->As() : nullptr; + auto* ent = GetEntity(entityId); + if (ent == nullptr) + { + return nullptr; + } + if constexpr (std::is_same_v) + { + return ent; + } + else + { + return ent->As(); + } } EntityBase* TryGetEntity(EntityId spriteIndex); template -T* TryGetEntity(EntityId sprite_idx) +T* TryGetEntity(EntityId entityId) { - auto spr = TryGetEntity(sprite_idx); - return spr != nullptr ? spr->As() : nullptr; + auto* ent = TryGetEntity(entityId); + if (ent == nullptr) + { + return nullptr; + } + if constexpr (std::is_same_v) + { + return ent; + } + else + { + return ent->As(); + } } EntityBase* CreateEntity(EntityType type); diff --git a/src/openrct2/entity/Fountain.cpp b/src/openrct2/entity/Fountain.cpp index 5f4b6176b4..ad110a1fdd 100644 --- a/src/openrct2/entity/Fountain.cpp +++ b/src/openrct2/entity/Fountain.cpp @@ -15,7 +15,6 @@ #include "../object/PathAdditionEntry.h" #include "../paint/Paint.h" #include "../profiling/Profiling.h" -#include "../scenario/Scenario.h" #include "../world/Footpath.h" #include "../world/Location.hpp" #include "../world/Map.h" @@ -25,16 +24,16 @@ using namespace OpenRCT2; -enum class PATTERN +enum class Pattern { - CYCLIC_SQUARES, - CONTINUOUS_CHASERS, - BOUNCING_PAIRS, - SPROUTING_BLOOMS, - RACING_PAIRS, - SPLITTING_CHASERS, - DOPEY_JUMPERS, - FAST_RANDOM_CHASERS, + cyclicSquares, + continuousChasers, + bouncingPairs, + sproutingBlooms, + racingPairs, + splittingChasers, + dopeyJumpers, + fastRandomChasers, }; static constexpr std::array _fountainDirectionsNegative = { @@ -67,20 +66,20 @@ const uint8_t _fountainDirections[] = { }; // rct2: 0x0097F048 -const uint8_t _fountainDirectionFlags[] = { - 0, 0, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, FOUNTAIN_FLAG::DIRECTION, 0, 0, +const FountainFlags _fountainDirectionFlags[] = { + {}, {}, FountainFlag::direction, FountainFlag::direction, FountainFlag::direction, FountainFlag::direction, {}, {}, }; // rct2: 0x0097F050 -const uint8_t _fountainPatternFlags[] = { - FOUNTAIN_FLAG::TERMINATE, // CYCLIC_SQUARES - FOUNTAIN_FLAG::FAST | FOUNTAIN_FLAG::GOTO_EDGE, // CONTINUOUS_CHASERS - FOUNTAIN_FLAG::BOUNCE, // BOUNCING_PAIRS - FOUNTAIN_FLAG::FAST | FOUNTAIN_FLAG::SPLIT, // SPROUTING_BLOOMS - FOUNTAIN_FLAG::GOTO_EDGE, // RACING_PAIRS - FOUNTAIN_FLAG::FAST | FOUNTAIN_FLAG::GOTO_EDGE | FOUNTAIN_FLAG::SPLIT, // SPLITTING_CHASERS - 0, // DOPEY_JUMPERS - FOUNTAIN_FLAG::FAST, // FAST_RANDOM_CHASERS +const FountainFlags _fountainPatternFlags[] = { + { FountainFlag::terminate }, // cyclicSquares + { FountainFlag::fast, FountainFlag::goToEdge }, // continuousChasers + { FountainFlag::bounce }, // bouncingPairs + { FountainFlag::fast, FountainFlag::split }, // sproutingBlooms + { FountainFlag::goToEdge }, // racingPairs + { FountainFlag::fast, FountainFlag::goToEdge, FountainFlag::split }, // splittingChasers + {}, // dopeyJumpers + { FountainFlag::fast }, // fastRandomChasers }; template<> @@ -91,16 +90,16 @@ bool EntityBase::Is() const void JumpingFountain::StartAnimation(const JumpingFountainType newType, const CoordsXY& newLoc, const TileElement* tileElement) { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; int32_t randomIndex; auto newZ = tileElement->GetBaseZ(); // Change pattern approximately every 51 seconds uint32_t pattern = (currentTicks >> 11) & 7; - switch (static_cast(pattern)) + switch (static_cast(pattern)) { - case PATTERN::CYCLIC_SQUARES: + case Pattern::cyclicSquares: // 0, 1, 2, 3 for (int32_t i = 0; i < kNumOrthogonalDirections; i++) { @@ -109,7 +108,7 @@ void JumpingFountain::StartAnimation(const JumpingFountainType newType, const Co _fountainDirectionFlags[i] | _fountainPatternFlags[pattern], 0); } break; - case PATTERN::BOUNCING_PAIRS: + case Pattern::bouncingPairs: // random [0, 2 or 1, 3] randomIndex = ScenarioRand() & 1; for (int32_t i = randomIndex; i < kNumOrthogonalDirections; i += 2) @@ -119,7 +118,7 @@ void JumpingFountain::StartAnimation(const JumpingFountainType newType, const Co _fountainDirectionFlags[i] | _fountainPatternFlags[pattern], 0); } break; - case PATTERN::RACING_PAIRS: + case Pattern::racingPairs: // random [0 - 3 and 4 - 7] randomIndex = ScenarioRand() & 3; JumpingFountain::Create( @@ -141,14 +140,14 @@ void JumpingFountain::StartAnimation(const JumpingFountainType newType, const Co } void JumpingFountain::Create( - const JumpingFountainType newType, const CoordsXYZ& newLoc, const int32_t direction, const int32_t newFlags, + const JumpingFountainType newType, const CoordsXYZ& newLoc, const int32_t direction, const OpenRCT2::FountainFlags newFlags, const int32_t iteration) { auto* jumpingFountain = CreateEntity(); if (jumpingFountain != nullptr) { jumpingFountain->Iteration = iteration; - jumpingFountain->FountainFlags = newFlags; + jumpingFountain->fountainFlags = newFlags; jumpingFountain->Orientation = direction << 3; jumpingFountain->SpriteData.Width = 33; jumpingFountain->SpriteData.HeightMin = 36; @@ -178,11 +177,11 @@ void JumpingFountain::Update() switch (FountainType) { case JumpingFountainType::Water: - if (frame == 11 && (FountainFlags & FOUNTAIN_FLAG::FAST)) + if (frame == 11 && (fountainFlags.has(FountainFlag::fast))) { AdvanceAnimation(); } - if (frame == 16 && !(FountainFlags & FOUNTAIN_FLAG::FAST)) + if (frame == 16 && !(fountainFlags.has(FountainFlag::fast))) { AdvanceAnimation(); } @@ -228,24 +227,24 @@ void JumpingFountain::AdvanceAnimation() return; } - if (FountainFlags & FOUNTAIN_FLAG::TERMINATE) + if (fountainFlags.has(FountainFlag::terminate)) { return; } - if (FountainFlags & FOUNTAIN_FLAG::GOTO_EDGE) + if (fountainFlags.has(FountainFlag::goToEdge)) { GoToEdge({ newLoc, z }, availableDirections); return; } - if (FountainFlags & FOUNTAIN_FLAG::BOUNCE) + if (fountainFlags.has(FountainFlag::bounce)) { Bounce({ newLoc, z }, availableDirections); return; } - if (FountainFlags & FOUNTAIN_FLAG::SPLIT) + if (fountainFlags.has(FountainFlag::split)) { Split({ newLoc, z }, availableDirections); return; @@ -305,7 +304,7 @@ void JumpingFountain::GoToEdge(const CoordsXYZ& newLoc, const int32_t availableD return; } - if (FountainFlags & FOUNTAIN_FLAG::SPLIT) + if (fountainFlags.has(FountainFlag::split)) { Split(newLoc, availableDirections); return; @@ -354,14 +353,16 @@ void JumpingFountain::Split(const CoordsXYZ& newLoc, int32_t availableDirections { if (availableDirections & (1 << direction)) { - JumpingFountain::Create( - newType, newLoc, direction >> 1, FountainFlags & ~FOUNTAIN_FLAG::DIRECTION, Iteration + 1); + auto copiedFlags = fountainFlags; + copiedFlags.unset(FountainFlag::direction); + JumpingFountain::Create(newType, newLoc, direction >> 1, copiedFlags, Iteration + 1); } direction++; if (availableDirections & (1 << direction)) { - JumpingFountain::Create( - newType, newLoc, direction >> 1, FountainFlags | FOUNTAIN_FLAG::DIRECTION, Iteration + 1); + auto copiedFlags = fountainFlags; + copiedFlags.set(FountainFlag::direction); + JumpingFountain::Create(newType, newLoc, direction >> 1, copiedFlags, Iteration + 1); } } } @@ -384,11 +385,8 @@ void JumpingFountain::Random(const CoordsXYZ& newLoc, int32_t availableDirection void JumpingFountain::CreateNext(const CoordsXYZ& newLoc, int32_t direction) const { const auto newType = GetType(); - int32_t newFlags = FountainFlags & ~FOUNTAIN_FLAG::DIRECTION; - if (direction & 1) - { - newFlags |= FOUNTAIN_FLAG::DIRECTION; - } + auto newFlags = fountainFlags; + newFlags.set(FountainFlag::direction, !!(direction & 1)); JumpingFountain::Create(newType, newLoc, direction >> 1, newFlags, Iteration); } @@ -398,7 +396,7 @@ void JumpingFountain::Serialise(DataSerialiser& stream) stream << frame; stream << FountainType; stream << NumTicksAlive; - stream << FountainFlags; + stream << fountainFlags.holder; stream << TargetX; stream << TargetY; stream << Iteration; @@ -422,7 +420,7 @@ void JumpingFountain::Paint(PaintSession& session, int32_t imageDirection) const imageDirection = imageDirection / 8; // Fountain is firing anti clockwise - bool reversed = (FountainFlags & FOUNTAIN_FLAG::DIRECTION); + bool reversed = fountainFlags.has(FountainFlag::direction); // Fountain rotation bool rotated = (Orientation / 16) & 1; bool isAntiClockwise = (imageDirection / 2) & 1; // Clockwise or Anti-clockwise diff --git a/src/openrct2/entity/Fountain.h b/src/openrct2/entity/Fountain.h index 4d123c4a55..d3b177b8d6 100644 --- a/src/openrct2/entity/Fountain.h +++ b/src/openrct2/entity/Fountain.h @@ -9,12 +9,27 @@ #pragma once +#include "../core/FlagHolder.hpp" #include "../world/Map.h" #include "EntityBase.h" class DataSerialiser; struct PaintSession; +namespace OpenRCT2 +{ + enum class FountainFlag : uint8_t + { + fast, + goToEdge, + split, + terminate, + bounce, + direction = 7, + }; + using FountainFlags = FlagHolder; +} // namespace OpenRCT2 + enum class JumpingFountainType : uint8_t { Water, @@ -28,7 +43,7 @@ struct JumpingFountain : EntityBase uint16_t frame; JumpingFountainType FountainType; uint8_t NumTicksAlive; - uint8_t FountainFlags; + OpenRCT2::FountainFlags fountainFlags; int16_t TargetX; int16_t TargetY; uint16_t Iteration; @@ -46,16 +61,7 @@ private: void Random(const CoordsXYZ& newLoc, int32_t availableDirections) const; void CreateNext(const CoordsXYZ& newLoc, int32_t direction) const; static void Create( - JumpingFountainType newType, const CoordsXYZ& newLoc, int32_t direction, int32_t newFlags, int32_t iteration); + JumpingFountainType newType, const CoordsXYZ& newLoc, int32_t direction, OpenRCT2::FountainFlags newFlags, + int32_t iteration); static bool IsJumpingFountain(JumpingFountainType newType, const CoordsXYZ& newLoc); }; - -namespace OpenRCT2::FOUNTAIN_FLAG -{ - const uint32_t FAST = 1 << 0; - const uint32_t GOTO_EDGE = 1 << 1; - const uint32_t SPLIT = 1 << 2; - const uint32_t TERMINATE = 1 << 3; - const uint32_t BOUNCE = 1 << 4; - const uint32_t DIRECTION = 1 << 7; -}; // namespace OpenRCT2::FOUNTAIN_FLAG diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 37fe448d7b..71c5d3d1de 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -22,6 +22,7 @@ #include "../core/Numerics.hpp" #include "../core/String.hpp" #include "../entity/Balloon.h" +#include "../entity/EntityList.h" #include "../entity/EntityRegistry.h" #include "../entity/MoneyEffect.h" #include "../entity/Particle.h" @@ -32,6 +33,7 @@ #include "../management/Marketing.h" #include "../management/NewsItem.h" #include "../network/Network.h" +#include "../object/ClimateObject.h" #include "../object/LargeSceneryEntry.h" #include "../object/MusicObject.h" #include "../object/ObjectManager.h" @@ -50,7 +52,6 @@ #include "../ride/Station.h" #include "../ride/Track.h" #include "../ride/Vehicle.h" -#include "../scenario/Scenario.h" #include "../scripting/HookEngine.h" #include "../scripting/ScriptEngine.h" #include "../ui/WindowManager.h" @@ -915,7 +916,7 @@ void Guest::UpdateConsumptionMotives() void Guest::Tick128UpdateGuest(uint32_t index) { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; if ((index & 0x1FF) != (currentTicks & 0x1FF)) { UpdateConsumptionMotives(); @@ -1020,7 +1021,7 @@ void Guest::Tick128UpdateGuest(uint32_t index) auto ride = GetRide(CurrentRide); if (ride != nullptr) { - PeepThoughtType thought_type = ride->GetRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside) + PeepThoughtType thought_type = ride->getRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside) ? PeepThoughtType::GetOut : PeepThoughtType::GetOff; @@ -1101,7 +1102,7 @@ void Guest::Tick128UpdateGuest(uint32_t index) possible_thoughts[num_thoughts++] = PeepThoughtType::Toilet; } - if (!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) && CashInPocket <= 9.00_GBP && Happiness >= 105 + if (!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY) && CashInPocket <= 9.00_GBP && Happiness >= 105 && Energy >= 70) { /* The energy check was originally a second check on happiness. @@ -1280,8 +1281,7 @@ void Guest::UpdateSitting() return; // 691541 - uint8_t pathingResult; - PerformNextAction(pathingResult); + const auto [pathingResult, _] = PerformNextAction(); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -1486,6 +1486,24 @@ void Guest::CheckCantFindExit() GuestIsLostCountdown = 90; } +static money64 getItemValue(const ShopItemDescriptor& shopItemDescriptor) +{ + auto& objManager = GetContext()->GetObjectManager(); + auto* climateObj = objManager.GetLoadedObject(0); + if (climateObj == nullptr) + return shopItemDescriptor.BaseValue; + + const auto& thresholds = climateObj->getItemThresholds(); + const auto& gameState = getGameState(); + + if (gameState.weatherCurrent.temperature >= thresholds.warm) + return shopItemDescriptor.HotValue; + else if (gameState.weatherCurrent.temperature <= thresholds.cold) + return shopItemDescriptor.ColdValue; + else + return shopItemDescriptor.BaseValue; +} + /** Main logic to decide whether a peep should buy an item in question * * Also handles the purchase as well, so once it returns, the peep will have the @@ -1501,14 +1519,11 @@ void Guest::CheckCantFindExit() */ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) { - money64 itemValue; - - bool hasVoucher = false; - const bool isPrecipitating = ClimateIsRaining() || ClimateIsSnowingHeavily(); const bool isUmbrella = shopItem == ShopItem::Umbrella; const bool isRainingAndUmbrella = isPrecipitating && isUmbrella; + bool hasVoucher = false; if ((HasItem(ShopItem::Voucher)) && (VoucherType == VOUCHER_TYPE_FOOD_OR_DRINK_FREE) && (VoucherShopItem == shopItem)) { hasVoucher = true; @@ -1541,8 +1556,8 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) return false; } - auto& gameState = GetGameState(); - if ((shopItem == ShopItem::Sunglasses || shopItem == ShopItem::IceCream) && gameState.WeatherCurrent.temperature < 12) + auto& gameState = getGameState(); + if ((shopItem == ShopItem::Sunglasses || shopItem == ShopItem::IceCream) && gameState.weatherCurrent.temperature < 12) { return false; } @@ -1567,7 +1582,7 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) if (!hasVoucher) { - if (price != 0 && !(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + if (price != 0 && !(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) { if (CashInPocket == 0) { @@ -1581,13 +1596,7 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) } } - if (gameState.WeatherCurrent.temperature >= 21) - itemValue = shopItemDescriptor.HotValue; - else if (gameState.WeatherCurrent.temperature <= 11) - itemValue = shopItemDescriptor.ColdValue; - else - itemValue = shopItemDescriptor.BaseValue; - + money64 itemValue = getItemValue(shopItemDescriptor); if (itemValue < price) { itemValue -= price; @@ -1601,7 +1610,7 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) if (Happiness >= 180) itemValue /= 2; } - if (itemValue > (static_cast(ScenarioRand() & 0x07)) && !(GetGameState().Cheats.ignorePrice)) + if (itemValue > (static_cast(ScenarioRand() & 0x07)) && !(getGameState().cheats.ignorePrice)) { // "I'm not paying that much for x" InsertNewThought(shopItemDescriptor.TooMuchThought, ride.id); @@ -1614,7 +1623,7 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) itemValue -= price; itemValue = std::max(0.80_GBP, itemValue); - if (!(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) { if (itemValue >= static_cast(ScenarioRand() & 0x07)) { @@ -1629,12 +1638,7 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) } // reset itemValue for satisfaction calculation - if (gameState.WeatherCurrent.temperature >= 21) - itemValue = shopItemDescriptor.HotValue; - else if (gameState.WeatherCurrent.temperature <= 11) - itemValue = shopItemDescriptor.ColdValue; - else - itemValue = shopItemDescriptor.BaseValue; + itemValue = getItemValue(shopItemDescriptor); itemValue -= price; uint8_t satisfaction = 0; if (itemValue > -8) @@ -1647,25 +1651,25 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) satisfaction++; } } - ride.UpdateSatisfaction(satisfaction); + ride.updateSatisfaction(satisfaction); } // The peep has now decided to buy the item (or, specifically, has not been // dissuaded so far). GiveItem(shopItem); - const auto hasRandomShopColour = ride.HasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS); + const auto hasRandomShopColour = ride.hasLifecycleFlag(RIDE_LIFECYCLE_RANDOM_SHOP_COLOURS); if (shopItem == ShopItem::TShirt) - TshirtColour = hasRandomShopColour ? ScenarioRandMax(kColourNumNormal) : ride.track_colour[0].main; + TshirtColour = hasRandomShopColour ? ScenarioRandMax(kColourNumNormal) : ride.trackColours[0].main; if (shopItem == ShopItem::Hat) - HatColour = hasRandomShopColour ? ScenarioRandMax(kColourNumNormal) : ride.track_colour[0].main; + HatColour = hasRandomShopColour ? ScenarioRandMax(kColourNumNormal) : ride.trackColours[0].main; if (shopItem == ShopItem::Balloon) - BalloonColour = hasRandomShopColour ? ScenarioRandMax(kColourNumNormal) : ride.track_colour[0].main; + BalloonColour = hasRandomShopColour ? ScenarioRandMax(kColourNumNormal) : ride.trackColours[0].main; if (shopItem == ShopItem::Umbrella) - UmbrellaColour = hasRandomShopColour ? ScenarioRandMax(kColourNumNormal) : ride.track_colour[0].main; + UmbrellaColour = hasRandomShopColour ? ScenarioRandMax(kColourNumNormal) : ride.trackColours[0].main; if (shopItem == ShopItem::Map) ResetPathfindGoal(); @@ -1719,7 +1723,7 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) expenditure = ExpenditureType::FoodDrinkStock; } - if (!(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) FinancePayment(shopItemDescriptor.Cost, expenditure); // Sets the expenditure type to *_FOODDRINK_SALES or *_SHOP_SALES appropriately. @@ -1729,15 +1733,15 @@ bool Guest::DecideAndBuyItem(Ride& ride, const ShopItem shopItem, money64 price) RemoveItem(ShopItem::Voucher); WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_INVENTORY; } - else if (!(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + else if (!(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) { SpendMoney(*expend_type, price, expenditure); } - ride.total_profit += (price - shopItemDescriptor.Cost); - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; - ride.cur_num_customers++; - ride.total_customers++; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; + ride.totalProfit += (price - shopItemDescriptor.Cost); + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.curNumCustomers++; + ride.totalCustomers++; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_CUSTOMER; return true; } @@ -1761,7 +1765,7 @@ void Guest::OnEnterRide(Ride& ride) else if (satisfaction >= 0) rideSatisfaction = 1; - ride.UpdateSatisfaction(rideSatisfaction); + ride.updateSatisfaction(rideSatisfaction); // Update various peep stats. if (GuestNumRides < 255) @@ -1825,8 +1829,8 @@ void Guest::OnExitRide(Ride& ride) } } - ride.total_customers++; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; + ride.totalCustomers++; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_CUSTOMER; } /** @@ -1873,7 +1877,7 @@ Ride* Guest::FindBestRideToGoOn() const auto rideIndex = ride.id.ToUnderlying(); if (rideConsideration.size() > rideIndex && rideConsideration[rideIndex]) { - if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_QUEUE_FULL)) + if (!(ride.lifecycleFlags & RIDE_LIFECYCLE_QUEUE_FULL)) { if (ShouldGoOnRide(ride, StationIndex::FromUnderlying(0), false, true) && RideHasRatings(ride)) { @@ -1934,7 +1938,7 @@ OpenRCT2::BitSet Guest::FindRidesToGoOn() // Always take the tall rides into consideration (realistic as you can usually see them from anywhere in the park) for (auto& ride : GetRideManager()) { - if (ride.highest_drop_height > 66 || ride.ratings.excitement >= MakeRideRating(8, 00)) + if (ride.highestDropHeight > 66 || ride.ratings.excitement >= MakeRideRating(8, 00)) { rideConsideration[ride.id.ToUnderlying()] = true; } @@ -1955,11 +1959,11 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // Indicates whether a peep is physically at the ride, or is just thinking about going on the ride. bool peepAtRide = !thinking; - if (ride.status == RideStatus::Open && !(ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (ride.status == RideStatus::open && !(ride.lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { // Peeps that are leaving the park will refuse to go on any rides, with the exception of free transport rides. assert(ride.type < std::size(kRideTypeDescriptors)); - if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::isTransportRide) || ride.value == RIDE_VALUE_UNDEFINED + if (!ride.getRideTypeDescriptor().HasFlag(RtdFlag::isTransportRide) || ride.value == kRideValueUndefined || RideGetPrice(ride) != 0) { if (PeepFlags & PEEP_FLAGS_LEAVING_PARK) @@ -1969,7 +1973,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b } } - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) { return ShouldGoToShop(ride, peepAtRide); } @@ -1978,7 +1982,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // This means we can use the existing !(flags & 4) check. if (peepAtRide) { - auto& station = ride.GetStation(entranceNum); + auto& station = ride.getStation(entranceNum); // Rides without queues can only have one peep waiting at a time. if (!atQueue) @@ -2020,7 +2024,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // Assuming the queue conditions are met, peeps will always go on free transport rides. // Ride ratings, recent crashes and weather will all be ignored. auto ridePrice = RideGetPrice(ride); - if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::isTransportRide) || ride.value == RIDE_VALUE_UNDEFINED + if (!ride.getRideTypeDescriptor().HasFlag(RtdFlag::isTransportRide) || ride.value == kRideValueUndefined || ridePrice != 0) { if (PreviousRide == ride.id) @@ -2029,9 +2033,9 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b return false; } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Basic price checks - if (ridePrice != 0 && !PeepHasVoucherForFreeRide(this, ride) && !(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + if (ridePrice != 0 && !PeepHasVoucherForFreeRide(this, ride) && !(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) { if (ridePrice > CashInPocket) { @@ -2052,7 +2056,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b } // If happy enough, peeps will ignore the fact that a ride has recently crashed. - if (ride.last_crash_type != RIDE_CRASH_TYPE_NONE && Happiness < 225) + if (ride.lastCrashType != RIDE_CRASH_TYPE_NONE && Happiness < 225) { if (peepAtRide) { @@ -2061,7 +2065,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b { HappinessTarget -= 8; } - ride.UpdatePopularity(0); + ride.updatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtRide, true); return false; @@ -2073,7 +2077,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // excitement check and will only do a basic intensity check when they arrive at the ride itself. if (ride.id == GuestHeadingToRideId) { - if (ride.ratings.intensity > MakeRideRating(10, 00) && !GetGameState().Cheats.ignoreRideIntensity) + if (ride.ratings.intensity > MakeRideRating(10, 00) && !getGameState().cheats.ignoreRideIntensity) { PeepRideIsTooIntense(this, ride, peepAtRide); return false; @@ -2091,7 +2095,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b { HappinessTarget -= 8; } - ride.UpdatePopularity(0); + ride.updatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtRide, true); return false; @@ -2100,7 +2104,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // ride intensity check and get me on a sheltered ride! if (!isPrecipitating || !ShouldRideWhileRaining(ride)) { - if (!GetGameState().Cheats.ignoreRideIntensity) + if (!getGameState().cheats.ignoreRideIntensity) { // Intensity calculations. Even though the max intensity can go up to 15, it's capped // at 10.0 (before happiness calculations). A full happiness bar will increase the max @@ -2116,7 +2120,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b { HappinessTarget -= 8; } - ride.UpdatePopularity(0); + ride.updatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtRide, true); return false; @@ -2139,7 +2143,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b { HappinessTarget -= 8; } - ride.UpdatePopularity(0); + ride.updatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtRide, true); return false; @@ -2158,7 +2162,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // If the ride has not yet been rated and is capable of having g-forces, // there's a 90% chance that the peep will ignore it. - if (!RideHasRatings(ride) && ride.GetRideTypeDescriptor().HasFlag(RtdFlag::checkGForces)) + if (!RideHasRatings(ride) && ride.getRideTypeDescriptor().HasFlag(RtdFlag::checkGForces)) { if ((ScenarioRand() & 0xFFFF) > 0x1999u) { @@ -2166,11 +2170,10 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b return false; } - if (!GetGameState().Cheats.ignoreRideIntensity) + if (!getGameState().cheats.ignoreRideIntensity) { - if (ride.max_positive_vertical_g > MakeFixed16_2dp(5, 00) - || ride.max_negative_vertical_g < MakeFixed16_2dp(-4, 00) - || ride.max_lateral_g > MakeFixed16_2dp(4, 00)) + if (ride.maxPositiveVerticalG > MakeFixed16_2dp(5, 00) + || ride.maxNegativeVerticalG < MakeFixed16_2dp(-4, 00) || ride.maxLateralG > MakeFixed16_2dp(4, 00)) { ChoseNotToGoOnRide(ride, peepAtRide, false); return false; @@ -2181,8 +2184,8 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b money64 value = ride.value; // If the value of the ride hasn't yet been calculated, peeps will be willing to pay any amount for the ride. - if (value != RIDE_VALUE_UNDEFINED && !PeepHasVoucherForFreeRide(this, ride) - && !(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + if (value != kRideValueUndefined && !PeepHasVoucherForFreeRide(this, ride) + && !(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) { // The amount peeps are willing to pay is decreased by 75% if they had to pay to enter the park. if (PeepFlags & PEEP_FLAGS_HAS_PAID_FOR_PARK_ENTRY) @@ -2190,7 +2193,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // Peeps won't pay more than twice the value of the ride. ridePrice = RideGetPrice(ride); - if ((ridePrice > (value * 2)) && !(gameState.Cheats.ignorePrice)) + if ((ridePrice > (value * 2)) && !(gameState.cheats.ignorePrice)) { if (peepAtRide) { @@ -2199,7 +2202,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b { HappinessTarget -= 16; } - ride.UpdatePopularity(0); + ride.updatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtRide, true); return false; @@ -2208,7 +2211,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // A ride is good value if the price is 50% or less of the ride value and the peep didn't pay to enter the park. if (ridePrice <= (value / 2) && peepAtRide) { - if (!(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) { if (!(PeepFlags & PEEP_FLAGS_HAS_PAID_FOR_PARK_ENTRY)) { @@ -2222,7 +2225,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b // At this point, the peep has decided to go on the ride. if (peepAtRide) { - ride.UpdatePopularity(1); + ride.updatePopularity(1); } if (ride.id == GuestHeadingToRideId) @@ -2230,7 +2233,7 @@ bool Guest::ShouldGoOnRide(Ride& ride, StationIndex entranceNum, bool atQueue, b PeepResetRideHeading(this); } - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_QUEUE_FULL; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_QUEUE_FULL; return true; } @@ -2247,7 +2250,7 @@ bool Guest::ShouldGoToShop(Ride& ride, bool peepAtShop) return false; } - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::toilet) { if (Toilet < 70) @@ -2258,7 +2261,7 @@ bool Guest::ShouldGoToShop(Ride& ride, bool peepAtShop) // The amount that peeps are willing to pay to use the Toilets scales with their toilet stat. // It effectively has a minimum of $0.10 (due to the check above) and a maximum of $0.60. - if ((RideGetPrice(ride) * 40 > Toilet) && !GetGameState().Cheats.ignorePrice) + if ((RideGetPrice(ride) * 40 > Toilet) && !getGameState().cheats.ignorePrice) { if (peepAtShop) { @@ -2267,7 +2270,7 @@ bool Guest::ShouldGoToShop(Ride& ride, bool peepAtShop) { HappinessTarget -= 16; } - ride.UpdatePopularity(0); + ride.updatePopularity(0); } ChoseNotToGoOnRide(ride, peepAtShop, true); return false; @@ -2304,7 +2307,7 @@ bool Guest::ShouldGoToShop(Ride& ride, bool peepAtShop) if (peepAtShop) { - ride.UpdatePopularity(1); + ride.updatePopularity(1); if (ride.id == GuestHeadingToRideId) { PeepResetRideHeading(this); @@ -2327,7 +2330,7 @@ void Guest::SpendMoney(money64 amount, ExpenditureType expenditure) */ void Guest::SpendMoney(money64& peep_expend_type, money64 amount, ExpenditureType expenditure) { - assert(!(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)); + assert(!(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)); CashInPocket = std::max(0.00_GBP, static_cast(CashInPocket) - amount); CashSpent += amount; @@ -2380,13 +2383,13 @@ bool Guest::ShouldRideWhileRaining(const Ride& ride) { // Peeps will go on rides that are sufficiently undercover while it's raining. // The threshold is fairly low and only requires about 10-15% of the ride to be undercover. - if (ride.sheltered_eighths >= 3) + if (ride.shelteredEighths >= 3) { return true; } // Peeps with umbrellas will go on rides where they can use their umbrella on it (like the Maze) 50% of the time - if (HasItem(ShopItem::Umbrella) && ride.GetRideTypeDescriptor().HasFlag(RtdFlag::guestsCanUseUmbrella) + if (HasItem(ShopItem::Umbrella) && ride.getRideTypeDescriptor().HasFlag(RtdFlag::guestsCanUseUmbrella) && (ScenarioRand() & 2) == 0) { return true; @@ -2432,7 +2435,7 @@ static bool PeepHasVoucherForFreeRide(Guest* peep, const Ride& ride) */ static void PeepTriedToEnterFullQueue(Guest* peep, Ride& ride) { - ride.lifecycle_flags |= RIDE_LIFECYCLE_QUEUE_FULL; + ride.lifecycleFlags |= RIDE_LIFECYCLE_QUEUE_FULL; peep->PreviousRide = ride.id; peep->PreviousRideTimeOut = 0; // Change status "Heading to" to "Walking" if queue is full @@ -2457,7 +2460,7 @@ static void PeepRideIsTooIntense(Guest* peep, Ride& ride, bool peepAtRide) { peep->HappinessTarget -= 8; } - ride.UpdatePopularity(0); + ride.updatePopularity(0); } peep->ChoseNotToGoOnRide(ride, peepAtRide, true); } @@ -2469,7 +2472,7 @@ static void PeepRideIsTooIntense(Guest* peep, Ride& ride, bool peepAtRide) static Vehicle* PeepChooseCarFromRide(Peep* peep, const Ride& ride, std::span carArray) { uint8_t chosen_car = ScenarioRand(); - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasGForces) && ((chosen_car & 0xC) != 0xC)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasGForces) && ((chosen_car & 0xC) != 0xC)) { chosen_car = (ScenarioRand() & 1) ? 0 : static_cast(carArray.size()) - 1; } @@ -2500,7 +2503,7 @@ static void PeepChooseSeatFromCar(Peep* peep, const Ride& ride, Vehicle* vehicle } uint8_t chosen_seat = vehicle->next_free_seat; - if (ride.mode == RideMode::ForwardRotation || ride.mode == RideMode::BackwardRotation) + if (ride.mode == RideMode::forwardRotation || ride.mode == RideMode::backwardRotation) { chosen_seat = (((~vehicle->Pitch + 1) >> 3) & 0xF) * 2; if (vehicle->next_free_seat & 1) @@ -2521,7 +2524,7 @@ static void PeepChooseSeatFromCar(Peep* peep, const Ride& ride, Vehicle* vehicle */ void Guest::GoToRideEntrance(const Ride& ride) { - const auto& station = ride.GetStation(CurrentRideStation); + const auto& station = ride.getStation(CurrentRideStation); if (station.Entrance.IsNull()) { RemoveFromQueue(); @@ -2564,12 +2567,12 @@ static bool FindVehicleToEnter( { uint8_t chosen_train = RideStation::kNoTrain; - if (ride.mode == RideMode::Dodgems || ride.mode == RideMode::Race) + if (ride.mode == RideMode::dodgems || ride.mode == RideMode::race) { - if (ride.lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) return false; - for (int32_t i = 0; i < ride.NumTrains; ++i) + for (int32_t i = 0; i < ride.numTrains; ++i) { Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) @@ -2586,7 +2589,7 @@ static bool FindVehicleToEnter( } else { - chosen_train = ride.GetStation(guest.CurrentRideStation).TrainAtStation; + chosen_train = ride.getStation(guest.CurrentRideStation).TrainAtStation; } if (chosen_train >= OpenRCT2::Limits::kMaxTrainsPerRide) { @@ -2615,7 +2618,7 @@ static bool FindVehicleToEnter( if (num_seats == vehicle->next_free_seat) continue; - if (ride.mode == RideMode::ForwardRotation || ride.mode == RideMode::BackwardRotation) + if (ride.mode == RideMode::forwardRotation || ride.mode == RideMode::backwardRotation) { uint8_t position = (((~vehicle->Pitch + 1) >> 3) & 0xF) * 2; if (!vehicle->peep[position].IsNull()) @@ -2644,7 +2647,7 @@ static bool PeepCheckRidePriceAtEntrance(Guest* peep, const Ride& ride, money64 && peep->VoucherRideId == peep->CurrentRide) return true; - if (peep->CashInPocket <= 0 && !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (peep->CashInPocket <= 0 && !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { peep->InsertNewThought(PeepThoughtType::SpentMoney); PeepUpdateRideAtEntranceTryLeave(peep); @@ -2665,9 +2668,9 @@ static bool PeepCheckRidePriceAtEntrance(Guest* peep, const Ride& ride, money64 } auto value = ride.value; - if (value != RIDE_VALUE_UNDEFINED) + if (value != kRideValueUndefined) { - if (((value * 2) < ridePrice) && !(GetGameState().Cheats.ignorePrice)) + if (((value * 2) < ridePrice) && !(getGameState().cheats.ignorePrice)) { peep->InsertNewThought(PeepThoughtType::BadValue, peep->CurrentRide); PeepUpdateRideAtEntranceTryLeave(peep); @@ -2738,12 +2741,12 @@ static void GuestUpdateFavouriteRide(Guest& peep, const Ride& ride, uint8_t sati /* rct2: 0x00695555 */ static int16_t PeepCalculateRideValueSatisfaction(Guest* peep, const Ride& ride) { - if (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) + if (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) { return -30; } - if (ride.value == RIDE_VALUE_UNDEFINED) + if (ride.value == kRideValueUndefined) { return -30; } @@ -2879,11 +2882,11 @@ static void PeepUpdateRideNauseaGrowth(Guest* peep, const Ride& ride) static bool PeepShouldGoOnRideAgain(Guest* peep, const Ride& ride) { - if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::guestsWillRideAgain)) + if (!ride.getRideTypeDescriptor().HasFlag(RtdFlag::guestsWillRideAgain)) return false; if (!RideHasRatings(ride)) return false; - if (ride.ratings.intensity > MakeRideRating(10, 00) && !GetGameState().Cheats.ignoreRideIntensity) + if (ride.ratings.intensity > MakeRideRating(10, 00) && !getGameState().cheats.ignoreRideIntensity) return false; if (peep->Happiness < 180) return false; @@ -2912,7 +2915,7 @@ static bool PeepShouldGoOnRideAgain(Guest* peep, const Ride& ride) static bool PeepShouldPreferredIntensityIncrease(Guest* peep) { - if (GetGameState().Park.Flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) + if (getGameState().park.Flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) return false; if (peep->Happiness < 200) return false; @@ -2928,7 +2931,7 @@ static bool PeepReallyLikedRide(Guest* peep, const Ride& ride) return false; if (!RideHasRatings(ride)) return false; - if (ride.ratings.intensity > MakeRideRating(10, 00) && !GetGameState().Cheats.ignoreRideIntensity) + if (ride.ratings.intensity > MakeRideRating(10, 00) && !getGameState().cheats.ignoreRideIntensity) return false; return true; } @@ -3001,12 +3004,12 @@ static PeepThoughtType PeepAssessSurroundings(int16_t centre_x, int16_t centre_y if (ride == nullptr) break; - bool isPlayingMusic = ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC && ride->status != RideStatus::Closed - && !(ride->lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)); + bool isPlayingMusic = ride->lifecycleFlags & RIDE_LIFECYCLE_MUSIC && ride->status != RideStatus::closed + && !(ride->lifecycleFlags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)); if (!isPlayingMusic) break; - const auto* musicObject = ride->GetMusicObject(); + const auto* musicObject = ride->getMusicObject(); if (musicObject == nullptr) break; @@ -3047,7 +3050,7 @@ static PeepThoughtType PeepAssessSurroundings(int16_t centre_x, int16_t centre_y if (nearby_music == 1 && num_rubbish < 20) return PeepThoughtType::Music; - if (num_rubbish < 2 && !GetGameState().Cheats.disableLittering) + if (num_rubbish < 2 && !getGameState().cheats.disableLittering) // if disable littering cheat is enabled, peeps will not have the "clean and tidy park" thought return PeepThoughtType::VeryClean; @@ -3082,7 +3085,7 @@ static void PeepDecideWhetherToLeavePark(Guest* peep) peep->EnergyTarget -= 2; } - if (GetGameState().WeatherCurrent.temperature >= 21 && peep->Thirst >= 5) + if (getGameState().weatherCurrent.temperature >= 21 && peep->Thirst >= 5) { peep->Thirst--; } @@ -3097,7 +3100,7 @@ static void PeepDecideWhetherToLeavePark(Guest* peep) * in the park. */ if (!(peep->PeepFlags & PEEP_FLAGS_LEAVING_PARK)) { - if (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) + if (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) { if (peep->Energy >= 70 && peep->Happiness >= 60) { @@ -3222,7 +3225,7 @@ static void PeepHeadForNearestRide(Guest* peep, bool considerOnlyCloseRides, T p { if (rideConsideration[ride.id.ToUnderlying()]) { - if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_QUEUE_FULL)) + if (!(ride.lifecycleFlags & RIDE_LIFECYCLE_QUEUE_FULL)) { if (peep->ShouldGoOnRide(ride, StationIndex::FromUnderlying(0), false, true)) { @@ -3240,7 +3243,7 @@ static void PeepHeadForNearestRide(Guest* peep, bool considerOnlyCloseRides, T p auto ride = GetRide(potentialRides[i]); if (ride != nullptr) { - auto rideLocation = ride->GetStation().Start; + auto rideLocation = ride->getStation().Start; int32_t distance = abs(rideLocation.x - peep->x) + abs(rideLocation.y - peep->y); if (distance < closestRideDistance) { @@ -3263,7 +3266,7 @@ static void PeepHeadForNearestRide(Guest* peep, bool considerOnlyCloseRides, T p static void PeepHeadForNearestRideWithFlag(Guest* peep, bool considerOnlyCloseRides, RtdFlag rtdFlag) { PeepHeadForNearestRide( - peep, considerOnlyCloseRides, [rtdFlag](const Ride& ride) { return ride.GetRideTypeDescriptor().HasFlag(rtdFlag); }); + peep, considerOnlyCloseRides, [rtdFlag](const Ride& ride) { return ride.getRideTypeDescriptor().HasFlag(rtdFlag); }); } static void GuestHeadForNearestRideWithSpecialType(Guest& guest, bool considerOnlyCloseRides, RtdSpecialType specialType) @@ -3273,7 +3276,7 @@ static void GuestHeadForNearestRideWithSpecialType(Guest& guest, bool considerOn return; } PeepHeadForNearestRide(&guest, considerOnlyCloseRides, [specialType](const Ride& ride) { - return ride.GetRideTypeDescriptor().specialType == specialType; + return ride.getRideTypeDescriptor().specialType == specialType; }); } @@ -3335,7 +3338,7 @@ void Guest::StopPurchaseThought(ride_type_t rideType) */ static bool PeepShouldUseCashMachine(Guest* peep, RideId rideIndex) { - if (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) + if (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) return false; if (peep->PeepFlags & PEEP_FLAGS_LEAVING_PARK) return false; @@ -3349,10 +3352,10 @@ static bool PeepShouldUseCashMachine(Guest* peep, RideId rideIndex) auto ride = GetRide(rideIndex); if (ride != nullptr) { - ride->UpdateSatisfaction(peep->Happiness >> 6); - ride->cur_num_customers++; - ride->total_customers++; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; + ride->updateSatisfaction(peep->Happiness >> 6); + ride->curNumCustomers++; + ride->totalCustomers++; + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_CUSTOMER; } return true; } @@ -3367,7 +3370,7 @@ void Guest::UpdateBuying() return; auto ride = GetRide(CurrentRide); - if (ride == nullptr || ride->status != RideStatus::Open) + if (ride == nullptr || ride->status != RideStatus::open) { SetState(PeepState::Falling); return; @@ -3423,7 +3426,7 @@ void Guest::UpdateBuying() UpdateCurrentAnimationType(); - ride->no_primary_items_sold++; + ride->numPrimaryItemsSold++; } } else @@ -3440,7 +3443,7 @@ void Guest::UpdateBuying() item_bought = DecideAndBuyItem(*ride, ride_type->shop_item[1], price); if (item_bought) { - ride->no_secondary_items_sold++; + ride->numSecondaryItemsSold++; } } @@ -3451,7 +3454,7 @@ void Guest::UpdateBuying() item_bought = DecideAndBuyItem(*ride, ride_type->shop_item[0], price); if (item_bought) { - ride->no_primary_items_sold++; + ride->numPrimaryItemsSold++; } } } @@ -3459,13 +3462,13 @@ void Guest::UpdateBuying() if (item_bought) { - ride->UpdatePopularity(1); + ride->updatePopularity(1); StopPurchaseThought(ride->type); } else { - ride->UpdatePopularity(0); + ride->updatePopularity(0); } SubState = 1; } @@ -3494,7 +3497,7 @@ void Guest::UpdateRideAtEntrance() int16_t actionZ = z; if (xy_distance < 16) { - const auto& station = ride->GetStation(CurrentRideStation); + const auto& station = ride->getStation(CurrentRideStation); auto entrance = station.Entrance.ToCoordsXYZ(); actionZ = entrance.z + 2; } @@ -3510,9 +3513,9 @@ void Guest::UpdateRideAtEntrance() sfl::static_vector carArray; - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) { - if (ride->num_riders >= ride->operation_option) + if (ride->numRiders >= ride->operationOption) return; } else @@ -3521,13 +3524,13 @@ void Guest::UpdateRideAtEntrance() return; } - if (ride->status != RideStatus::Open || ride->vehicle_change_timeout != 0) + if (ride->status != RideStatus::open || ride->vehicleChangeTimeout != 0) { PeepUpdateRideAtEntranceTryLeave(this); return; } - if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) return; auto ridePrice = RideGetPrice(*ride); @@ -3537,7 +3540,7 @@ void Guest::UpdateRideAtEntrance() return; } - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) { Vehicle* vehicle = PeepChooseCarFromRide(this, *ride, carArray); PeepChooseSeatFromCar(this, *ride, vehicle); @@ -3577,14 +3580,14 @@ void PeepUpdateRideLeaveEntranceMaze(Guest* peep, Ride& ride, CoordsXYZD& entran peep->SetDestination(entrance_loc, 3); - ride.cur_num_customers++; + ride.curNumCustomers++; peep->OnEnterRide(ride); peep->RideSubState = PeepRideSubState::MazePathfinding; } void PeepUpdateRideLeaveEntranceSpiralSlide(Guest* peep, Ride& ride, CoordsXYZD& entrance_loc) { - entrance_loc = { ride.GetStation(peep->CurrentRideStation).GetStart(), entrance_loc.direction }; + entrance_loc = { ride.getStation(peep->CurrentRideStation).GetStart(), entrance_loc.direction }; TileElement* tile_element = RideGetStationStartTrackElement(ride, peep->CurrentRideStation); @@ -3597,24 +3600,24 @@ void PeepUpdateRideLeaveEntranceSpiralSlide(Guest* peep, Ride& ride, CoordsXYZD& peep->SetDestination(entrance_loc); peep->CurrentCar = 0; - ride.cur_num_customers++; + ride.curNumCustomers++; peep->OnEnterRide(ride); peep->RideSubState = PeepRideSubState::ApproachSpiralSlide; } void PeepUpdateRideLeaveEntranceDefault(Guest* peep, Ride& ride, CoordsXYZD& entrance_loc) { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; // If the ride type was changed guests will become stuck. // Inform the player about this if its a new issue or hasn't been addressed within 120 seconds. - if ((ride.current_issues & RIDE_ISSUE_GUESTS_STUCK) == 0 || currentTicks - ride.last_issue_time > 3000) + if ((ride.currentIssues & RIDE_ISSUE_GUESTS_STUCK) == 0 || currentTicks - ride.lastIssueTime > 3000) { - ride.current_issues |= RIDE_ISSUE_GUESTS_STUCK; - ride.last_issue_time = currentTicks; + ride.currentIssues |= RIDE_ISSUE_GUESTS_STUCK; + ride.lastIssueTime = currentTicks; auto ft = Formatter(); - ride.FormatNameTo(ft); + ride.formatNameTo(ft); if (Config::Get().notifications.RideWarnings) { News::AddItemToQueue(News::ItemType::Ride, STR_GUESTS_GETTING_STUCK_ON_RIDE, peep->CurrentRide.ToUnderlying(), ft); @@ -3649,7 +3652,7 @@ uint8_t Guest::GetWaypointedSeatLocation(const Ride& ride, const CarEntry* vehic void Guest::UpdateRideLeaveEntranceWaypoints(const Ride& ride) { - const auto& station = ride.GetStation(CurrentRideStation); + const auto& station = ride.getStation(CurrentRideStation); if (station.Entrance.IsNull()) { return; @@ -3671,7 +3674,7 @@ void Guest::UpdateRideLeaveEntranceWaypoints(const Ride& ride) Var37 = (direction_entrance | GetWaypointedSeatLocation(ride, carEntry, direction_track) * 4) * 4; - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); CoordsXY waypoint = rtd.GetGuestWaypointLocation(*vehicle, ride, CurrentRideStation); const auto waypointIndex = Var37 / 4u; @@ -3698,7 +3701,7 @@ void Guest::UpdateRideAdvanceThroughEntrance() int16_t actionZ, xy_distance; - const auto* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride->getRideEntry(); if (auto loc = UpdateAction(xy_distance); loc.has_value()) { @@ -3718,12 +3721,12 @@ void Guest::UpdateRideAdvanceThroughEntrance() RideSubState = PeepRideSubState::FreeVehicleCheck; } - actionZ = ride->GetStation(CurrentRideStation).GetBaseZ(); + actionZ = ride->getStation(CurrentRideStation).GetBaseZ(); distanceThreshold += 4; if (xy_distance < distanceThreshold) { - actionZ += ride->GetRideTypeDescriptor().Heights.PlatformHeight; + actionZ += ride->getRideTypeDescriptor().Heights.PlatformHeight; } MoveTo({ loc.value(), actionZ }); @@ -3736,9 +3739,9 @@ void Guest::UpdateRideAdvanceThroughEntrance() return; } - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) { - const auto& station = ride->GetStation(CurrentRideStation); + const auto& station = ride->getStation(CurrentRideStation); auto entranceLocation = station.Entrance.ToCoordsXYZD(); if (entranceLocation.IsNull()) { @@ -3824,12 +3827,12 @@ void Guest::UpdateRideAdvanceThroughEntrance() */ static void PeepGoToRideExit(Peep* peep, const Ride& ride, int16_t x, int16_t y, int16_t z, uint8_t exit_direction) { - z += ride.GetRideTypeDescriptor().Heights.PlatformHeight; + z += ride.getRideTypeDescriptor().Heights.PlatformHeight; peep->MoveTo({ x, y, z }); Guard::Assert(peep->CurrentRideStation.ToUnderlying() < OpenRCT2::Limits::kMaxStationsPerRide); - auto exit = ride.GetStation(peep->CurrentRideStation).Exit; + auto exit = ride.getStation(peep->CurrentRideStation).Exit; x = exit.x; y = exit.y; x *= 32; @@ -3888,8 +3891,8 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride& ride) } else { - ride.total_profit = AddClamp(ride.total_profit, ridePrice); - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.totalProfit = AddClamp(ride.totalProfit, ridePrice); + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME; SpendMoney(PaidOnRides, ridePrice, ExpenditureType::ParkRideTickets); } } @@ -3900,7 +3903,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride& ride) queueTime += 3; queueTime /= 2; - auto& station = ride.GetStation(CurrentRideStation); + auto& station = ride.getStation(CurrentRideStation); if (queueTime != station.QueueTime) { station.QueueTime = queueTime; @@ -3912,10 +3915,10 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride& ride) { auto ft = Formatter(); FormatNameTo(ft); - ride.FormatNameTo(ft); + ride.formatNameTo(ft); StringId msg_string; - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside)) msg_string = STR_PEEP_TRACKING_PEEP_IS_IN_X; else msg_string = STR_PEEP_TRACKING_PEEP_IS_ON_X; @@ -3926,7 +3929,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride& ride) } } - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::spiralSlide) { SwitchToSpecialSprite(1); @@ -3941,7 +3944,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride& ride) */ static void PeepUpdateRideNoFreeVehicleRejoinQueue(Guest* peep, Ride& ride) { - TileCoordsXYZD entranceLocation = ride.GetStation(peep->CurrentRideStation).Entrance; + TileCoordsXYZD entranceLocation = ride.getStation(peep->CurrentRideStation).Entrance; int32_t x = entranceLocation.x * 32; int32_t y = entranceLocation.y * 32; @@ -3955,7 +3958,7 @@ static void PeepUpdateRideNoFreeVehicleRejoinQueue(Guest* peep, Ride& ride) peep->SetState(PeepState::QueuingFront); peep->RideSubState = PeepRideSubState::AtEntrance; - ride.QueueInsertGuestAtFront(peep->CurrentRideStation, peep); + ride.queueInsertGuestAtFront(peep->CurrentRideStation, peep); } /** @@ -3973,9 +3976,9 @@ void Guest::UpdateRideFreeVehicleCheck() if (ride == nullptr) return; - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::noVehicles)) { - if (ride->status != RideStatus::Open || ride->vehicle_change_timeout != 0 || (++RejoinQueueTimeout) == 0) + if (ride->status != RideStatus::open || ride->vehicleChangeTimeout != 0 || (++RejoinQueueTimeout) == 0) { PeepUpdateRideNoFreeVehicleRejoinQueue(this, *ride); return; @@ -4005,7 +4008,7 @@ void Guest::UpdateRideFreeVehicleCheck() { vehicle->mini_golf_flags &= ~MiniGolfFlag::Flag5; - for (size_t i = 0; i < ride->NumTrains; ++i) + for (size_t i = 0; i < ride->numTrains; ++i) { Vehicle* train = GetEntity(ride->vehicles[i]); if (train == nullptr) @@ -4031,7 +4034,7 @@ void Guest::UpdateRideFreeVehicleCheck() return; } - if (ride->mode == RideMode::ForwardRotation || ride->mode == RideMode::BackwardRotation) + if (ride->mode == RideMode::forwardRotation || ride->mode == RideMode::backwardRotation) { if (CurrentSeat & 1 || !(vehicle->next_free_seat & 1)) { @@ -4054,12 +4057,12 @@ void Guest::UpdateRideFreeVehicleCheck() { return; } - if (ride->status == RideStatus::Open && ++RejoinQueueTimeout != 0 && !currentTrain->HasFlag(VehicleFlags::ReadyToDepart)) + if (ride->status == RideStatus::open && ++RejoinQueueTimeout != 0 && !currentTrain->HasFlag(VehicleFlags::ReadyToDepart)) { return; } - if (ride->mode != RideMode::ForwardRotation && ride->mode != RideMode::BackwardRotation) + if (ride->mode != RideMode::forwardRotation && ride->mode != RideMode::backwardRotation) { if (vehicle->next_free_seat - 1 != CurrentSeat) return; @@ -4095,7 +4098,7 @@ void Guest::UpdateRideEnterVehicle() return; } - if (ride->mode != RideMode::ForwardRotation && ride->mode != RideMode::BackwardRotation) + if (ride->mode != RideMode::forwardRotation && ride->mode != RideMode::backwardRotation) { if (CurrentSeat != vehicle->num_peeps) return; @@ -4110,7 +4113,7 @@ void Guest::UpdateRideEnterVehicle() return; vehicle->num_peeps++; - ride->cur_num_customers++; + ride->curNumCustomers++; vehicle->ApplyMass(seatedGuest->Mass); seatedGuest->MoveTo({ kLocationNull, 0, 0 }); @@ -4122,7 +4125,7 @@ void Guest::UpdateRideEnterVehicle() } vehicle->num_peeps++; - ride->cur_num_customers++; + ride->curNumCustomers++; vehicle->ApplyMass(Mass); vehicle->Invalidate(); @@ -4160,7 +4163,7 @@ void Guest::UpdateRideLeaveVehicle() } // Check if ride is NOT Ferris Wheel. - if (ride->mode != RideMode::ForwardRotation && ride->mode != RideMode::BackwardRotation) + if (ride->mode != RideMode::forwardRotation && ride->mode != RideMode::backwardRotation) { if (vehicle->num_peeps - 1 != CurrentSeat) return; @@ -4196,7 +4199,7 @@ void Guest::UpdateRideLeaveVehicle() const auto* carEntry = &rideEntry->Cars[vehicle->vehicle_type]; assert(CurrentRideStation.ToUnderlying() < OpenRCT2::Limits::kMaxStationsPerRide); - auto& station = ride->GetStation(CurrentRideStation); + auto& station = ride->getStation(CurrentRideStation); if (!(carEntry->flags & CAR_ENTRY_FLAG_LOADING_WAYPOINTS)) { @@ -4206,7 +4209,7 @@ void Guest::UpdateRideLeaveVehicle() platformLocation.direction = DirectionReverse(exitLocation.direction); - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::vehicleIsIntegral)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::vehicleIsIntegral)) { for (; vehicle != nullptr && !vehicle->IsHead(); vehicle = GetEntity(vehicle->prev_vehicle_on_ride)) { @@ -4332,9 +4335,9 @@ void Guest::UpdateRideLeaveVehicle() } CoordsXYZ waypointLoc; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); waypointLoc = { rtd.GetGuestWaypointLocation(*vehicle, *ride, CurrentRideStation), - exitLocation.z + ride->GetRideTypeDescriptor().Heights.PlatformHeight }; + exitLocation.z + ride->getRideTypeDescriptor().Heights.PlatformHeight }; rideEntry = vehicle->GetRideEntry(); carEntry = &rideEntry->Cars[vehicle->vehicle_type]; @@ -4374,10 +4377,10 @@ void Guest::UpdateRideLeaveVehicle() void Guest::UpdateRidePrepareForExit() { const auto* ride = GetRide(CurrentRide); - if (ride == nullptr || CurrentRideStation.ToUnderlying() >= std::size(ride->GetStations())) + if (ride == nullptr || CurrentRideStation.ToUnderlying() >= std::size(ride->getStations())) return; - auto exit = ride->GetStation(CurrentRideStation).Exit; + auto exit = ride->getStation(CurrentRideStation).Exit; auto newDestination = exit.ToCoordsXY().ToTileCentre(); auto [xShift, yShift] = [exit]() { @@ -4393,7 +4396,7 @@ void Guest::UpdateRidePrepareForExit() int16_t shiftMultiplier = 20; - const auto* rideEntry = ride->GetRideEntry(); + const auto* rideEntry = ride->getRideEntry(); if (rideEntry != nullptr) { const auto& carEntry = rideEntry->Cars[rideEntry->DefaultCar]; @@ -4444,9 +4447,9 @@ void Guest::UpdateRideInExit() { if (xy_distance >= 16) { - int16_t actionZ = ride->GetStation(CurrentRideStation).GetBaseZ(); + int16_t actionZ = ride->getStation(CurrentRideStation).GetBaseZ(); - actionZ += ride->GetRideTypeDescriptor().Heights.PlatformHeight; + actionZ += ride->getRideTypeDescriptor().Heights.PlatformHeight; MoveTo({ loc.value(), actionZ }); return; } @@ -4455,12 +4458,12 @@ void Guest::UpdateRideInExit() MoveTo({ loc.value(), z }); } - if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) { - ShopItem secondaryItem = ride->GetRideTypeDescriptor().PhotoItem; + ShopItem secondaryItem = ride->getRideTypeDescriptor().PhotoItem; if (DecideAndBuyItem(*ride, secondaryItem, ride->price[1])) { - ride->no_secondary_items_sold++; + ride->numSecondaryItemsSold++; } } RideSubState = PeepRideSubState::LeaveExit; @@ -4469,7 +4472,7 @@ void Guest::UpdateRideInExit() CoordsXY GetGuestWaypointLocationDefault(const Vehicle& vehicle, const Ride& ride, const StationIndex& CurrentRideStation) { - return ride.GetStation(CurrentRideStation).Start.ToTileCentre(); + return ride.getStation(CurrentRideStation).Start.ToTileCentre(); } CoordsXY GetGuestWaypointLocationEnterprise(const Vehicle& vehicle, const Ride& ride, const StationIndex& CurrentRideStation) @@ -4490,7 +4493,7 @@ void Guest::UpdateRideApproachVehicleWaypoints() int16_t xy_distance; uint8_t waypoint = Var37 & 3; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (auto loc = UpdateAction(xy_distance); loc.has_value()) { rtd.UpdateRideApproachVehicleWaypoints(*this, loc.value(), xy_distance); @@ -4538,7 +4541,7 @@ void UpdateRideApproachVehicleWaypointsMotionSimulator(Guest& guest, const Coord int16_t actionZ; auto ride = GetRide(guest.CurrentRide); // Motion simulators have steps this moves the peeps up the steps - actionZ = ride->GetStation(guest.CurrentRideStation).GetBaseZ() + 2; + actionZ = ride->getStation(guest.CurrentRideStation).GetBaseZ() + 2; uint8_t waypoint = guest.Var37 & 3; if (waypoint == 2) @@ -4578,7 +4581,7 @@ void Guest::UpdateRideApproachExitWaypoints() if (ride->type == RIDE_TYPE_MOTION_SIMULATOR) { - actionZ = ride->GetStation(CurrentRideStation).GetBaseZ() + 2; + actionZ = ride->getStation(CurrentRideStation).GetBaseZ() + 2; if ((Var37 & 3) == 1) { @@ -4627,7 +4630,7 @@ void Guest::UpdateRideApproachExitWaypoints() const auto waypoint = Var37 & 3; Guard::Assert(waypoint < 3); - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); CoordsXY targetLoc = rtd.GetGuestWaypointLocation(*vehicle, *ride, CurrentRideStation); targetLoc += carEntry.peep_loading_waypoints[carPosition][waypoint]; @@ -4637,7 +4640,7 @@ void Guest::UpdateRideApproachExitWaypoints() Var37 |= 3; - auto targetLoc = ride->GetStation(CurrentRideStation).Exit.ToCoordsXYZD().ToTileCentre(); + auto targetLoc = ride->getStation(CurrentRideStation).Exit.ToCoordsXYZD().ToTileCentre(); uint8_t exit_direction = DirectionReverse(targetLoc.direction); int16_t x_shift = DirectionOffsets[exit_direction].x; @@ -4691,15 +4694,15 @@ void Guest::UpdateRideApproachSpiralSlide() return; } - [[maybe_unused]] const auto& rtd = ride->GetRideTypeDescriptor(); + [[maybe_unused]] const auto& rtd = ride->getRideTypeDescriptor(); if (waypoint == 2) { bool lastRide = false; - if (ride->status != RideStatus::Open) + if (ride->status != RideStatus::open) lastRide = true; else if (CurrentCar++ != 0) { - if (ride->mode == RideMode::SingleRidePerAdmission) + if (ride->mode == RideMode::singleRidePerAdmission) lastRide = true; if (static_cast(CurrentCar - 1) > (ScenarioRand() & 0xF)) lastRide = true; @@ -4707,15 +4710,15 @@ void Guest::UpdateRideApproachSpiralSlide() if (lastRide) { - auto exit = ride->GetStation(CurrentRideStation).Exit; + auto exit = ride->getStation(CurrentRideStation).Exit; waypoint = 1; auto directionTemp = exit.direction; - if (exit.direction == INVALID_DIRECTION) + if (exit.direction == kInvalidDirection) { directionTemp = 0; } Var37 = (directionTemp * 4) | (Var37 & 0x30) | waypoint; - CoordsXY targetLoc = ride->GetStation(CurrentRideStation).Start; + CoordsXY targetLoc = ride->getStation(CurrentRideStation).Start; assert(rtd.specialType == RtdSpecialType::spiralSlide); targetLoc += kSpiralSlideWalkingPath[Var37]; @@ -4729,7 +4732,7 @@ void Guest::UpdateRideApproachSpiralSlide() // Actually increment the real peep waypoint Var37++; - CoordsXY targetLoc = ride->GetStation(CurrentRideStation).Start; + CoordsXY targetLoc = ride->getStation(CurrentRideStation).Start; assert(rtd.specialType == RtdSpecialType::spiralSlide); targetLoc += kSpiralSlideWalkingPath[Var37]; @@ -4764,7 +4767,7 @@ void Guest::UpdateRideOnSpiralSlide() if (ride == nullptr) return; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType != RtdSpecialType::spiralSlide) return; @@ -4781,13 +4784,13 @@ void Guest::UpdateRideOnSpiralSlide() SetDestination(destination); return; case 1: - if (ride->slide_in_use != 0) + if (ride->slideInUse != 0) return; - ride->slide_in_use++; - ride->slide_peep = Id; - ride->slide_peep_t_shirt_colour = TshirtColour; - ride->spiral_slide_progress = 0; + ride->slideInUse++; + ride->slidePeep = Id; + ride->slidePeepTShirtColour = TshirtColour; + ride->spiralSlideProgress = 0; destination.x++; SetDestination(destination); @@ -4796,7 +4799,7 @@ void Guest::UpdateRideOnSpiralSlide() return; case 3: { - auto newLocation = ride->GetStation(CurrentRideStation).Start; + auto newLocation = ride->getStation(CurrentRideStation).Start; uint8_t dir = (Var37 / 4) & 3; // Set the location that the peep walks to go on slide again @@ -4828,7 +4831,7 @@ void Guest::UpdateRideOnSpiralSlide() uint8_t waypoint = 2; Var37 = (Var37 * 4 & 0x30) + waypoint; - CoordsXY targetLoc = ride->GetStation(CurrentRideStation).Start; + CoordsXY targetLoc = ride->getStation(CurrentRideStation).Start; targetLoc += kSpiralSlideWalkingPath[Var37]; @@ -4867,9 +4870,9 @@ void Guest::UpdateRideLeaveSpiralSlide() waypoint--; // Actually decrement the peep waypoint Var37--; - CoordsXY targetLoc = ride->GetStation(CurrentRideStation).Start; + CoordsXY targetLoc = ride->getStation(CurrentRideStation).Start; - [[maybe_unused]] const auto& rtd = ride->GetRideTypeDescriptor(); + [[maybe_unused]] const auto& rtd = ride->getRideTypeDescriptor(); assert(rtd.specialType == RtdSpecialType::spiralSlide); targetLoc += kSpiralSlideWalkingPath[Var37]; @@ -4880,7 +4883,7 @@ void Guest::UpdateRideLeaveSpiralSlide() // Actually force the final waypoint Var37 |= 3; - auto targetLoc = ride->GetStation(CurrentRideStation).Exit.ToCoordsXYZD().ToTileCentre(); + auto targetLoc = ride->getStation(CurrentRideStation).Exit.ToCoordsXYZD().ToTileCentre(); int16_t xShift = DirectionOffsets[DirectionReverse(targetLoc.direction)].x; int16_t yShift = DirectionOffsets[DirectionReverse(targetLoc.direction)].y; @@ -4947,7 +4950,7 @@ void Guest::UpdateRideMazePathfinding() auto targetLoc = GetDestination().ToTileStart(); - auto stationBaseZ = ride->GetStation().GetBaseZ(); + auto stationBaseZ = ride->getStation().GetBaseZ(); // Find the station track element auto trackElement = MapGetTrackElementAt({ targetLoc, stationBaseZ }); @@ -5059,7 +5062,7 @@ void Guest::UpdateRideLeaveExit() { if (ride != nullptr) { - MoveTo({ loc.value(), ride->GetStation(CurrentRideStation).GetBaseZ() }); + MoveTo({ loc.value(), ride->getStation(CurrentRideStation).GetBaseZ() }); } return; } @@ -5072,7 +5075,7 @@ void Guest::UpdateRideLeaveExit() { auto ft = Formatter(); FormatNameTo(ft); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); if (Config::Get().notifications.GuestLeftRide) { @@ -5129,7 +5132,7 @@ void Guest::UpdateRideShopInteract() const int16_t tileCentreX = NextLoc.x + 16; const int16_t tileCentreY = NextLoc.y + 16; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::firstAid) { if (Nausea <= 35) @@ -5155,7 +5158,7 @@ void Guest::UpdateRideShopInteract() } // Do not play toilet flush sound on title screen as it's considered loud and annoying - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (gLegacyScene != LegacyScene::titleSequence) { OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::ToiletFlush, GetLocation()); } @@ -5193,9 +5196,9 @@ void Guest::UpdateRideShopLeave() auto ride = GetRide(CurrentRide); if (ride != nullptr) { - ride->total_customers++; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; - ride->UpdateSatisfaction(Happiness / 64); + ride->totalCustomers++; + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_CUSTOMER; + ride->updateSatisfaction(Happiness / 64); } } @@ -5332,7 +5335,7 @@ void Guest::UpdateWalking() if (!CheckForPath()) return; - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; if (!IsOnLevelCrossing()) { @@ -5421,8 +5424,7 @@ void Guest::UpdateWalking() return; } - uint8_t pathingResult; - PerformNextAction(pathingResult); + const auto [pathingResult, _] = PerformNextAction(); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -5620,7 +5622,7 @@ void Guest::UpdateQueuing() return; } auto ride = GetRide(CurrentRide); - if (ride == nullptr || ride->status != RideStatus::Open) + if (ride == nullptr || ride->status != RideStatus::open) { RemoveFromQueue(); SetState(PeepState::One); @@ -5656,8 +5658,7 @@ void Guest::UpdateQueuing() return; } - uint8_t pathingResult; - PerformNextAction(pathingResult); + PerformNextAction(); if (!IsActionInterruptable()) return; if (AnimationGroup == PeepAnimationGroup::Normal) @@ -5735,8 +5736,7 @@ void Guest::UpdateEnteringPark() { if (Var37 != 1) { - uint8_t pathingResult; - PerformNextAction(pathingResult); + const auto [pathingResult, _] = PerformNextAction(); if ((pathingResult & PATHING_OUTSIDE_PARK)) { DecrementGuestsHeadingForPark(); @@ -5752,7 +5752,7 @@ void Guest::UpdateEnteringPark() SetState(PeepState::Falling); OutsideOfPark = false; - ParkEntryTime = GetGameState().CurrentTicks; + ParkEntryTime = getGameState().currentTicks; IncrementGuestsInPark(); DecrementGuestsHeadingForPark(); auto intent = Intent(INTENT_ACTION_UPDATE_GUEST_COUNT); @@ -5767,8 +5767,7 @@ void Guest::UpdateLeavingPark() { if (Var37 != 0) { - uint8_t pathingResult; - PerformNextAction(pathingResult); + const auto [pathingResult, _] = PerformNextAction(); if (!(pathingResult & PATHING_OUTSIDE_PARK)) return; PeepEntityRemove(this); @@ -5791,8 +5790,7 @@ void Guest::UpdateLeavingPark() auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::GuestList); - uint8_t pathingResult; - PerformNextAction(pathingResult); + const auto [pathingResult, _] = PerformNextAction(); if (!(pathingResult & PATHING_OUTSIDE_PARK)) return; Remove(); @@ -5808,8 +5806,8 @@ void Guest::UpdateWatching() { if (!CheckForPath()) return; - uint8_t pathingResult; - PerformNextAction(pathingResult); + + const auto [pathingResult, _] = PerformNextAction(); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -5905,8 +5903,7 @@ void Guest::UpdateUsingBin() if (!CheckForPath()) return; - uint8_t pathingResult; - PerformNextAction(pathingResult); + const auto [pathingResult, _] = PerformNextAction(); if (pathingResult & PATHING_DESTINATION_REACHED) { UsingBinSubState = PeepUsingBinSubState::GoingBack; @@ -6232,7 +6229,7 @@ static PathElement* FindBreakableElement(const CoordsXYZ& loc) */ static void PeepUpdateWalkingBreakScenery(Guest* peep) { - if (GetGameState().Cheats.disableVandalism) + if (getGameState().cheats.disableVandalism) return; if (!(peep->PeepFlags & PEEP_FLAGS_ANGRY)) @@ -6311,7 +6308,7 @@ static bool PeepShouldWatchRide(TileElement* tileElement) } auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); - if (ride == nullptr || !ride->IsRide()) + if (ride == nullptr || !ride->isRide()) { return false; } @@ -6332,14 +6329,14 @@ static bool PeepShouldWatchRide(TileElement* tileElement) return true; } - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::interestingToLookAt)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::interestingToLookAt)) { if ((ScenarioRand() & 0xFFFF) > 0x3333) { return false; } } - else if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::slightlyInterestingToLookAt)) + else if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::slightlyInterestingToLookAt)) { if ((ScenarioRand() & 0xFFFF) > 0x1000) { @@ -6364,7 +6361,7 @@ bool Loc690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElem if (ride->ratings.isNull()) { *rideSeatToView = 1; - if (ride->status != RideStatus::Open) + if (ride->status != RideStatus::open) { if (tileElement->GetClearanceZ() > peep->NextLoc.z + (8 * kCoordsZStep)) { @@ -6377,7 +6374,7 @@ bool Loc690FD0(Peep* peep, RideId* rideToView, uint8_t* rideSeatToView, TileElem else { *rideSeatToView = 0; - if (ride->status == RideStatus::Open && !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (ride->status == RideStatus::open && !(ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { if (tileElement->GetClearanceZ() > peep->NextLoc.z + (8 * kCoordsZStep)) { @@ -6955,7 +6952,7 @@ void PeepThoughtSetFormatArgs(const PeepThought* thought, Formatter& ft) auto ride = GetRide(thought->rideId); if (ride != nullptr) { - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } else { @@ -7146,7 +7143,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) if (GetNumFreeEntities() < 400) return nullptr; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); Guest* peep = CreateEntity(); peep->AnimationObjectIndex = findPeepAnimationsIndexForType(AnimationPeepType::Guest); @@ -7187,9 +7184,9 @@ Guest* Guest::Generate(const CoordsXYZ& coords) /* Check which intensity boxes are enabled * and apply the appropriate intensity settings. */ - if (gameState.Park.Flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) + if (gameState.park.Flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) { - if (gameState.Park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) + if (gameState.park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) { intensityLowest = 0; intensityHighest = 15; @@ -7200,7 +7197,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) intensityHighest = 4; } } - else if (gameState.Park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) + else if (gameState.park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) { intensityLowest = 9; intensityHighest = 15; @@ -7209,7 +7206,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->Intensity = IntensityRange(intensityLowest, intensityHighest); uint8_t nauseaTolerance = ScenarioRand() & 0x7; - if (gameState.Park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) + if (gameState.park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) { nauseaTolerance += 4; } @@ -7219,10 +7216,10 @@ Guest* Guest::Generate(const CoordsXYZ& coords) /* Scenario editor limits initial guest happiness to between 37..253. * To be on the safe side, assume the value could have been hacked * to any value 0..255. */ - peep->Happiness = gameState.GuestInitialHappiness; + peep->Happiness = gameState.guestInitialHappiness; /* Assume a default initial happiness of 0 is wrong and set * to 128 (50%) instead. */ - if (gameState.GuestInitialHappiness == 0) + if (gameState.guestInitialHappiness == 0) peep->Happiness = 128; /* Initial value will vary by -15..16 */ int8_t happinessDelta = (ScenarioRand() & 0x1F) - 15; @@ -7235,7 +7232,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) /* Scenario editor limits initial guest hunger to between 37..253. * To be on the safe side, assume the value could have been hacked * to any value 0..255. */ - peep->Hunger = gameState.GuestInitialHunger; + peep->Hunger = gameState.guestInitialHunger; /* Initial value will vary by -15..16 */ int8_t hungerDelta = (ScenarioRand() & 0x1F) - 15; /* Adjust by the delta, clamping at min=0 and max=255. */ @@ -7244,7 +7241,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) /* Scenario editor limits initial guest thirst to between 37..253. * To be on the safe side, assume the value could have been hacked * to any value 0..255. */ - peep->Thirst = gameState.GuestInitialThirst; + peep->Thirst = gameState.guestInitialThirst; /* Initial value will vary by -15..16 */ int8_t thirstDelta = (ScenarioRand() & 0x1F) - 15; /* Adjust by the delta, clamping at min=0 and max=255. */ @@ -7254,24 +7251,24 @@ Guest* Guest::Generate(const CoordsXYZ& coords) peep->TimeToConsume = 0; peep->GuestNumRides = 0; - peep->PeepId = gameState.NextGuestNumber++; + peep->PeepId = gameState.nextGuestNumber++; peep->Name = nullptr; - money64 cash = (static_cast(ScenarioRand() & 0x3) * 100) - 100 + gameState.GuestInitialCash; + money64 cash = (static_cast(ScenarioRand() & 0x3) * 100) - 100 + gameState.guestInitialCash; if (cash < 0) cash = 0; - if (gameState.GuestInitialCash == 0.00_GBP) + if (gameState.guestInitialCash == 0.00_GBP) { cash = 500; } - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) { cash = 0; } - if (gameState.GuestInitialCash == kMoney64Undefined) + if (gameState.guestInitialCash == kMoney64Undefined) { cash = 0; } @@ -7314,7 +7311,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) #ifdef ENABLE_SCRIPTING auto& hookEngine = OpenRCT2::GetContext()->GetScriptEngine().GetHookEngine(); - if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HOOK_TYPE::GUEST_GENERATION)) + if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HookType::guestGeneration)) { auto ctx = OpenRCT2::GetContext()->GetScriptEngine().GetContext(); @@ -7324,7 +7321,7 @@ Guest* Guest::Generate(const CoordsXYZ& coords) // Call the subscriptions auto e = obj.Take(); - hookEngine.Call(OpenRCT2::Scripting::HOOK_TYPE::GUEST_GENERATION, e, true); + hookEngine.Call(OpenRCT2::Scripting::HookType::guestGeneration, e, true); } #endif @@ -7518,7 +7515,7 @@ void Guest::RemoveFromQueue() if (ride == nullptr) return; - auto& station = ride->GetStation(CurrentRideStation); + auto& station = ride->getStation(CurrentRideStation); // Make sure we don't underflow, building while paused might reset it to 0 where peeps have // not yet left the queue. if (station.QueueLength > 0) diff --git a/src/openrct2/entity/Litter.cpp b/src/openrct2/entity/Litter.cpp index ef2f20c01d..344c1b09ac 100644 --- a/src/openrct2/entity/Litter.cpp +++ b/src/openrct2/entity/Litter.cpp @@ -53,8 +53,8 @@ static bool IsLocationLitterable(const CoordsXYZ& mapPos) */ void Litter::Create(const CoordsXYZD& litterPos, Type type) { - auto& gameState = GetGameState(); - if (gameState.Cheats.disableLittering) + auto& gameState = getGameState(); + if (gameState.cheats.disableLittering) return; auto offsetLitterPos = litterPos @@ -94,7 +94,7 @@ void Litter::Create(const CoordsXYZD& litterPos, Type type) litter->SpriteData.HeightMax = 3; litter->SubType = type; litter->MoveTo(offsetLitterPos); - litter->creationTick = gameState.CurrentTicks; + litter->creationTick = gameState.currentTicks; } /** @@ -147,7 +147,7 @@ StringId Litter::GetName() const uint32_t Litter::GetAge() const { - return GetGameState().CurrentTicks - creationTick; + return getGameState().currentTicks - creationTick; } void Litter::Serialise(DataSerialiser& stream) diff --git a/src/openrct2/entity/MoneyEffect.cpp b/src/openrct2/entity/MoneyEffect.cpp index 4f26a79f84..370e4b0318 100644 --- a/src/openrct2/entity/MoneyEffect.cpp +++ b/src/openrct2/entity/MoneyEffect.cpp @@ -177,7 +177,7 @@ void MoneyEffect::Paint(PaintSession& session, int32_t imageDirection) const { PROFILED_FUNCTION(); - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) { // Don't render any money in the title screen. return; diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 8be6b22e5f..c4ebf8c157 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -27,6 +27,7 @@ #include "../core/String.hpp" #include "../drawing/LightFX.h" #include "../entity/Balloon.h" +#include "../entity/EntityList.h" #include "../entity/EntityRegistry.h" #include "../entity/EntityTweener.h" #include "../interface/Viewport.h" @@ -48,7 +49,6 @@ #include "../ride/ShopItem.h" #include "../ride/Station.h" #include "../ride/Track.h" -#include "../scenario/Scenario.h" #include "../ui/WindowManager.h" #include "../windows/Intent.h" #include "../world/Climate.h" @@ -200,10 +200,10 @@ void PeepUpdateAll() { PROFILED_FUNCTION(); - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + if (isInEditorMode()) return; - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; constexpr auto kTicks128Mask = 128u - 1u; const auto currentTicksMasked = currentTicks & kTicks128Mask; @@ -577,8 +577,8 @@ void PeepDecrementNumRiders(Peep* peep) auto ride = GetRide(peep->CurrentRide); if (ride != nullptr) { - ride->num_riders = std::max(0, ride->num_riders - 1); - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride->numRiders = std::max(0, ride->numRiders - 1); + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } } @@ -602,8 +602,8 @@ void PeepWindowStateUpdate(Peep* peep) auto ride = GetRide(peep->CurrentRide); if (ride != nullptr) { - ride->num_riders++; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride->numRiders++; + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } @@ -786,8 +786,8 @@ void Peep::UpdateFalling() News::AddItemToQueue(News::ItemType::Blank, STR_NEWS_ITEM_GUEST_DROWNED, x | (y << 16), ft); } - auto& gameState = GetGameState(); - gameState.Park.RatingCasualtyPenalty = std::min(gameState.Park.RatingCasualtyPenalty + 25, 1000); + auto& gameState = getGameState(); + gameState.park.RatingCasualtyPenalty = std::min(gameState.park.RatingCasualtyPenalty + 25, 1000); Remove(); return; } @@ -918,7 +918,7 @@ void Peep::SetState(PeepState new_state) */ void Peep::UpdatePicked() { - if (GetGameState().CurrentTicks & 0x1F) + if (getGameState().currentTicks & 0x1F) return; SubState++; auto* guest = As(); @@ -999,7 +999,7 @@ void Peep::Update() if (!(PeepFlags & PEEP_FLAGS_ANIMATION_FROZEN)) { // This is circumventing other logic, so only update every few ticks - if ((GetGameState().CurrentTicks & 3) == 0) + if ((getGameState().currentTicks & 3) == 0) { if (IsActionWalking()) UpdateWalkingAnimation(); @@ -1101,12 +1101,12 @@ void Peep::Update() */ void PeepProblemWarningsUpdate() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); Ride* ride; uint32_t hungerCounter = 0, lostCounter = 0, noexitCounter = 0, thirstCounter = 0, litterCounter = 0, disgustCounter = 0, toiletCounter = 0, vandalismCounter = 0; - uint8_t* warningThrottle = gameState.PeepWarningThrottle; + uint8_t* warningThrottle = gameState.peepWarningThrottle; int32_t inQueueCounter = 0; int32_t tooLongQueueCounter = 0; @@ -1136,7 +1136,7 @@ void PeepProblemWarningsUpdate() break; } ride = GetRide(peep->GuestHeadingToRideId); - if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RtdFlag::sellsFood)) + if (ride != nullptr && !ride->getRideTypeDescriptor().HasFlag(RtdFlag::sellsFood)) hungerCounter++; break; @@ -1147,7 +1147,7 @@ void PeepProblemWarningsUpdate() break; } ride = GetRide(peep->GuestHeadingToRideId); - if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RtdFlag::sellsDrinks)) + if (ride != nullptr && !ride->getRideTypeDescriptor().HasFlag(RtdFlag::sellsDrinks)) thirstCounter++; break; @@ -1158,7 +1158,7 @@ void PeepProblemWarningsUpdate() break; } ride = GetRide(peep->GuestHeadingToRideId); - if (ride != nullptr && ride->GetRideTypeDescriptor().specialType != RtdSpecialType::toilet) + if (ride != nullptr && ride->getRideTypeDescriptor().specialType != RtdSpecialType::toilet) toiletCounter++; break; @@ -1186,7 +1186,7 @@ void PeepProblemWarningsUpdate() // could maybe be packed into a loop, would lose a lot of clarity though if (warningThrottle[0]) --warningThrottle[0]; - else if (hungerCounter >= kPeepHungerWarningThreshold && hungerCounter >= gameState.NumGuestsInPark / 16) + else if (hungerCounter >= kPeepHungerWarningThreshold && hungerCounter >= gameState.numGuestsInPark / 16) { warningThrottle[0] = 4; if (Config::Get().notifications.GuestWarnings) @@ -1198,7 +1198,7 @@ void PeepProblemWarningsUpdate() if (warningThrottle[1]) --warningThrottle[1]; - else if (thirstCounter >= kPeepThirstWarningThreshold && thirstCounter >= gameState.NumGuestsInPark / 16) + else if (thirstCounter >= kPeepThirstWarningThreshold && thirstCounter >= gameState.numGuestsInPark / 16) { warningThrottle[1] = 4; if (Config::Get().notifications.GuestWarnings) @@ -1210,7 +1210,7 @@ void PeepProblemWarningsUpdate() if (warningThrottle[2]) --warningThrottle[2]; - else if (toiletCounter >= kPeepToiletWarningThreshold && toiletCounter >= gameState.NumGuestsInPark / 16) + else if (toiletCounter >= kPeepToiletWarningThreshold && toiletCounter >= gameState.numGuestsInPark / 16) { warningThrottle[2] = 4; if (Config::Get().notifications.GuestWarnings) @@ -1222,7 +1222,7 @@ void PeepProblemWarningsUpdate() if (warningThrottle[3]) --warningThrottle[3]; - else if (litterCounter >= kPeepLitterWarningThreshold && litterCounter >= gameState.NumGuestsInPark / 32) + else if (litterCounter >= kPeepLitterWarningThreshold && litterCounter >= gameState.numGuestsInPark / 32) { warningThrottle[3] = 4; if (Config::Get().notifications.GuestWarnings) @@ -1234,7 +1234,7 @@ void PeepProblemWarningsUpdate() if (warningThrottle[4]) --warningThrottle[4]; - else if (disgustCounter >= kPeepDisgustWarningThreshold && disgustCounter >= gameState.NumGuestsInPark / 32) + else if (disgustCounter >= kPeepDisgustWarningThreshold && disgustCounter >= gameState.numGuestsInPark / 32) { warningThrottle[4] = 4; if (Config::Get().notifications.GuestWarnings) @@ -1246,7 +1246,7 @@ void PeepProblemWarningsUpdate() if (warningThrottle[5]) --warningThrottle[5]; - else if (vandalismCounter >= kPeepVandalismWarningThreshold && vandalismCounter >= gameState.NumGuestsInPark / 32) + else if (vandalismCounter >= kPeepVandalismWarningThreshold && vandalismCounter >= gameState.numGuestsInPark / 32) { warningThrottle[5] = 4; if (Config::Get().notifications.GuestWarnings) @@ -1317,7 +1317,7 @@ void PeepUpdateCrowdNoise() if (!Config::Get().sound.SoundEnabled) return; - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) return; auto viewport = g_music_tracking_viewport; @@ -1446,8 +1446,8 @@ void Peep::FormatActionTo(Formatter& ft) const auto ride = GetRide(CurrentRide); if (ride != nullptr) { - ft.Add(ride->GetRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside) ? STR_IN_RIDE : STR_ON_RIDE); - ride->FormatNameTo(ft); + ft.Add(ride->getRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside) ? STR_IN_RIDE : STR_ON_RIDE); + ride->formatNameTo(ft); } else { @@ -1461,7 +1461,7 @@ void Peep::FormatActionTo(Formatter& ft) const auto ride = GetRide(CurrentRide); if (ride != nullptr) { - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } else { @@ -1481,7 +1481,7 @@ void Peep::FormatActionTo(Formatter& ft) const if (ride != nullptr) { ft.Add(STR_HEADING_FOR); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } } else @@ -1498,7 +1498,7 @@ void Peep::FormatActionTo(Formatter& ft) const if (ride != nullptr) { ft.Add(STR_QUEUING_FOR); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } break; } @@ -1512,7 +1512,7 @@ void Peep::FormatActionTo(Formatter& ft) const if (ride != nullptr) { ft.Add((StandingFlags & 0x1) ? STR_WATCHING_CONSTRUCTION_OF : STR_WATCHING_RIDE); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } } else @@ -1555,7 +1555,7 @@ void Peep::FormatActionTo(Formatter& ft) const auto ride = GetRide(CurrentRide); if (ride != nullptr) { - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } else { @@ -1569,7 +1569,7 @@ void Peep::FormatActionTo(Formatter& ft) const auto ride = GetRide(CurrentRide); if (ride != nullptr) { - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } else { @@ -1583,7 +1583,7 @@ void Peep::FormatActionTo(Formatter& ft) const auto ride = GetRide(CurrentRide); if (ride != nullptr) { - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } else { @@ -1597,7 +1597,7 @@ void Peep::FormatActionTo(Formatter& ft) const auto ride = GetRide(CurrentRide); if (ride != nullptr) { - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } else { @@ -1619,9 +1619,9 @@ void Peep::FormatNameTo(Formatter& ft) const { if (Name == nullptr) { - auto& gameState = GetGameState(); - const bool showGuestNames = gameState.Park.Flags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES; - const bool showStaffNames = gameState.Park.Flags & PARK_FLAGS_SHOW_REAL_STAFF_NAMES; + auto& gameState = getGameState(); + const bool showGuestNames = gameState.park.Flags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES; + const bool showStaffNames = gameState.park.Flags & PARK_FLAGS_SHOW_REAL_STAFF_NAMES; auto* staff = As(); const bool isStaff = staff != nullptr; @@ -1854,7 +1854,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ guest->AnimationImageIdOffset = _backupAnimationImageIdOffset; guest->InteractionRideIndex = rideIndex; - auto& station = ride->GetStation(stationNum); + auto& station = ride->getStation(stationNum); auto previous_last = station.LastPeepInQueue; station.LastPeepInQueue = guest->Id; guest->GuestNextInQueue = previous_last; @@ -1870,7 +1870,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ { auto ft = Formatter(); guest->FormatNameTo(ft); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); if (Config::Get().notifications.GuestQueuingForRide) { News::AddItemToQueue(News::ItemType::PeepOnRide, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, guest->Id, ft); @@ -1895,7 +1895,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ return true; } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); uint8_t entranceDirection = tile_element->GetDirection(); if (entranceDirection != guest->PeepDirection) { @@ -1915,7 +1915,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ if (!(guest->PeepFlags & PEEP_FLAGS_LEAVING_PARK)) { // If the park is open and leaving flag isn't set return to centre - if (gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) + if (gameState.park.Flags & PARK_FLAGS_PARK_OPEN) { PeepReturnToCentreOfTile(guest); return true; @@ -1948,7 +1948,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ return true; } - if (!(gameState.Park.Flags & PARK_FLAGS_PARK_OPEN)) + if (!(gameState.park.Flags & PARK_FLAGS_PARK_OPEN)) { guest->State = PeepState::LeavingPark; guest->Var37 = 1; @@ -1959,10 +1959,10 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ } bool found = false; - auto entrance = std::find_if(gameState.Park.Entrances.begin(), gameState.Park.Entrances.end(), [coords](const auto& e) { + auto entrance = std::find_if(gameState.park.Entrances.begin(), gameState.park.Entrances.end(), [coords](const auto& e) { return coords.ToTileStart() == e; }); - if (entrance != gameState.Park.Entrances.end()) + if (entrance != gameState.park.Entrances.end()) { int16_t z = entrance->z / 8; entranceDirection = entrance->direction; @@ -2049,12 +2049,12 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ return true; } - gameState.TotalIncomeFromAdmissions += entranceFee; + gameState.totalIncomeFromAdmissions += entranceFee; guest->SpendMoney(guest->PaidToEnter, entranceFee, ExpenditureType::ParkEntranceTickets); guest->PeepFlags |= PEEP_FLAGS_HAS_PAID_FOR_PARK_ENTRY; } - GetGameState().TotalAdmissions++; + getGameState().totalAdmissions++; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByNumber(WindowClass::ParkInformation, 0); @@ -2074,9 +2074,11 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ */ static void PeepFootpathMoveForward(Peep* peep, const CoordsXYE& coords, bool vandalism) { - auto tile_element = coords.element; - peep->NextLoc = { coords.ToTileStart(), tile_element->GetBaseZ() }; - peep->SetNextFlags(tile_element->AsPath()->GetSlopeDirection(), tile_element->AsPath()->IsSloped(), false); + const auto* pathElement = coords.element->AsPath(); + assert(pathElement != nullptr); + + peep->NextLoc = { coords.ToTileStart(), pathElement->GetBaseZ() }; + peep->SetNextFlags(pathElement->GetSlopeDirection(), pathElement->IsSloped(), false); int16_t z = peep->GetZOnSlope(coords.x, coords.y); @@ -2113,64 +2115,80 @@ static void PeepFootpathMoveForward(Peep* peep, const CoordsXYE& coords, bool va } guest->VandalismSeen = (vandalThoughtTimeout << 6) | vandalisedTiles; - uint16_t crowded = 0; - uint8_t litter_count = 0; - uint8_t sick_count = 0; + + constexpr uint16_t kThresholdCrowdCount = 10; + constexpr uint8_t kThresholdLitterCount = 3; + constexpr uint8_t kThresholdVomitCount = 3; + + // Don't allow this loop to become too expensive, lets just have enough to potentially satisfy + // all the conditions. + constexpr uint32_t kMaxIterations = kThresholdCrowdCount + kThresholdLitterCount + kThresholdVomitCount; + + uint16_t crowdCount = 0; + uint8_t litterCount = 0; + uint8_t vomitCount = 0; + uint32_t iterations = 0; + auto quad = EntityTileList(coords); - for (auto entity : quad) + for (auto* otherEnt : quad) { - if (auto other_peep = entity->As(); other_peep != nullptr) + if (iterations++ >= kMaxIterations) { - if (other_peep->State != PeepState::Walking) + break; + } + + if (std::abs(otherEnt->z - guest->NextLoc.z) > 16) + continue; + + if (const auto* otherPeep = otherEnt->As(); otherPeep != nullptr) + { + if (otherPeep->State != PeepState::Walking) continue; - if (abs(other_peep->z - guest->NextLoc.z) > 16) - continue; - crowded++; + crowdCount++; continue; } - if (auto litter = entity->As(); litter != nullptr) + if (const auto* litter = otherEnt->As(); litter != nullptr) { - if (abs(litter->z - guest->NextLoc.z) > 16) - continue; - - litter_count++; if (litter->SubType != Litter::Type::Vomit && litter->SubType != Litter::Type::VomitAlt) - continue; - - litter_count--; - sick_count++; + { + litterCount++; + } + else + { + vomitCount++; + } } } - if (crowded >= 10 && guest->State == PeepState::Walking && (ScenarioRand() & 0xFFFF) <= 21845) + if (crowdCount >= kThresholdCrowdCount && guest->State == PeepState::Walking && (ScenarioRand() & 0xFFFF) <= 21845) { guest->InsertNewThought(PeepThoughtType::Crowded); guest->HappinessTarget = std::max(0, guest->HappinessTarget - 14); } - litter_count = std::min(static_cast(3), litter_count); - sick_count = std::min(static_cast(3), sick_count); + litterCount = std::min(kThresholdLitterCount, litterCount); + vomitCount = std::min(kThresholdVomitCount, vomitCount); - uint8_t disgusting_time = guest->DisgustingCount & 0xC0; - uint8_t disgusting_count = ((guest->DisgustingCount & 0xF) << 2) | sick_count; - guest->DisgustingCount = disgusting_count | disgusting_time; + uint8_t disgustingTime = guest->DisgustingCount & 0xC0; + uint8_t disgustingCount = ((guest->DisgustingCount & 0xF) << 2) | vomitCount; + guest->DisgustingCount = disgustingCount | disgustingTime; - if (disgusting_time & 0xC0 && (ScenarioRand() & 0xFFFF) <= 4369) + if (disgustingTime & 0xC0 && (ScenarioRand() & 0xFFFF) <= 4369) { // Reduce the disgusting time guest->DisgustingCount -= 0x40; } else { - uint8_t total_sick = 0; + uint8_t totalDisgustingCount = 0; for (uint8_t time = 0; time < 3; time++) { - total_sick += (disgusting_count >> (2 * time)) & 0x3; + totalDisgustingCount += (disgustingCount >> (2 * time)) & 0x3; } - if (total_sick >= 3 && (ScenarioRand() & 0xFFFF) <= 10922) + if (totalDisgustingCount >= kThresholdVomitCount && (ScenarioRand() & 0xFFFF) <= 10922) { guest->InsertNewThought(PeepThoughtType::PathDisgusting); guest->HappinessTarget = std::max(0, guest->HappinessTarget - 17); @@ -2179,24 +2197,24 @@ static void PeepFootpathMoveForward(Peep* peep, const CoordsXYE& coords, bool va } } - uint8_t litter_time = guest->LitterCount & 0xC0; - litter_count = ((guest->LitterCount & 0xF) << 2) | litter_count; - guest->LitterCount = litter_count | litter_time; + uint8_t litterTime = guest->LitterCount & 0xC0; + litterCount = ((guest->LitterCount & 0xF) << 2) | litterCount; + guest->LitterCount = litterCount | litterTime; - if (litter_time & 0xC0 && (ScenarioRand() & 0xFFFF) <= 4369) + if (litterTime & 0xC0 && (ScenarioRand() & 0xFFFF) <= 4369) { // Reduce the litter time guest->LitterCount -= 0x40; } else { - uint8_t total_litter = 0; + uint8_t totalLitter = 0; for (uint8_t time = 0; time < 3; time++) { - total_litter += (litter_count >> (2 * time)) & 0x3; + totalLitter += (litterCount >> (2 * time)) & 0x3; } - if (total_litter >= 3 && (ScenarioRand() & 0xFFFF) <= 10922) + if (totalLitter >= kThresholdLitterCount && (ScenarioRand() & 0xFFFF) <= 10922) { guest->InsertNewThought(PeepThoughtType::BadLitter); guest->HappinessTarget = std::max(0, guest->HappinessTarget - 17); @@ -2215,15 +2233,16 @@ static void PeepFootpathMoveForward(Peep* peep, const CoordsXYE& coords, bool va static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) { // 0x00F1AEE2 - auto tile_element = coords.element; - bool vandalism_present = false; - if (tile_element->AsPath()->HasAddition() && (tile_element->AsPath()->IsBroken()) - && (tile_element->AsPath()->GetEdges()) != 0xF) + const auto* pathElement = coords.element->AsPath(); + assert(pathElement != nullptr); + + bool vandalismPresent = false; + if (pathElement->HasAddition() && pathElement->IsBroken() && (pathElement->GetEdges()) != 0xF) { - vandalism_present = true; + vandalismPresent = true; } - int16_t z = tile_element->GetBaseZ(); + int16_t z = pathElement->GetBaseZ(); auto* guest = peep->As(); if (MapIsLocationOwned({ coords, z })) { @@ -2242,9 +2261,9 @@ static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) } } - if (guest != nullptr && tile_element->AsPath()->IsQueue()) + if (guest != nullptr && pathElement->IsQueue()) { - auto rideIndex = tile_element->AsPath()->GetRideIndex(); + auto rideIndex = pathElement->GetRideIndex(); if (guest->State == PeepState::Queuing) { // Check if this queue is connected to the ride the @@ -2252,7 +2271,7 @@ static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) // the queue, rebuilt the ride, etc. if (guest->CurrentRide == rideIndex) { - PeepFootpathMoveForward(guest, { coords, tile_element }, vandalism_present); + PeepFootpathMoveForward(guest, coords, vandalismPresent); } else { @@ -2260,30 +2279,30 @@ static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) guest->InteractionRideIndex = RideId::GetNull(); guest->RemoveFromQueue(); guest->SetState(PeepState::One); - PeepFootpathMoveForward(guest, { coords, tile_element }, vandalism_present); + PeepFootpathMoveForward(guest, coords, vandalismPresent); } } else { // Peep is not queuing. guest->TimeLost = 0; - auto stationNum = tile_element->AsPath()->GetStationIndex(); + auto stationNum = pathElement->GetStationIndex(); - if ((tile_element->AsPath()->HasQueueBanner()) - && (tile_element->AsPath()->GetQueueBannerDirection() - == DirectionReverse(guest->PeepDirection)) // Ride sign is facing the direction the peep is walking + if (pathElement->HasQueueBanner() + && pathElement->GetQueueBannerDirection() + == DirectionReverse(guest->PeepDirection) // Ride sign is facing the direction the peep is walking ) { /* Peep is approaching the entrance of a ride queue. * Decide whether to go on the ride. */ - auto ride = GetRide(rideIndex); + auto* ride = GetRide(rideIndex); if (ride != nullptr && guest->ShouldGoOnRide(*ride, stationNum, true, false)) { // Peep has decided to go on the ride at the queue. guest->InteractionRideIndex = rideIndex; // Add the peep to the ride queue. - auto& station = ride->GetStation(stationNum); + auto& station = ride->getStation(stationNum); auto old_last_peep = station.LastPeepInQueue; station.LastPeepInQueue = guest->Id; guest->GuestNextInQueue = old_last_peep; @@ -2303,7 +2322,7 @@ static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) { auto ft = Formatter(); guest->FormatNameTo(ft); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); if (Config::Get().notifications.GuestQueuingForRide) { News::AddItemToQueue( @@ -2316,7 +2335,7 @@ static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) .ToTileCentre(); guest->SetDestination(queueTileCentre); - PeepFootpathMoveForward(guest, { coords, tile_element }, vandalism_present); + PeepFootpathMoveForward(guest, coords, vandalismPresent); } else { @@ -2328,7 +2347,7 @@ static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) { /* Peep is approaching a queue tile without a ride * sign facing the peep. */ - PeepFootpathMoveForward(guest, { coords, tile_element }, vandalism_present); + PeepFootpathMoveForward(guest, coords, vandalismPresent); } } } @@ -2340,7 +2359,7 @@ static void PeepInteractWithPath(Peep* peep, const CoordsXYE& coords) guest->RemoveFromQueue(); guest->SetState(PeepState::One); } - PeepFootpathMoveForward(peep, { coords, tile_element }, vandalism_present); + PeepFootpathMoveForward(peep, coords, vandalismPresent); } } @@ -2352,7 +2371,7 @@ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) { RideId rideIndex = coords.element->AsTrack()->GetRideIndex(); auto ride = GetRide(rideIndex); - if (ride == nullptr || !ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (ride == nullptr || !ride->getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) return false; auto* guest = peep->As(); @@ -2371,7 +2390,7 @@ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) guest->TimeLost = 0; - if (ride->status != RideStatus::Open) + if (ride->status != RideStatus::open) { PeepReturnToCentreOfTile(guest); return true; @@ -2389,7 +2408,7 @@ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) return true; } - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::guestsShouldGoInsideFacility)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::guestsShouldGoInsideFacility)) { guest->TimeLost = 0; if (!guest->ShouldGoOnRide(*ride, StationIndex::FromUnderlying(0), false, false)) @@ -2399,10 +2418,10 @@ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) } auto cost = ride->price[0]; - if (cost != 0 && !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (cost != 0 && !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { - ride->total_profit += cost; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride->totalProfit += cost; + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME; guest->SpendMoney(cost, ExpenditureType::ParkRideTickets); } @@ -2413,13 +2432,13 @@ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) guest->RideSubState = PeepRideSubState::ApproachShop; guest->GuestTimeOnRide = 0; - ride->cur_num_customers++; + ride->curNumCustomers++; if (guest->PeepFlags & PEEP_FLAGS_TRACKING) { auto ft = Formatter(); guest->FormatNameTo(ft); - ride->FormatNameTo(ft); - StringId string_id = ride->GetRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside) + ride->formatNameTo(ft); + StringId string_id = ride->getRideTypeDescriptor().HasFlag(RtdFlag::describeAsInside) ? STR_PEEP_TRACKING_PEEP_IS_IN_X : STR_PEEP_TRACKING_PEEP_IS_ON_X; if (Config::Get().notifications.GuestUsedFacility) @@ -2441,19 +2460,15 @@ static bool PeepInteractWithShop(Peep* peep, const CoordsXYE& coords) return true; } -void Peep::PerformNextAction(uint8_t& pathing_result) -{ - TileElement* tmpTile; - PerformNextAction(pathing_result, tmpTile); -} - /** * * rct2: 0x00693C9E */ -void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) +std::pair Peep::PerformNextAction() { - pathing_result = 0; + uint8_t pathingResult = 0; + TileElement* tileResult = nullptr; + PeepActionType previousAction = Action; if (Action == PeepActionType::Idle) @@ -2463,13 +2478,15 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) if (State == PeepState::Queuing && guest != nullptr) { if (guest->UpdateQueuePosition(previousAction)) - return; + { + return { pathingResult, tileResult }; + } } std::optional loc; if (loc = UpdateAction(); !loc.has_value()) { - pathing_result |= PATHING_DESTINATION_REACHED; + pathingResult |= PATHING_DESTINATION_REACHED; uint8_t result = 0; if (guest != nullptr) @@ -2483,10 +2500,10 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) } if (result != 0) - return; + return { pathingResult, tileResult }; if (loc = UpdateAction(); !loc.has_value()) - return; + return { pathingResult, tileResult }; } auto newLoc = *loc; @@ -2495,22 +2512,23 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) { int16_t height = GetZOnSlope(newLoc.x, newLoc.y); MoveTo({ newLoc.x, newLoc.y, height }); - return; + return { pathingResult, tileResult }; } if (MapIsEdge(newLoc)) { if (guest != nullptr && guest->OutsideOfPark) { - pathing_result |= PATHING_OUTSIDE_PARK; + pathingResult |= PATHING_OUTSIDE_PARK; } PeepReturnToCentreOfTile(this); - return; + return { pathingResult, tileResult }; } TileElement* tileElement = MapGetFirstElementAt(newLoc); if (tileElement == nullptr) - return; + return { pathingResult, tileResult }; + int16_t base_z = std::max(0, (z / 8) - 2); int16_t top_z = (z / 8) + 1; @@ -2526,24 +2544,25 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) if (tileElement->GetType() == TileElementType::Path) { PeepInteractWithPath(this, { newLoc, tileElement }); - tile_result = tileElement; - return; + tileResult = tileElement; + + return { pathingResult, tileResult }; } if (tileElement->GetType() == TileElementType::Track) { if (PeepInteractWithShop(this, { newLoc, tileElement })) { - tile_result = tileElement; - return; + tileResult = tileElement; + return { pathingResult, tileResult }; } } else if (tileElement->GetType() == TileElementType::Entrance) { - if (PeepInteractWithEntrance(this, { newLoc, tileElement }, pathing_result)) + if (PeepInteractWithEntrance(this, { newLoc, tileElement }, pathingResult)) { - tile_result = tileElement; - return; + tileResult = tileElement; + return { pathingResult, tileResult }; } } } while (!(tileElement++)->IsLastForTile()); @@ -2563,21 +2582,21 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) if (!MapIsLocationInPark(newLoc)) { PeepReturnToCentreOfTile(this); - return; + return { pathingResult, tileResult }; } auto surfaceElement = MapGetSurfaceElementAt(newLoc); if (surfaceElement == nullptr) { PeepReturnToCentreOfTile(this); - return; + return { pathingResult, tileResult }; } int16_t water_height = surfaceElement->GetWaterHeight(); if (water_height > 0) { PeepReturnToCentreOfTile(this); - return; + return { pathingResult, tileResult }; } auto* staff = As(); @@ -2587,7 +2606,7 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) if (!((staff->StaffOrders & STAFF_ORDERS_MOWING) && staff->StaffMowingTimeout >= 12)) { PeepReturnToCentreOfTile(staff); - return; + return { pathingResult, tileResult }; } } @@ -2597,11 +2616,12 @@ void Peep::PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result) height = GetZOnSlope(newLoc.x, newLoc.y); MoveTo({ newLoc.x, newLoc.y, height }); - return; + return { pathingResult, tileResult }; } } PeepReturnToCentreOfTile(this); + return { pathingResult, tileResult }; } /** @@ -2665,7 +2685,7 @@ int32_t PeepCompare(const EntityId sprite_index_a, const EntityId sprite_index_b if (peep_a->Name == nullptr && peep_b->Name == nullptr) { - if (GetGameState().Park.Flags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES) + if (getGameState().park.Flags & PARK_FLAGS_SHOW_REAL_GUEST_NAMES) { // Potentially could find a more optional way of sorting dynamic real names } @@ -2695,18 +2715,18 @@ int32_t PeepCompare(const EntityId sprite_index_a, const EntityId sprite_index_b */ void PeepUpdateNames() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto& config = Config::Get().general; if (config.ShowRealNamesOfGuests) - gameState.Park.Flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; + gameState.park.Flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; else - gameState.Park.Flags &= ~PARK_FLAGS_SHOW_REAL_GUEST_NAMES; + gameState.park.Flags &= ~PARK_FLAGS_SHOW_REAL_GUEST_NAMES; if (config.ShowRealNamesOfStaff) - gameState.Park.Flags |= PARK_FLAGS_SHOW_REAL_STAFF_NAMES; + gameState.park.Flags |= PARK_FLAGS_SHOW_REAL_STAFF_NAMES; else - gameState.Park.Flags &= ~PARK_FLAGS_SHOW_REAL_STAFF_NAMES; + gameState.park.Flags &= ~PARK_FLAGS_SHOW_REAL_STAFF_NAMES; auto intent = Intent(INTENT_ACTION_REFRESH_GUEST_LIST); ContextBroadcastIntent(&intent); @@ -2715,10 +2735,10 @@ void PeepUpdateNames() void IncrementGuestsInPark() { - auto& gameState = GetGameState(); - if (gameState.NumGuestsInPark < UINT32_MAX) + auto& gameState = getGameState(); + if (gameState.numGuestsInPark < UINT32_MAX) { - gameState.NumGuestsInPark++; + gameState.numGuestsInPark++; } else { @@ -2728,10 +2748,10 @@ void IncrementGuestsInPark() void IncrementGuestsHeadingForPark() { - auto& gameState = GetGameState(); - if (gameState.NumGuestsHeadingForPark < UINT32_MAX) + auto& gameState = getGameState(); + if (gameState.numGuestsHeadingForPark < UINT32_MAX) { - gameState.NumGuestsHeadingForPark++; + gameState.numGuestsHeadingForPark++; } else { @@ -2741,10 +2761,10 @@ void IncrementGuestsHeadingForPark() void DecrementGuestsInPark() { - auto& gameState = GetGameState(); - if (gameState.NumGuestsInPark > 0) + auto& gameState = getGameState(); + if (gameState.numGuestsInPark > 0) { - gameState.NumGuestsInPark--; + gameState.numGuestsInPark--; } else { @@ -2754,11 +2774,11 @@ void DecrementGuestsInPark() void DecrementGuestsHeadingForPark() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - if (gameState.NumGuestsHeadingForPark > 0) + if (gameState.numGuestsHeadingForPark > 0) { - gameState.NumGuestsHeadingForPark--; + gameState.numGuestsHeadingForPark--; } else { @@ -2968,5 +2988,5 @@ void Peep::Paint(PaintSession& session, int32_t imageDirection) const void Peep::ResetPathfindGoal() { PathfindGoal.SetNull(); - PathfindGoal.direction = INVALID_DIRECTION; + PathfindGoal.direction = kInvalidDirection; } diff --git a/src/openrct2/entity/Peep.h b/src/openrct2/entity/Peep.h index 0365ed88e2..8e207d3fa4 100644 --- a/src/openrct2/entity/Peep.h +++ b/src/openrct2/entity/Peep.h @@ -20,6 +20,7 @@ #include #include #include +#include constexpr uint8_t kPeepMinEnergy = 32; constexpr uint8_t kPeepMaxEnergy = 128; @@ -402,8 +403,7 @@ public: // Peep bool ShouldWaitForLevelCrossing(); bool IsOnLevelCrossing(); bool IsOnPathBlockedByVehicle(); - void PerformNextAction(uint8_t& pathing_result); - void PerformNextAction(uint8_t& pathing_result, TileElement*& tile_result); + std::pair PerformNextAction(); [[nodiscard]] int32_t GetZOnSlope(int32_t tile_x, int32_t tile_y); void SwitchNextAnimationType(); [[nodiscard]] PeepAnimationType GetAnimationType(); diff --git a/src/openrct2/entity/Staff.cpp b/src/openrct2/entity/Staff.cpp index 8d354f9976..b03b35573b 100644 --- a/src/openrct2/entity/Staff.cpp +++ b/src/openrct2/entity/Staff.cpp @@ -18,6 +18,7 @@ #include "../audio/Audio.h" #include "../core/DataSerialiser.h" #include "../core/EnumUtils.hpp" +#include "../entity/EntityList.h" #include "../entity/EntityRegistry.h" #include "../interface/Viewport.h" #include "../localisation/StringIds.h" @@ -38,7 +39,6 @@ #include "../ride/Station.h" #include "../ride/Track.h" #include "../ride/Vehicle.h" -#include "../scenario/Scenario.h" #include "../util/Util.h" #include "../windows/Intent.h" #include "../world/Entrance.h" @@ -319,7 +319,7 @@ bool Staff::HasPatrolArea() const * * rct2: 0x006BFBE8 * - * Returns INVALID_DIRECTION when no nearby litter or unpathable litter + * Returns kInvalidDirection when no nearby litter or unpathable litter */ Direction Staff::HandymanDirectionToNearestLitter() const { @@ -338,14 +338,14 @@ Direction Staff::HandymanDirectionToNearestLitter() const if (nearestLitterDist > MAX_LITTER_DISTANCE) { - return INVALID_DIRECTION; + return kInvalidDirection; } auto litterTile = CoordsXY{ nearestLitter->x, nearestLitter->y }.ToTileStart(); if (!IsLocationInPatrol(litterTile)) { - return INVALID_DIRECTION; + return kInvalidDirection; } Direction nextDirection = DirectionFromTo(CoordsXY(x, y), litterTile.ToTileCentre()); @@ -356,14 +356,14 @@ Direction Staff::HandymanDirectionToNearestLitter() const TileElement* tileElement = MapGetFirstElementAt(nextTile); if (tileElement == nullptr) - return INVALID_DIRECTION; + return kInvalidDirection; do { if (tileElement->BaseHeight != nextZ) continue; if (tileElement->GetType() == TileElementType::Entrance || tileElement->GetType() == TileElementType::Track) { - return INVALID_DIRECTION; + return kInvalidDirection; } } while (!(tileElement++)->IsLastForTile()); @@ -371,7 +371,7 @@ Direction Staff::HandymanDirectionToNearestLitter() const tileElement = MapGetFirstElementAt(nextTile); if (tileElement == nullptr) - return INVALID_DIRECTION; + return kInvalidDirection; do { @@ -379,7 +379,7 @@ Direction Staff::HandymanDirectionToNearestLitter() const continue; if (tileElement->GetType() == TileElementType::Entrance || tileElement->GetType() == TileElementType::Track) { - return INVALID_DIRECTION; + return kInvalidDirection; } } while (!(tileElement++)->IsLastForTile()); @@ -396,18 +396,18 @@ uint8_t Staff::HandymanDirectionToUncutGrass(uint8_t valid_directions) const { auto surfaceElement = MapGetSurfaceElementAt(NextLoc); if (surfaceElement == nullptr) - return INVALID_DIRECTION; + return kInvalidDirection; if (NextLoc.z != surfaceElement->GetBaseZ()) - return INVALID_DIRECTION; + return kInvalidDirection; if (GetNextIsSloped()) { if (surfaceElement->GetSlope() != kPathSlopeToLandSlope[GetNextDirection()]) - return INVALID_DIRECTION; + return kInvalidDirection; } else if (surfaceElement->GetSlope() != kTileSlopeFlat) - return INVALID_DIRECTION; + return kInvalidDirection; } uint8_t chosenDirection = ScenarioRand() & 0x3; @@ -437,7 +437,7 @@ uint8_t Staff::HandymanDirectionToUncutGrass(uint8_t valid_directions) const } } } - return INVALID_DIRECTION; + return kInvalidDirection; } /** @@ -475,21 +475,21 @@ bool Staff::DoHandymanPathFinding() { StaffMowingTimeout++; - Direction litterDirection = INVALID_DIRECTION; + Direction litterDirection = kInvalidDirection; uint8_t validDirections = GetValidPatrolDirections(NextLoc); - if ((StaffOrders & STAFF_ORDERS_SWEEPING) && ((GetGameState().CurrentTicks + Id.ToUnderlying()) & 0xFFF) > 110) + if ((StaffOrders & STAFF_ORDERS_SWEEPING) && ((getGameState().currentTicks + Id.ToUnderlying()) & 0xFFF) > 110) { litterDirection = HandymanDirectionToNearestLitter(); } - Direction newDirection = INVALID_DIRECTION; - if (litterDirection == INVALID_DIRECTION && (StaffOrders & STAFF_ORDERS_MOWING) && StaffMowingTimeout >= 12) + Direction newDirection = kInvalidDirection; + if (litterDirection == kInvalidDirection && (StaffOrders & STAFF_ORDERS_MOWING) && StaffMowingTimeout >= 12) { newDirection = HandymanDirectionToUncutGrass(validDirections); } - if (newDirection == INVALID_DIRECTION) + if (newDirection == kInvalidDirection) { if (GetNextIsSurface()) { @@ -510,7 +510,7 @@ bool Staff::DoHandymanPathFinding() else { bool chooseRandom = true; - if (litterDirection != INVALID_DIRECTION && pathDirections & (1 << litterDirection)) + if (litterDirection != kInvalidDirection && pathDirections & (1 << litterDirection)) { /// Check whether path is a queue path and connected to a ride bool connectedQueue = (pathElement->IsQueue() && !pathElement->GetRideIndex().IsNull()); @@ -612,10 +612,10 @@ Direction Staff::MechanicDirectionSurface() const auto ride = GetRide(CurrentRide); if (ride != nullptr && (State == PeepState::Answering || State == PeepState::HeadingToInspection) && (ScenarioRand() & 1)) { - auto location = ride->GetStation(CurrentRideStation).Exit; + auto location = ride->getStation(CurrentRideStation).Exit; if (location.IsNull()) { - location = ride->GetStation(CurrentRideStation).Entrance; + location = ride->getStation(CurrentRideStation).Entrance; } direction = DirectionFromTo(CoordsXY(x, y), location.ToCoordsXY()); @@ -693,10 +693,10 @@ Direction Staff::MechanicDirectionPath(uint8_t validDirections, PathElement* pat { /* Find location of the exit for the target ride station * or if the ride has no exit, the entrance. */ - TileCoordsXYZD location = ride->GetStation(CurrentRideStation).Exit; + TileCoordsXYZD location = ride->getStation(CurrentRideStation).Exit; if (location.IsNull()) { - location = ride->GetStation(CurrentRideStation).Entrance; + location = ride->getStation(CurrentRideStation).Entrance; // If no entrance is present either. This is an incorrect state. if (location.IsNull()) @@ -708,7 +708,7 @@ Direction Staff::MechanicDirectionPath(uint8_t validDirections, PathElement* pat const auto goalPos = TileCoordsXYZ{ location }; Direction pathfindDirection = PathFinding::ChooseDirection( TileCoordsXYZ{ NextLoc }, goalPos, *this, false, RideId::GetNull()); - if (pathfindDirection == INVALID_DIRECTION) + if (pathfindDirection == kInvalidDirection) { /* Heuristic search failed for all directions. * Reset the PathfindGoal - this means that the PathfindHistory @@ -732,7 +732,7 @@ Direction Staff::MechanicDirectionPath(uint8_t validDirections, PathElement* pat bool Staff::DoMechanicPathFinding() { uint8_t validDirections = GetValidPatrolDirections(NextLoc); - Direction newDirection = INVALID_DIRECTION; + Direction newDirection = kInvalidDirection; if (GetNextIsSurface()) { newDirection = MechanicDirectionSurface(); @@ -813,7 +813,7 @@ bool Staff::DoMiscPathFinding() { uint8_t validDirections = GetValidPatrolDirections(NextLoc); - Direction newDirection = INVALID_DIRECTION; + Direction newDirection = kInvalidDirection; if (GetNextIsSurface()) { newDirection = DirectionSurface(ScenarioRand() & 3); @@ -950,15 +950,15 @@ int32_t Staff::GetHireDate() const colour_t StaffGetColour(StaffType staffType) { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); switch (staffType) { case StaffType::Handyman: - return gameState.StaffHandymanColour; + return gameState.staffHandymanColour; case StaffType::Mechanic: - return gameState.StaffMechanicColour; + return gameState.staffMechanicColour; case StaffType::Security: - return gameState.StaffSecurityColour; + return gameState.staffSecurityColour; case StaffType::Entertainer: return 0; default: @@ -969,17 +969,17 @@ colour_t StaffGetColour(StaffType staffType) GameActions::Result StaffSetColour(StaffType staffType, colour_t value) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); switch (staffType) { case StaffType::Handyman: - gameState.StaffHandymanColour = value; + gameState.staffHandymanColour = value; break; case StaffType::Mechanic: - gameState.StaffMechanicColour = value; + gameState.staffMechanicColour = value; break; case StaffType::Security: - gameState.StaffSecurityColour = value; + gameState.staffSecurityColour = value; break; default: return GameActions::Result( @@ -1053,8 +1053,7 @@ void Staff::UpdateWatering() if (!CheckForPath()) return; - uint8_t pathingResult; - PerformNextAction(pathingResult); + const auto [pathingResult, _] = PerformNextAction(); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -1117,8 +1116,7 @@ void Staff::UpdateEmptyingBin() if (!CheckForPath()) return; - uint8_t pathingResult; - PerformNextAction(pathingResult); + const auto [pathingResult, _] = PerformNextAction(); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -1234,14 +1232,14 @@ void Staff::UpdateHeadingToInspect() return; } - if (ride->GetStation(CurrentRideStation).Exit.IsNull()) + if (ride->getStation(CurrentRideStation).Exit.IsNull()) { - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; + ride->lifecycleFlags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; SetState(PeepState::Falling); return; } - if (ride->mechanic_status != RIDE_MECHANIC_STATUS_HEADING || !(ride->lifecycle_flags & RIDE_LIFECYCLE_DUE_INSPECTION)) + if (ride->mechanicStatus != RIDE_MECHANIC_STATUS_HEADING || !(ride->lifecycleFlags & RIDE_LIFECYCLE_DUE_INSPECTION)) { SetState(PeepState::Falling); return; @@ -1259,9 +1257,9 @@ void Staff::UpdateHeadingToInspect() MechanicTimeSinceCall++; if (MechanicTimeSinceCall > 2500) { - if (ride->lifecycle_flags & RIDE_LIFECYCLE_DUE_INSPECTION && ride->mechanic_status == RIDE_MECHANIC_STATUS_HEADING) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_DUE_INSPECTION && ride->mechanicStatus == RIDE_MECHANIC_STATUS_HEADING) { - ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; + ride->mechanicStatus = RIDE_MECHANIC_STATUS_CALLING; } SetState(PeepState::Falling); return; @@ -1273,10 +1271,7 @@ void Staff::UpdateHeadingToInspect() if (ShouldWaitForLevelCrossing() && !IsMechanicHeadingToFixRideBlockingPath()) return; - uint8_t pathingResult; - TileElement* rideEntranceExitElement; - PerformNextAction(pathingResult, rideEntranceExitElement); - + const auto [pathingResult, rideEntranceExitElement] = PerformNextAction(); if (!(pathingResult & PATHING_RIDE_EXIT) && !(pathingResult & PATHING_RIDE_ENTRANCE)) { return; @@ -1291,7 +1286,7 @@ void Staff::UpdateHeadingToInspect() if (pathingResult & PATHING_RIDE_ENTRANCE) { - if (!ride->GetStation(exitIndex).Exit.IsNull()) + if (!ride->getStation(exitIndex).Exit.IsNull()) { return; } @@ -1311,10 +1306,10 @@ void Staff::UpdateHeadingToInspect() int16_t delta_y = abs(GetLocation().y - GetDestination().y); if (auto loc = UpdateAction(); loc.has_value()) { - auto newZ = ride->GetStation(CurrentRideStation).GetBaseZ(); + auto newZ = ride->getStation(CurrentRideStation).GetBaseZ(); if (delta_y < 20) { - newZ += ride->GetRideTypeDescriptor().Heights.PlatformHeight; + newZ += ride->getRideTypeDescriptor().Heights.PlatformHeight; } MoveTo({ loc.value(), newZ }); @@ -1332,7 +1327,7 @@ void Staff::UpdateHeadingToInspect() void Staff::UpdateAnswering() { auto ride = GetRide(CurrentRide); - if (ride == nullptr || ride->mechanic_status != RIDE_MECHANIC_STATUS_HEADING) + if (ride == nullptr || ride->mechanicStatus != RIDE_MECHANIC_STATUS_HEADING) { SetState(PeepState::Falling); return; @@ -1369,8 +1364,8 @@ void Staff::UpdateAnswering() MechanicTimeSinceCall++; if (MechanicTimeSinceCall > 2500) { - ride->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride->mechanicStatus = RIDE_MECHANIC_STATUS_CALLING; + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; SetState(PeepState::Falling); return; } @@ -1381,10 +1376,7 @@ void Staff::UpdateAnswering() if (ShouldWaitForLevelCrossing() && !IsMechanicHeadingToFixRideBlockingPath()) return; - uint8_t pathingResult; - TileElement* rideEntranceExitElement; - PerformNextAction(pathingResult, rideEntranceExitElement); - + const auto [pathingResult, rideEntranceExitElement] = PerformNextAction(); if (!(pathingResult & PATHING_RIDE_EXIT) && !(pathingResult & PATHING_RIDE_ENTRANCE)) { return; @@ -1399,7 +1391,7 @@ void Staff::UpdateAnswering() if (pathingResult & PATHING_RIDE_ENTRANCE) { - if (!ride->GetStation(exitIndex).Exit.IsNull()) + if (!ride->getStation(exitIndex).Exit.IsNull()) { return; } @@ -1421,10 +1413,10 @@ void Staff::UpdateAnswering() int16_t delta_y = abs(y - GetDestination().y); if (auto loc = UpdateAction(); loc.has_value()) { - auto newZ = ride->GetStation(CurrentRideStation).GetBaseZ(); + auto newZ = ride->getStation(CurrentRideStation).GetBaseZ(); if (delta_y < 20) { - newZ += ride->GetRideTypeDescriptor().Heights.PlatformHeight; + newZ += ride->getRideTypeDescriptor().Heights.PlatformHeight; } MoveTo({ loc.value(), newZ }); @@ -1719,8 +1711,7 @@ void Staff::UpdatePatrolling() if (ShouldWaitForLevelCrossing() && !IsMechanicHeadingToFixRideBlockingPath()) return; - uint8_t pathingResult; - PerformNextAction(pathingResult); + const auto [pathingResult, _] = PerformNextAction(); if (!(pathingResult & PATHING_DESTINATION_REACHED)) return; @@ -1776,7 +1767,7 @@ enum /** * FixingSubstatesForBreakdown[] defines the applicable peep sub_states for - * mechanics fixing a ride. The array is indexed by breakdown_reason: + * mechanics fixing a ride. The array is indexed by breakdownReason: * - indexes 0-7 are the 8 breakdown reasons (see BREAKDOWN_* in Ride.h) * when fixing a broken down ride; * - index 8 is for inspecting a ride. @@ -1873,7 +1864,7 @@ void Staff::UpdateFixing(int32_t steps) bool firstRun = true; if ((State == PeepState::Inspecting) - && (ride->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN))) + && (ride->lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN))) { // Ride has broken down since Mechanic was called to inspect it. // Mechanic identifies the breakdown and switches to fixing it. @@ -1953,7 +1944,7 @@ void Staff::UpdateFixing(int32_t steps) if (State != PeepState::Inspecting) { - sub_state_sequence_mask = FixingSubstatesForBreakdown[ride->breakdown_reason_pending]; + sub_state_sequence_mask = FixingSubstatesForBreakdown[ride->breakdownReasonPending]; } do @@ -1971,8 +1962,8 @@ void Staff::UpdateFixing(int32_t steps) */ bool Staff::UpdateFixingEnterStation(Ride& ride) const { - ride.mechanic_status = RIDE_MECHANIC_STATUS_FIXING; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.mechanicStatus = RIDE_MECHANIC_STATUS_FIXING; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; return true; } @@ -2131,13 +2122,13 @@ bool Staff::UpdateFixingMoveToStationEnd(bool firstRun, const Ride& ride) { if (!firstRun) { - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation) - || !ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation) + || !ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { return true; } - auto stationPos = ride.GetStation(CurrentRideStation).GetStart(); + auto stationPos = ride.getStation(CurrentRideStation).GetStart(); if (stationPos.IsNull()) { return true; @@ -2218,13 +2209,13 @@ bool Staff::UpdateFixingMoveToStationStart(bool firstRun, const Ride& ride) { if (!firstRun) { - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation) - || !ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation) + || !ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { return true; } - auto stationPosition = ride.GetStation(CurrentRideStation).GetStart(); + auto stationPosition = ride.getStation(CurrentRideStation).GetStart(); if (stationPosition.IsNull()) { return true; @@ -2295,8 +2286,8 @@ bool Staff::UpdateFixingFixStationStart(bool firstRun, const Ride& ride) { if (!firstRun) { - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation) - || !ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation) + || !ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { return true; } @@ -2348,8 +2339,8 @@ bool Staff::UpdateFixingFixStationBrakes(bool firstRun, Ride& ride) if (AnimationFrameNum == 0x28) { - ride.mechanic_status = RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.mechanicStatus = RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; } if (AnimationFrameNum == 0x13 || AnimationFrameNum == 0x19 || AnimationFrameNum == 0x1F || AnimationFrameNum == 0x25 @@ -2370,10 +2361,10 @@ bool Staff::UpdateFixingMoveToStationExit(bool firstRun, const Ride& ride) { if (!firstRun) { - auto stationPosition = ride.GetStation(CurrentRideStation).Exit.ToCoordsXY(); + auto stationPosition = ride.getStation(CurrentRideStation).Exit.ToCoordsXY(); if (stationPosition.IsNull()) { - stationPosition = ride.GetStation(CurrentRideStation).Entrance.ToCoordsXY(); + stationPosition = ride.getStation(CurrentRideStation).Entrance.ToCoordsXY(); if (stationPosition.IsNull()) { @@ -2414,7 +2405,7 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride& r StaffRidesInspected = AddClamp(StaffRidesInspected, 1u); WindowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME | RIDE_INVALIDATE_RIDE_LIST; - ride.mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED; + ride.mechanicStatus = RIDE_MECHANIC_STATUS_UNDEFINED; return true; } @@ -2437,7 +2428,7 @@ bool Staff::UpdateFixingFinishFixOrInspect(bool firstRun, int32_t steps, Ride& r } RideFixBreakdown(ride, steps); - ride.mechanic_status = RIDE_MECHANIC_STATUS_UNDEFINED; + ride.mechanicStatus = RIDE_MECHANIC_STATUS_UNDEFINED; return true; } @@ -2450,10 +2441,10 @@ bool Staff::UpdateFixingLeaveByEntranceExit(bool firstRun, const Ride& ride) { if (!firstRun) { - auto exitPosition = ride.GetStation(CurrentRideStation).Exit.ToCoordsXY(); + auto exitPosition = ride.getStation(CurrentRideStation).Exit.ToCoordsXY(); if (exitPosition.IsNull()) { - exitPosition = ride.GetStation(CurrentRideStation).Entrance.ToCoordsXY(); + exitPosition = ride.getStation(CurrentRideStation).Entrance.ToCoordsXY(); if (exitPosition.IsNull()) { @@ -2474,10 +2465,10 @@ bool Staff::UpdateFixingLeaveByEntranceExit(bool firstRun, const Ride& ride) int16_t xy_distance; if (auto loc = UpdateAction(xy_distance); loc.has_value()) { - auto stationHeight = ride.GetStation(CurrentRideStation).GetBaseZ(); + auto stationHeight = ride.getStation(CurrentRideStation).GetBaseZ(); if (xy_distance >= 16) { - stationHeight += ride.GetRideTypeDescriptor().Heights.PlatformHeight; + stationHeight += ride.getRideTypeDescriptor().Heights.PlatformHeight; } MoveTo({ loc.value(), stationHeight }); @@ -2495,11 +2486,10 @@ void Staff::UpdateRideInspected(RideId rideIndex) auto ride = GetRide(rideIndex); if (ride != nullptr) { - ride->lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; - ride->reliability += ((100 - ride->reliability_percentage) / 4) * (ScenarioRand() & 0xFF); - ride->last_inspection = 0; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_MAIN - | RIDE_INVALIDATE_RIDE_LIST; + ride->lifecycleFlags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; + ride->reliability += ((100 - ride->reliabilityPercentage) / 4) * (ScenarioRand() & 0xFF); + ride->lastInspection = 0; + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } diff --git a/src/openrct2/interface/FontFamilies.cpp b/src/openrct2/interface/FontFamilies.cpp index d236af163c..dec4fb8536 100644 --- a/src/openrct2/interface/FontFamilies.cpp +++ b/src/openrct2/interface/FontFamilies.cpp @@ -17,29 +17,40 @@ TTFontFamily const TTFFamilyChineseSimplified = { &TTFFontSimSun, &TTFFontHeiti, &TTFFontMicroHei, + &TTFFontNotoSansCJK, }; TTFontFamily const TTFFamilyChineseTraditional = { &TTFFontMingLiu, &TTFFontLiHeiPro, &TTFFontMicroHei, + &TTFFontNotoSansCJK, }; TTFontFamily const TTFFamilyJapanese = { &TTFFontHiragano, &TTFFontNotoSansMono, &TTFFontMSGothic, + &TTFFontNotoSansCJK, }; TTFontFamily const TTFFamilyKorean = { &TTFFontGulim, &TTFFontNanum, &TTFFontMalgun, + &TTFFontNotoSansCJK, +}; + +TTFontFamily const TTFFamilyArabic = { + &TTFFontArialUnicode, + &TTFFontArial, + &TTFFontNotoNaskhArabic, }; TTFontFamily const TTFFamilySansSerif = { &TTFFontArialUnicode, &TTFFontArial, + &TTFFontRoboto, }; #endif // NO_TTF diff --git a/src/openrct2/interface/FontFamilies.h b/src/openrct2/interface/FontFamilies.h index b725dbae71..4a948c8999 100644 --- a/src/openrct2/interface/FontFamilies.h +++ b/src/openrct2/interface/FontFamilies.h @@ -25,6 +25,7 @@ extern TTFontFamily const TTFFamilyChineseSimplified; extern TTFontFamily const TTFFamilyChineseTraditional; extern TTFontFamily const TTFFamilyJapanese; extern TTFontFamily const TTFFamilyKorean; +extern TTFontFamily const TTFFamilyArabic; extern TTFontFamily const TTFFamilySansSerif; #define FAMILY(x) x diff --git a/src/openrct2/interface/Fonts.cpp b/src/openrct2/interface/Fonts.cpp index 396ff26596..dcfa671b09 100644 --- a/src/openrct2/interface/Fonts.cpp +++ b/src/openrct2/interface/Fonts.cpp @@ -104,6 +104,24 @@ TTFFontSetDescriptor TTFFontMicroHei = { { { "wqy-microhei.ttc", "WenQuanYi Micro Hei", 11, 1, -2, 14, HINTING_THRESHOLD_MEDIUM, nullptr }, { "wqy-microhei.ttc", "WenQuanYi Micro Hei", 10, -1, -1, 10, HINTING_THRESHOLD_MEDIUM, nullptr }, } }; + +TTFFontSetDescriptor TTFFontRoboto = { { + { "Roboto-Regular.ttf", "Roboto", 12, 0, -1, 12, HINTING_THRESHOLD_LOW, nullptr }, + { "Roboto-Regular.ttf", "Roboto", 12, 0, -1, 12, HINTING_THRESHOLD_LOW, nullptr }, + { "Roboto-Regular.ttf", "Roboto", 10, 0, -1, 9, HINTING_THRESHOLD_LOW, nullptr }, +} }; + +TTFFontSetDescriptor TTFFontNotoSansCJK = { { + { "NotoSansCJK-Regular.ttc", "Noto Sans CJK", 12, 1, -3, 14, HINTING_THRESHOLD_MEDIUM, nullptr }, + { "NotoSansCJK-Regular.ttc", "Noto Sans CJK", 12, 1, -3, 14, HINTING_THRESHOLD_MEDIUM, nullptr }, + { "NotoSansCJK-Regular.ttc", "Noto Sans CJK", 9, 1, -2, 9, HINTING_THRESHOLD_MEDIUM, nullptr }, +} }; + +TTFFontSetDescriptor TTFFontNotoNaskhArabic = { { + { "NotoNaskhArabic-Regular.ttf", "Noto Naskh Arabic", 12, 1, -3, 14, HINTING_THRESHOLD_MEDIUM, nullptr }, + { "NotoNaskhArabic-Regular.ttf", "Noto Naskh Arabic", 12, 1, -3, 14, HINTING_THRESHOLD_MEDIUM, nullptr }, + { "NotoNaskhArabic-Regular.ttf", "Noto Naskh Arabic", 9, 1, -2, 9, HINTING_THRESHOLD_MEDIUM, nullptr }, +} }; // clang-format on #endif // NO_TTF diff --git a/src/openrct2/interface/Fonts.h b/src/openrct2/interface/Fonts.h index 022ab0ed8b..08d67b6209 100644 --- a/src/openrct2/interface/Fonts.h +++ b/src/openrct2/interface/Fonts.h @@ -30,6 +30,9 @@ extern TTFFontSetDescriptor TTFFontNanum; extern TTFFontSetDescriptor TTFFontArial; extern TTFFontSetDescriptor TTFFontArialUnicode; extern TTFFontSetDescriptor TTFFontMicroHei; +extern TTFFontSetDescriptor TTFFontRoboto; +extern TTFFontSetDescriptor TTFFontNotoSansCJK; +extern TTFFontSetDescriptor TTFFontNotoNaskhArabic; #endif // NO_TTF void TryLoadFonts(OpenRCT2::Localisation::LocalisationService& localisationService); diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index b7db3e31c3..cf94ea1b3b 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -19,7 +19,6 @@ #include "../ReplayManager.h" #include "../Version.h" #include "../actions/CheatSetAction.h" -#include "../actions/ClimateSetAction.h" #include "../actions/GameSetSpeedAction.h" #include "../actions/ParkSetDateAction.h" #include "../actions/ParkSetParameterAction.h" @@ -65,7 +64,6 @@ #include "../ui/WindowManager.h" #include "../util/Util.h" #include "../windows/Intent.h" -#include "../world/Climate.h" #include "../world/Park.h" #include "../world/Scenery.h" #include "Viewport.h" @@ -89,13 +87,6 @@ using namespace OpenRCT2; using arguments_t = std::vector; using OpenRCT2::Date; -static constexpr const char* kClimateNames[] = { - "cool_and_wet", - "warm", - "hot_and_dry", - "cold", -}; - static int32_t ConsoleParseInt(const std::string& src, bool* valid); static double ConsoleParseDouble(const std::string& src, bool* valid); @@ -161,7 +152,7 @@ static void ConsoleCommandRides(InteractiveConsole& console, const arguments_t& { for (const auto& ride : GetRideManager()) { - auto name = ride.GetName(); + auto name = ride.getName(); console.WriteFormatLine( "ride: %03d type: %02u subtype %03u operating mode: %02u name: %s", ride.id, ride.type, ride.subtype, ride.mode, name.c_str()); @@ -174,7 +165,7 @@ static void ConsoleCommandRides(InteractiveConsole& console, const arguments_t& if (argv.size() > 1 && argv[1] == "mode") { console.WriteFormatLine("Ride modes are specified using integer IDs as given below:"); - for (int32_t i = 0; i < static_cast(RideMode::Count); i++) + for (int32_t i = 0; i < static_cast(RideMode::count); i++) { char mode_name[128] = { 0 }; StringId mode_string_id = kRideModeNames[i]; @@ -212,7 +203,7 @@ static void ConsoleCommandRides(InteractiveConsole& console, const arguments_t& auto res = SetOperatingSetting(RideId::FromUnderlying(ride_index), RideSetSetting::RideType, type); if (res == kMoney64Undefined) { - if (!GetGameState().Cheats.allowArbitraryRideTypeChanges) + if (!getGameState().cheats.allowArbitraryRideTypeChanges) { console.WriteFormatLine( "That didn't work. Try enabling the 'Allow arbitrary ride type changes' cheat"); @@ -240,7 +231,7 @@ static void ConsoleCommandRides(InteractiveConsole& console, const arguments_t& else { auto ride = GetRide(RideId::FromUnderlying(ride_index)); - if (mode >= static_cast(RideMode::Count)) + if (mode >= static_cast(RideMode::count)) { console.WriteFormatLine("Invalid ride mode."); } @@ -282,7 +273,7 @@ static void ConsoleCommandRides(InteractiveConsole& console, const arguments_t& } else { - for (int32_t i = 0; i < ride->NumTrains; ++i) + for (int32_t i = 0; i < ride->numTrains; ++i) { for (Vehicle* vehicle = GetEntity(ride->vehicles[i]); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) @@ -552,62 +543,62 @@ static void ConsoleCommandStaff(InteractiveConsole& console, const arguments_t& static void ConsoleCommandGet(InteractiveConsole& console, const arguments_t& argv) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (!argv.empty()) { if (argv[0] == "park_rating") { - console.WriteFormatLine("park_rating %d", gameState.Park.Rating); + console.WriteFormatLine("park_rating %d", gameState.park.Rating); } else if (argv[0] == "park_value") { - console.WriteLine(FormatString("park_value {CURRENCY2DP}", gameState.Park.Value)); + console.WriteLine(FormatString("park_value {CURRENCY2DP}", gameState.park.Value)); } else if (argv[0] == "company_value") { - console.WriteLine(FormatString("company_value {CURRENCY2DP}", gameState.CompanyValue)); + console.WriteLine(FormatString("company_value {CURRENCY2DP}", gameState.companyValue)); } else if (argv[0] == "money") { - console.WriteLine(FormatString("money {CURRENCY2DP}", gameState.Cash)); + console.WriteLine(FormatString("money {CURRENCY2DP}", gameState.cash)); } else if (argv[0] == "scenario_initial_cash") { - console.WriteLine(FormatString("scenario_initial_cash {CURRENCY2DP}", gameState.InitialCash)); + console.WriteLine(FormatString("scenario_initial_cash {CURRENCY2DP}", gameState.initialCash)); } else if (argv[0] == "current_loan") { - console.WriteLine(FormatString("current_loan {CURRENCY2DP}", gameState.BankLoan)); + console.WriteLine(FormatString("current_loan {CURRENCY2DP}", gameState.bankLoan)); } else if (argv[0] == "max_loan") { - console.WriteLine(FormatString("max_loan {CURRENCY2DP}", gameState.MaxBankLoan)); + console.WriteLine(FormatString("max_loan {CURRENCY2DP}", gameState.maxBankLoan)); } else if (argv[0] == "guest_initial_cash") { - console.WriteLine(FormatString("guest_initial_cash {CURRENCY2DP}", gameState.GuestInitialCash)); + console.WriteLine(FormatString("guest_initial_cash {CURRENCY2DP}", gameState.guestInitialCash)); } else if (argv[0] == "land_rights_cost") { - console.WriteLine(FormatString("land_rights_cost {CURRENCY2DP}", gameState.LandPrice)); + console.WriteLine(FormatString("land_rights_cost {CURRENCY2DP}", gameState.landPrice)); } else if (argv[0] == "construction_rights_cost") { - console.WriteLine(FormatString("construction_rights_cost {CURRENCY2DP}", gameState.ConstructionRightsPrice)); + console.WriteLine(FormatString("construction_rights_cost {CURRENCY2DP}", gameState.constructionRightsPrice)); } else if (argv[0] == "guest_initial_happiness") { - uint32_t current_happiness = gameState.GuestInitialHappiness; + uint32_t current_happiness = gameState.guestInitialHappiness; for (int32_t i = 15; i <= 99; i++) { if (i == 99) { - console.WriteFormatLine("guest_initial_happiness %d%% (%d)", 15, gameState.GuestInitialHappiness); + console.WriteFormatLine("guest_initial_happiness %d%% (%d)", 15, gameState.guestInitialHappiness); } else if (current_happiness == Park::CalculateGuestInitialHappiness(i)) { - console.WriteFormatLine("guest_initial_happiness %d%% (%d)", i, gameState.GuestInitialHappiness); + console.WriteFormatLine("guest_initial_happiness %d%% (%d)", i, gameState.guestInitialHappiness); break; } } @@ -615,69 +606,64 @@ static void ConsoleCommandGet(InteractiveConsole& console, const arguments_t& ar else if (argv[0] == "guest_initial_hunger") { console.WriteFormatLine( - "guest_initial_hunger %d%% (%d)", ((255 - gameState.GuestInitialHunger) * 100) / 255, - gameState.GuestInitialHunger); + "guest_initial_hunger %d%% (%d)", ((255 - gameState.guestInitialHunger) * 100) / 255, + gameState.guestInitialHunger); } else if (argv[0] == "guest_initial_thirst") { console.WriteFormatLine( - "guest_initial_thirst %d%% (%d)", ((255 - gameState.GuestInitialThirst) * 100) / 255, - gameState.GuestInitialThirst); + "guest_initial_thirst %d%% (%d)", ((255 - gameState.guestInitialThirst) * 100) / 255, + gameState.guestInitialThirst); } else if (argv[0] == "guest_prefer_less_intense_rides") { console.WriteFormatLine( - "guest_prefer_less_intense_rides %d", (gameState.Park.Flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) != 0); + "guest_prefer_less_intense_rides %d", (gameState.park.Flags & PARK_FLAGS_PREF_LESS_INTENSE_RIDES) != 0); } else if (argv[0] == "guest_prefer_more_intense_rides") { console.WriteFormatLine( - "guest_prefer_more_intense_rides %d", (gameState.Park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) != 0); + "guest_prefer_more_intense_rides %d", (gameState.park.Flags & PARK_FLAGS_PREF_MORE_INTENSE_RIDES) != 0); } else if (argv[0] == "forbid_marketing_campaigns") { console.WriteFormatLine( - "forbid_marketing_campaigns %d", (gameState.Park.Flags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) != 0); + "forbid_marketing_campaigns %d", (gameState.park.Flags & PARK_FLAGS_FORBID_MARKETING_CAMPAIGN) != 0); } else if (argv[0] == "forbid_landscape_changes") { console.WriteFormatLine( - "forbid_landscape_changes %d", (gameState.Park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) != 0); + "forbid_landscape_changes %d", (gameState.park.Flags & PARK_FLAGS_FORBID_LANDSCAPE_CHANGES) != 0); } else if (argv[0] == "forbid_tree_removal") { - console.WriteFormatLine("forbid_tree_removal %d", (gameState.Park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) != 0); + console.WriteFormatLine("forbid_tree_removal %d", (gameState.park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) != 0); } else if (argv[0] == "forbid_high_construction") { console.WriteFormatLine( - "forbid_high_construction %d", (gameState.Park.Flags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION) != 0); + "forbid_high_construction %d", (gameState.park.Flags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION) != 0); } else if (argv[0] == "pay_for_rides") { - console.WriteFormatLine("pay_for_rides %d", (gameState.Park.Flags & PARK_FLAGS_PARK_FREE_ENTRY) != 0); + console.WriteFormatLine("pay_for_rides %d", (gameState.park.Flags & PARK_FLAGS_PARK_FREE_ENTRY) != 0); } else if (argv[0] == "no_money") { - console.WriteFormatLine("no_money %d", (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) != 0); + console.WriteFormatLine("no_money %d", (gameState.park.Flags & PARK_FLAGS_NO_MONEY) != 0); } else if (argv[0] == "difficult_park_rating") { - console.WriteFormatLine("difficult_park_rating %d", (gameState.Park.Flags & PARK_FLAGS_DIFFICULT_PARK_RATING) != 0); + console.WriteFormatLine("difficult_park_rating %d", (gameState.park.Flags & PARK_FLAGS_DIFFICULT_PARK_RATING) != 0); } else if (argv[0] == "difficult_guest_generation") { console.WriteFormatLine( - "difficult_guest_generation %d", (gameState.Park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) != 0); + "difficult_guest_generation %d", (gameState.park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) != 0); } else if (argv[0] == "park_open") { - console.WriteFormatLine("park_open %d", (gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) != 0); - } - else if (argv[0] == "climate") - { - console.WriteFormatLine( - "climate %s (%d)", kClimateNames[EnumValue(gameState.Climate)], EnumValue(gameState.Climate)); + console.WriteFormatLine("park_open %d", (gameState.park.Flags & PARK_FLAGS_PARK_OPEN) != 0); } else if (argv[0] == "game_speed") { @@ -718,15 +704,15 @@ static void ConsoleCommandGet(InteractiveConsole& console, const arguments_t& ar } else if (argv[0] == "cheat_sandbox_mode") { - console.WriteFormatLine("cheat_sandbox_mode %d", GetGameState().Cheats.sandboxMode); + console.WriteFormatLine("cheat_sandbox_mode %d", getGameState().cheats.sandboxMode); } else if (argv[0] == "cheat_disable_clearance_checks") { - console.WriteFormatLine("cheat_disable_clearance_checks %d", GetGameState().Cheats.disableClearanceChecks); + console.WriteFormatLine("cheat_disable_clearance_checks %d", getGameState().cheats.disableClearanceChecks); } else if (argv[0] == "cheat_disable_support_limits") { - console.WriteFormatLine("cheat_disable_support_limits %d", GetGameState().Cheats.disableSupportLimits); + console.WriteFormatLine("cheat_disable_support_limits %d", getGameState().cheats.disableSupportLimits); } else if (argv[0] == "current_rotation") { @@ -792,11 +778,11 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar std::string varName = argv[0]; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (varName == "money" && InvalidArguments(&invalidArgs, double_valid[0])) { money64 money = ToMoney64FromGBP(double_val[0]); - if (gameState.Cash != money) + if (gameState.cash != money) { ConsoleSetVariableAction(console, varName, CheatType::SetMoney, money); } @@ -814,7 +800,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar else if (varName == "current_loan" && InvalidArguments(&invalidArgs, int_valid[0])) { auto amount = std::clamp( - ToMoney64FromGBP(int_val[0]) - ToMoney64FromGBP(int_val[0] % 1000), 0.00_GBP, gameState.MaxBankLoan); + ToMoney64FromGBP(int_val[0]) - ToMoney64FromGBP(int_val[0] % 1000), 0.00_GBP, gameState.maxBankLoan); ConsoleSetVariableAction(console, varName, ScenarioSetSetting::InitialLoan, amount); } else if (varName == "max_loan" && InvalidArguments(&invalidArgs, int_valid[0])) @@ -879,7 +865,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar } else if (varName == "pay_for_rides" && InvalidArguments(&invalidArgs, int_valid[0])) { - SET_FLAG(gameState.Park.Flags, PARK_FLAGS_PARK_FREE_ENTRY, int_val[0]); + SET_FLAG(gameState.park.Flags, PARK_FLAGS_PARK_FREE_ENTRY, int_val[0]); console.Execute("get pay_for_rides"); } else if (varName == "no_money" && InvalidArguments(&invalidArgs, int_valid[0])) @@ -913,37 +899,6 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar console, varName, ScenarioSetSetting::CostToBuyConstructionRights, std::clamp(ToMoney64FromGBP(double_val[0]), 0.00_GBP, 200.00_GBP)); } - else if (varName == "climate") - { - uint8_t newClimate = static_cast(ClimateType::Count); - invalidArgs = true; - - if (int_valid[0]) - { - newClimate = static_cast(int_val[0]); - invalidArgs = false; - } - else - { - for (newClimate = 0; newClimate < static_cast(ClimateType::Count); newClimate++) - { - if (argv[1] == kClimateNames[newClimate]) - { - invalidArgs = false; - break; - } - } - } - - if (invalidArgs) - { - console.WriteLine(LanguageGetString(STR_INVALID_CLIMATE_ID)); - } - else - { - ConsoleSetVariableAction(console, varName, ClimateType{ newClimate }); - } - } else if (varName == "game_speed" && InvalidArguments(&invalidArgs, int_valid[0])) { ConsoleSetVariableAction(console, varName, std::clamp(int_val[0], 1, 8)); @@ -995,7 +950,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar } else if (varName == "cheat_sandbox_mode" && InvalidArguments(&invalidArgs, int_valid[0])) { - if (GetGameState().Cheats.sandboxMode != (int_val[0] != 0)) + if (getGameState().cheats.sandboxMode != (int_val[0] != 0)) { ConsoleSetVariableAction(console, varName, CheatType::SandboxMode, int_val[0] != 0); } @@ -1006,7 +961,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar } else if (varName == "cheat_disable_clearance_checks" && InvalidArguments(&invalidArgs, int_valid[0])) { - if (GetGameState().Cheats.disableClearanceChecks != (int_val[0] != 0)) + if (getGameState().cheats.disableClearanceChecks != (int_val[0] != 0)) { ConsoleSetVariableAction(console, varName, CheatType::DisableClearanceChecks, int_val[0] != 0); } @@ -1017,7 +972,7 @@ static void ConsoleCommandSet(InteractiveConsole& console, const arguments_t& ar } else if (varName == "cheat_disable_support_limits" && InvalidArguments(&invalidArgs, int_valid[0])) { - if (GetGameState().Cheats.disableSupportLimits != (int_val[0] != 0)) + if (getGameState().cheats.disableSupportLimits != (int_val[0] != 0)) { ConsoleSetVariableAction(console, varName, CheatType::DisableSupportLimits, int_val[0] != 0); } @@ -1171,6 +1126,7 @@ constexpr auto _objectTypeNames = std::to_array({ STR_OBJECT_SELECTION_MUSIC, STR_OBJECT_SELECTION_PEEP_NAMES, STR_OBJECT_SELECTION_PEEP_ANIMATIONS, + STR_OBJECT_SELECTION_CLIMATE, }); static_assert(_objectTypeNames.size() == EnumValue(ObjectType::count)); @@ -1198,7 +1154,7 @@ static void ConsoleCommandOpen(InteractiveConsole& console, const arguments_t& a { if (!argv.empty()) { - bool title = (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) != 0; + bool title = gLegacyScene == LegacyScene::titleSequence; bool invalidTitle = false; if (argv[0] == "object_selection" && InvalidArguments(&invalidTitle, !title)) { @@ -1362,7 +1318,7 @@ static void ConsoleCommandLoadPark([[maybe_unused]] InteractiveConsole& console, { // no / or \ was included. File should be in save dir. auto env = OpenRCT2::GetContext()->GetPlatformEnvironment(); - auto directory = env->GetDirectoryPath(OpenRCT2::DIRBASE::USER, OpenRCT2::DIRID::SAVE); + auto directory = env->GetDirectoryPath(OpenRCT2::DirBase::user, OpenRCT2::DirId::saves); savePath = Path::Combine(directory, argv[0]); } else @@ -1435,7 +1391,7 @@ static void ConsoleCommandReplayStartRecord(InteractiveConsole& console, const a name += ".parkrep"; } std::string outPath = OpenRCT2::GetContext()->GetPlatformEnvironment()->GetDirectoryPath( - OpenRCT2::DIRBASE::USER, OpenRCT2::DIRID::REPLAY); + OpenRCT2::DirBase::user, OpenRCT2::DirId::replayRecordings); name = Path::Combine(outPath, name); // If ticks are specified by user use that otherwise maximum ticks specified by const. @@ -1561,7 +1517,7 @@ static void ConsoleCommandReplayNormalise(InteractiveConsole& console, const arg outputFile += ".parkrep"; } std::string outPath = OpenRCT2::GetContext()->GetPlatformEnvironment()->GetDirectoryPath( - OpenRCT2::DIRBASE::USER, OpenRCT2::DIRID::REPLAY); + OpenRCT2::DirBase::user, OpenRCT2::DirId::replayRecordings); outputFile = Path::Combine(outPath, outputFile); auto* replayManager = OpenRCT2::GetContext()->GetReplayManager(); @@ -1793,7 +1749,6 @@ static constexpr const utf8* console_variable_table[] = { "land_rights_cost", "construction_rights_cost", "park_open", - "climate", "game_speed", "console_small_font", "location", diff --git a/src/openrct2/interface/Screenshot.cpp b/src/openrct2/interface/Screenshot.cpp index 9408b1bc65..cc4f071fa7 100644 --- a/src/openrct2/interface/Screenshot.cpp +++ b/src/openrct2/interface/Screenshot.cpp @@ -65,7 +65,7 @@ static bool WriteDpiToFile(std::string_view path, const DrawPixelInfo& dpi, cons image.Stride = dpi.LineStride(); image.Palette = palette; image.Pixels = std::vector(pixels8, pixels8 + pixelsLen); - Imaging::WriteToFile(path, image, IMAGE_FORMAT::PNG); + Imaging::WriteToFile(path, image, ImageFormat::png); return true; } catch (const std::exception& e) @@ -112,13 +112,13 @@ void ScreenshotCheck() static std::string ScreenshotGetParkName() { - return GetGameState().Park.Name; + return getGameState().park.Name; } static std::string ScreenshotGetDirectory() { auto env = GetContext()->GetPlatformEnvironment(); - return env->GetDirectoryPath(DIRBASE::USER, DIRID::SCREENSHOT); + return env->GetDirectoryPath(DirBase::user, DirId::screenshots); } static std::pair ScreenshotGetDateTime() @@ -257,25 +257,25 @@ static void ReleaseDPI(DrawPixelInfo& dpi) static Viewport GetGiantViewport(int32_t rotation, ZoomLevel zoom) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Get the tile coordinates of each corner const TileCoordsXY cornerCoords[2][4] = { { // Map corners { 1, 1 }, - { gameState.MapSize.x - 2, gameState.MapSize.y - 2 }, - { 1, gameState.MapSize.y - 2 }, - { gameState.MapSize.x - 2, 1 }, + { gameState.mapSize.x - 2, gameState.mapSize.y - 2 }, + { 1, gameState.mapSize.y - 2 }, + { gameState.mapSize.x - 2, 1 }, }, { // Horizontal view clipping corners TileCoordsXY{ CoordsXY{ std::max(gClipSelectionA.x, 32), std::max(gClipSelectionA.y, 32) } }, - TileCoordsXY{ CoordsXY{ std::min(gClipSelectionB.x, (gameState.MapSize.x - 2) * 32), - std::min(gClipSelectionB.y, (gameState.MapSize.y - 2) * 32) } }, + TileCoordsXY{ CoordsXY{ std::min(gClipSelectionB.x, (gameState.mapSize.x - 2) * 32), + std::min(gClipSelectionB.y, (gameState.mapSize.y - 2) * 32) } }, TileCoordsXY{ - CoordsXY{ std::max(gClipSelectionA.x, 32), std::min(gClipSelectionB.y, (gameState.MapSize.y - 2) * 32) } }, + CoordsXY{ std::max(gClipSelectionA.x, 32), std::min(gClipSelectionB.y, (gameState.mapSize.y - 2) * 32) } }, TileCoordsXY{ - CoordsXY{ std::min(gClipSelectionB.x, (gameState.MapSize.x - 2) * 32), std::max(gClipSelectionA.y, 32) } }, + CoordsXY{ std::min(gClipSelectionB.x, (gameState.mapSize.x - 2) * 32), std::max(gClipSelectionA.y, 32) } }, }, }; @@ -465,7 +465,7 @@ int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOpti throw std::runtime_error("Failed to load park."); } - gScreenFlags = SCREEN_FLAGS_PLAYING; + gLegacyScene = LegacyScene::playing; Viewport viewport{}; if (giantScreenshot) @@ -500,7 +500,7 @@ int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOpti customRotation = std::atoi(argv[7]) & 3; } - const auto& mapSize = GetGameState().MapSize; + const auto& mapSize = getGameState().mapSize; if (resolutionWidth == 0 || resolutionHeight == 0) { resolutionWidth = (mapSize.x * kCoordsXYStep * 2) >> customZoom; @@ -531,11 +531,11 @@ int32_t CommandLineForScreenshot(const char** argv, int32_t argc, ScreenshotOpti } else { - auto& gameState = GetGameState(); - viewport.viewPos = { gameState.SavedView + auto& gameState = getGameState(); + viewport.viewPos = { gameState.savedView - ScreenCoordsXY{ (viewport.ViewWidth() / 2), (viewport.ViewHeight() / 2) } }; - viewport.zoom = gameState.SavedViewZoom; - viewport.rotation = gameState.SavedViewRotation; + viewport.zoom = gameState.savedViewZoom; + viewport.rotation = gameState.savedViewRotation; } } diff --git a/src/openrct2/interface/Viewport.cpp b/src/openrct2/interface/Viewport.cpp index 75a9008f3b..7c7c1a8431 100644 --- a/src/openrct2/interface/Viewport.cpp +++ b/src/openrct2/interface/Viewport.cpp @@ -102,7 +102,7 @@ namespace OpenRCT2 WindowInitAll(); // ? - InputResetFlags(); + gInputFlags.clearAll(); InputSetState(InputState::Reset); gPressedWidget.window_classification = WindowClass::Null; gPickupPeepImage = ImageId(); @@ -708,7 +708,7 @@ namespace OpenRCT2 return; } - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (gLegacyScene != LegacyScene::titleSequence) { int32_t height = (TileElementHeight({ sprite->x, sprite->y }))-16; int32_t underground = sprite->z < height; @@ -785,7 +785,7 @@ namespace OpenRCT2 || (peep.State == PeepState::LeavingRide && peep.x == kLocationNull)) { auto ride = GetRide(peep.CurrentRide); - if (ride != nullptr && (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + if (ride != nullptr && (ride->lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) { auto train = GetEntity(ride->vehicles[peep.CurrentTrain]); if (train != nullptr) @@ -806,7 +806,7 @@ namespace OpenRCT2 auto ride = GetRide(peep.CurrentRide); if (ride != nullptr) { - auto xy = ride->overall_view.ToTileCentre(); + auto xy = ride->overallView.ToTileCentre(); CoordsXYZ coordFocus; coordFocus.x = xy.x; coordFocus.y = xy.y; @@ -1009,7 +1009,7 @@ namespace OpenRCT2 } bool useParallelDrawing = false; - if (useMultithreading && (dpi.DrawingEngine->GetFlags() & DEF_PARALLEL_DRAWING)) + if (useMultithreading && dpi.DrawingEngine->GetFlags().has(DrawingEngineFlag::parallelDrawing)) { useParallelDrawing = true; } @@ -1084,7 +1084,7 @@ namespace OpenRCT2 static void ViewportPaintWeatherGloom(DrawPixelInfo& dpi) { - auto paletteId = ClimateGetWeatherGloomPaletteId(GetGameState().WeatherCurrent); + auto paletteId = ClimateGetWeatherGloomPaletteId(getGameState().weatherCurrent); if (paletteId != FilterPaletteID::PaletteNull) { auto x = dpi.x; @@ -1438,7 +1438,7 @@ namespace OpenRCT2 break; auto ride = vehicle->GetRide(); - if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (ride != nullptr && !ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { return (viewFlags & VIEWPORT_FLAG_INVISIBLE_RIDES) ? VisibilityKind::Hidden : VisibilityKind::Partial; @@ -1810,7 +1810,7 @@ namespace OpenRCT2 PROFILED_FUNCTION(); // if unknown viewport visibility, use the containing window to discover the status - if (viewport->visibility == VisibilityCache::Unknown) + if (viewport->visibility == VisibilityCache::unknown) { auto windowManager = Ui::GetWindowManager(); auto owner = windowManager->GetOwner(viewport); @@ -1824,7 +1824,7 @@ namespace OpenRCT2 } } - if (viewport->visibility == VisibilityCache::Covered) + if (viewport->visibility == VisibilityCache::covered) return; auto zoom = viewport->zoom; @@ -2044,12 +2044,12 @@ namespace OpenRCT2 if (w != nullptr) { Viewport* viewport = w->viewport; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - gameState.SavedView = ScreenCoordsXY{ viewport->ViewWidth() / 2, viewport->ViewHeight() / 2 } + viewport->viewPos; + gameState.savedView = ScreenCoordsXY{ viewport->ViewWidth() / 2, viewport->ViewHeight() / 2 } + viewport->viewPos; - gameState.SavedViewZoom = viewport->zoom; - gameState.SavedViewRotation = viewport->rotation; + gameState.savedViewZoom = viewport->zoom; + gameState.savedViewRotation = viewport->rotation; } } } // namespace OpenRCT2 diff --git a/src/openrct2/interface/Widget.h b/src/openrct2/interface/Widget.h index f6ef3ec91d..91c9b76f36 100644 --- a/src/openrct2/interface/Widget.h +++ b/src/openrct2/interface/Widget.h @@ -47,6 +47,7 @@ namespace OpenRCT2 ProgressBar = 29, Custom = 28, TextBox = 27, + HorizontalSeparator = 30, }; using WidgetFlags = uint32_t; @@ -150,7 +151,7 @@ namespace OpenRCT2 } }; - constexpr uint8_t kCloseButtonWidth = 10; + constexpr uint8_t kCloseButtonSize = 10; constexpr int32_t kScrollableRowHeight = 12; constexpr uint8_t kListRowHeight = 12; diff --git a/src/openrct2/interface/Window.cpp b/src/openrct2/interface/Window.cpp index 8c54ae978e..bc696678b0 100644 --- a/src/openrct2/interface/Window.cpp +++ b/src/openrct2/interface/Window.cpp @@ -39,7 +39,7 @@ namespace OpenRCT2 std::list> g_window_list; WindowBase* gWindowAudioExclusive; - WindowCloseModifier gLastCloseModifier = { { WindowClass::Null, 0 }, CloseWindowModifier::None }; + WindowCloseModifier gLastCloseModifier = { { WindowClass::Null, 0 }, CloseWindowModifier::none }; uint32_t gWindowUpdateTicks; colour_t gCurrentWindowColours[3]; @@ -315,7 +315,7 @@ static constexpr float kWindowScrollLocations[][2] = { auto screenCoords = Translate3DTo2DWithZ(w.viewport->rotation, coords); int32_t i = 0; - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (gLegacyScene != LegacyScene::titleSequence) { bool found = false; while (!found) @@ -629,7 +629,7 @@ static constexpr float kWindowScrollLocations[][2] = { bool isToolActive(WindowClass cls) { - return InputTestFlag(INPUT_FLAG_TOOL_ACTIVE) && gCurrentToolWidget.window_classification == cls; + return gInputFlags.has(InputFlag::toolActive) && gCurrentToolWidget.window_classification == cls; } bool isToolActive(WindowClass cls, rct_windownumber number) @@ -662,7 +662,7 @@ static constexpr float kWindowScrollLocations[][2] = { */ bool ToolSet(const WindowBase& w, WidgetIndex widgetIndex, Tool tool) { - if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) + if (gInputFlags.has(InputFlag::toolActive)) { if (w.classification == gCurrentToolWidget.window_classification && w.number == gCurrentToolWidget.window_number && widgetIndex == gCurrentToolWidget.widget_index) @@ -674,9 +674,9 @@ static constexpr float kWindowScrollLocations[][2] = { ToolCancel(); } - InputSetFlag(INPUT_FLAG_TOOL_ACTIVE, true); - InputSetFlag(INPUT_FLAG_4, false); - InputSetFlag(INPUT_FLAG_6, false); + gInputFlags.set(InputFlag::toolActive); + gInputFlags.unset(InputFlag::unk4); + gInputFlags.unset(InputFlag::unk6); gCurrentToolId = tool; gCurrentToolWidget.window_classification = w.classification; gCurrentToolWidget.window_number = w.number; @@ -690,9 +690,9 @@ static constexpr float kWindowScrollLocations[][2] = { */ void ToolCancel() { - if (InputTestFlag(INPUT_FLAG_TOOL_ACTIVE)) + if (gInputFlags.has(InputFlag::toolActive)) { - InputSetFlag(INPUT_FLAG_TOOL_ACTIVE, false); + gInputFlags.unset(InputFlag::toolActive); MapInvalidateSelectionRect(); MapInvalidateMapSelectionTiles(); @@ -724,7 +724,7 @@ static constexpr float kWindowScrollLocations[][2] = { void WindowResizeGui(int32_t width, int32_t height) { WindowResizeGuiScenarioEditor(width, height); - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + if (isInEditorMode()) return; auto* windowMgr = Ui::GetWindowManager(); @@ -850,16 +850,16 @@ static constexpr float kWindowScrollLocations[][2] = { { // w->visibility is used to prevent repeat calculations within an iteration by caching the result - if (w.visibility == VisibilityCache::Visible) + if (w.visibility == VisibilityCache::visible) return true; - if (w.visibility == VisibilityCache::Covered) + if (w.visibility == VisibilityCache::covered) return false; // only consider viewports, consider the main window always visible if (w.viewport == nullptr || w.classification == WindowClass::MainWindow) { // default to previous behaviour - w.visibility = VisibilityCache::Visible; + w.visibility = VisibilityCache::visible; return true; } @@ -876,15 +876,15 @@ static constexpr float kWindowScrollLocations[][2] = { && w_other.windowPos.x + w_other.width >= w.windowPos.x + w.width && w_other.windowPos.y + w_other.height >= w.windowPos.y + w.height) { - w.visibility = VisibilityCache::Covered; - w.viewport->visibility = VisibilityCache::Covered; + w.visibility = VisibilityCache::covered; + w.viewport->visibility = VisibilityCache::covered; return false; } } // default to previous behaviour - w.visibility = VisibilityCache::Visible; - w.viewport->visibility = VisibilityCache::Visible; + w.visibility = VisibilityCache::visible; + w.viewport->visibility = VisibilityCache::visible; return true; } @@ -937,10 +937,10 @@ static constexpr float kWindowScrollLocations[][2] = { { // reset window visibility status to unknown WindowVisitEach([](WindowBase* w) { - w->visibility = VisibilityCache::Unknown; + w->visibility = VisibilityCache::unknown; if (w->viewport != nullptr) { - w->viewport->visibility = VisibilityCache::Unknown; + w->viewport->visibility = VisibilityCache::unknown; } }); } diff --git a/src/openrct2/interface/Window.h b/src/openrct2/interface/Window.h index 5111d6af2f..48d472073a 100644 --- a/src/openrct2/interface/Window.h +++ b/src/openrct2/interface/Window.h @@ -96,6 +96,8 @@ namespace OpenRCT2 // Create only flags WF_AUTO_POSITION = (1 << 16), WF_CENTRE_SCREEN = (1 << 17), + + WF_NO_TITLE_BAR = (1 << 18), }; enum @@ -194,11 +196,11 @@ constexpr int32_t WC_TILE_INSPECTOR__WIDX_BANNER_SPINNER_HEIGHT_DECREASE = 30; enum class PromptMode : uint8_t { - SaveBeforeLoad = 0, - SaveBeforeQuit, - SaveBeforeQuit2, - SaveBeforeNewGame, - Quit + saveBeforeLoad = 0, + saveBeforeQuit, + saveBeforeQuit2, + saveBeforeNewGame, + quit }; enum BTM_TOOLBAR_DIRTY_FLAGS @@ -210,62 +212,64 @@ enum BTM_TOOLBAR_DIRTY_FLAGS BTM_TB_DIRTY_FLAG_PARK_RATING = (1 << 4) }; -// 000N_TTTL -enum +enum class LoadSaveAction : uint8_t { - LOADSAVETYPE_LOAD = 0 << 0, - LOADSAVETYPE_SAVE = 1 << 0, - - LOADSAVETYPE_GAME = 0 << 1, - LOADSAVETYPE_LANDSCAPE = 1 << 1, - LOADSAVETYPE_SCENARIO = 2 << 1, - LOADSAVETYPE_TRACK = 3 << 1, - LOADSAVETYPE_HEIGHTMAP = 4 << 1, + load, + save, }; -enum +enum class LoadSaveType : uint8_t { - MODAL_RESULT_FAIL = -1, - MODAL_RESULT_CANCEL, - MODAL_RESULT_OK + park, + landscape, + scenario, + track, + heightmap, +}; + +enum class ModalResult : int8_t +{ + fail = -1, + cancel, + ok, }; enum class VisibilityCache : uint8_t { - Unknown, - Visible, - Covered + unknown, + visible, + covered }; enum class CloseWindowModifier : uint8_t { - None, - Shift, - Control + none, + shift, + control }; enum class GuestListFilterType : int32_t { - GuestsOnRide, - GuestsInQueue, - GuestsThinkingAboutRide, - GuestsThinkingX, + guestsOnRide, + guestsInQueue, + guestsThinkingAboutRide, + guestsThinkingX, }; enum class Tool { - Arrow = 0, - UpArrow = 2, - UpDownArrow = 3, - Picker = 7, - Crosshair = 12, - PathDown = 17, - DigDown = 18, - WaterDown = 19, - WalkDown = 22, - PaintDown = 23, - EntranceDown = 24, - Bulldozer = 27, + arrow = 0, + upArrow = 2, + upDownArrow = 3, + picker = 7, + crosshair = 12, + pathDown = 17, + digDown = 18, + waterDown = 19, + walkDown = 22, + paintDown = 23, + entranceDown = 24, + bulldozer = 27, }; namespace OpenRCT2 @@ -280,7 +284,6 @@ namespace OpenRCT2 extern Tool gCurrentToolId; extern WidgetRef gCurrentToolWidget; - using modal_callback = void (*)(int32_t result); using CloseCallback = void (*)(); constexpr int8_t kWindowLimitMin = 4; diff --git a/src/openrct2/interface/Window_internal.h b/src/openrct2/interface/Window_internal.h index a5aade3cc9..587dbc9c3e 100644 --- a/src/openrct2/interface/Window_internal.h +++ b/src/openrct2/interface/Window_internal.h @@ -119,6 +119,11 @@ namespace OpenRCT2 WindowBase& operator=(const WindowBase&) = delete; + constexpr bool canBeResized() const + { + return (flags & WF_RESIZABLE) && (min_width != max_width || min_height != max_height); + } + // Events virtual void OnOpen() { diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index fab2e94f6d..1329c65536 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -84,7 +84,6 @@ - @@ -180,6 +179,7 @@ + @@ -327,6 +327,7 @@ + @@ -391,6 +392,7 @@ + @@ -559,45 +561,45 @@ + - - - - - - - - - - - - - - - - - - - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -660,7 +662,6 @@ - @@ -871,6 +872,7 @@ + @@ -1014,6 +1016,7 @@ + @@ -1093,6 +1096,7 @@ + diff --git a/src/openrct2/localisation/Language.cpp b/src/openrct2/localisation/Language.cpp index 3a883a5096..383ce2cbf7 100644 --- a/src/openrct2/localisation/Language.cpp +++ b/src/openrct2/localisation/Language.cpp @@ -20,7 +20,7 @@ using namespace OpenRCT2; const LanguageDescriptor LanguagesDescriptors[LANGUAGE_COUNT] = { { "", "", "", LANGUAGE_UNDEFINED, kFamilyOpenRCT2Sprite, false }, // LANGUAGE_UNDEFINED - { "ar-EG", "Arabic (experimental)", "Arabic (experimental)", LANGUAGE_UNDEFINED, FAMILY(&TTFFamilySansSerif), true }, // LANGUAGE_ARABIC + { "ar-EG", "Arabic (experimental)", "Arabic (experimental)", LANGUAGE_UNDEFINED, FAMILY(&TTFFamilyArabic), true }, // LANGUAGE_ARABIC { "ca-ES", "Catalan", u8"Català", LANGUAGE_UNDEFINED, kFamilyOpenRCT2Sprite, false }, // LANGUAGE_CATALAN { "zh-CN", "Chinese (Simplified)", "Chinese (Simplified)", LANGUAGE_UNDEFINED, FAMILY(&TTFFamilyChineseSimplified), false }, // LANGUAGE_CHINESE_SIMPLIFIED { "zh-TW", "Chinese (Traditional)", "Chinese (Traditional)", LANGUAGE_UNDEFINED, FAMILY(&TTFFamilyChineseTraditional), false }, // LANGUAGE_CHINESE_TRADITIONAL diff --git a/src/openrct2/localisation/LanguagePack.cpp b/src/openrct2/localisation/LanguagePack.cpp index fe6d86498e..c6eb9fc5bd 100644 --- a/src/openrct2/localisation/LanguagePack.cpp +++ b/src/openrct2/localisation/LanguagePack.cpp @@ -45,7 +45,7 @@ public: try { - OpenRCT2::FileStream fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); + OpenRCT2::FileStream fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::open); size_t fileLength = static_cast(fs.GetLength()); if (fileLength > MAX_LANGUAGE_SIZE) diff --git a/src/openrct2/localisation/LocalisationService.cpp b/src/openrct2/localisation/LocalisationService.cpp index 6f0871f740..d7de72a6be 100644 --- a/src/openrct2/localisation/LocalisationService.cpp +++ b/src/openrct2/localisation/LocalisationService.cpp @@ -70,7 +70,7 @@ const char* LocalisationService::GetString(StringId id) const std::string LocalisationService::GetLanguagePath(uint32_t languageId) const { auto locale = std::string(LanguagesDescriptors[languageId].locale); - auto languageDirectory = _env->GetDirectoryPath(DIRBASE::OPENRCT2, DIRID::LANGUAGE); + auto languageDirectory = _env->GetDirectoryPath(DirBase::openrct2, DirId::languages); auto languagePath = Path::Combine(languageDirectory, locale + u8".txt"); return languagePath; } diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index eca57ead66..47b0a3506b 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -207,6 +207,7 @@ enum : StringId STR_QUEUE_EMPTY = 1201, STR_QUEUE_ONE_PERSON = 1202, STR_QUEUE_PEOPLE = 1203, + STR_QUEUE_PATHS_CANNOT_BE_USED_FOR_LEVEL_CROSSINGS = 6751, STR_RIDE_COMPONENT_TRAIN = 1229, STR_RIDE_COMPONENT_TRAIN_PLURAL = 1230, @@ -1724,6 +1725,9 @@ enum : StringId STR_DIVE_LOOP_LEFT = 6727, STR_DIVE_LOOP_RIGHT = 6728, + STR_OBJECT_SELECTION_CLIMATE = 6743, + STR_CLIMATE_WEATHER_PERCENT = 6744, + // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working /* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings }; diff --git a/src/openrct2/management/Award.cpp b/src/openrct2/management/Award.cpp index ef9b61687b..354fe06351 100644 --- a/src/openrct2/management/Award.cpp +++ b/src/openrct2/management/Award.cpp @@ -11,13 +11,13 @@ #include "../GameState.h" #include "../config/Config.h" +#include "../entity/EntityList.h" #include "../entity/Guest.h" #include "../localisation/StringIds.h" #include "../profiling/Profiling.h" #include "../ride/Ride.h" #include "../ride/RideData.h" #include "../ride/RideManager.hpp" -#include "../scenario/Scenario.h" #include "../ui/WindowManager.h" #include "../world/Park.h" #include "NewsItem.h" @@ -101,7 +101,7 @@ static bool AwardIsDeservedMostUntidy(int32_t activeAwardTypes) } } - return (negativeCount > GetGameState().NumGuestsInPark / 16); + return (negativeCount > getGameState().numGuestsInPark / 16); } /** More than 1/64 of the total guests must be thinking tidy thoughts and less than 6 guests thinking untidy thoughts. */ @@ -133,7 +133,7 @@ static bool AwardIsDeservedMostTidy(int32_t activeAwardTypes) } } - return (negativeCount <= 5 && positiveCount > GetGameState().NumGuestsInPark / 64); + return (negativeCount <= 5 && positiveCount > getGameState().numGuestsInPark / 64); } /** At least 6 open roller coasters. */ @@ -142,18 +142,18 @@ static bool AwardIsDeservedBestRollercoasters([[maybe_unused]] int32_t activeAwa auto rollerCoasters = 0; for (const auto& ride : GetRideManager()) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) { continue; } - if (ride.status != RideStatus::Open || (ride.lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) + if (ride.status != RideStatus::open || (ride.lifecycleFlags & RIDE_LIFECYCLE_CRASHED)) { continue; } - if (!RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_ROLLERCOASTER)) + if (!RideEntryHasCategory(*rideEntry, RideCategory::rollerCoaster)) { continue; } @@ -166,7 +166,7 @@ static bool AwardIsDeservedBestRollercoasters([[maybe_unused]] int32_t activeAwa /** Entrance fee is 0.10 less than half of the total ride value. */ static bool AwardIsDeservedBestValue(int32_t activeAwardTypes) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (activeAwardTypes & EnumToFlag(AwardType::WorstValue)) return false; @@ -174,13 +174,13 @@ static bool AwardIsDeservedBestValue(int32_t activeAwardTypes) if (activeAwardTypes & EnumToFlag(AwardType::MostDisappointing)) return false; - if ((gameState.Park.Flags & PARK_FLAGS_NO_MONEY) || !Park::EntranceFeeUnlocked()) + if ((gameState.park.Flags & PARK_FLAGS_NO_MONEY) || !Park::EntranceFeeUnlocked()) return false; - if (gameState.TotalRideValueForMoney < 10.00_GBP) + if (gameState.totalRideValueForMoney < 10.00_GBP) return false; - if (Park::GetEntranceFee() + 0.10_GBP >= gameState.TotalRideValueForMoney / 2) + if (Park::GetEntranceFee() + 0.10_GBP >= gameState.totalRideValueForMoney / 2) return false; return true; @@ -216,23 +216,23 @@ static bool AwardIsDeservedMostBeautiful(int32_t activeAwardTypes) } } - return (negativeCount <= 15 && positiveCount > GetGameState().NumGuestsInPark / 128); + return (negativeCount <= 15 && positiveCount > getGameState().numGuestsInPark / 128); } /** Entrance fee is more than total ride value. */ static bool AwardIsDeservedWorstValue(int32_t activeAwardTypes) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (activeAwardTypes & EnumToFlag(AwardType::BestValue)) return false; - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) return false; const auto parkEntranceFee = Park::GetEntranceFee(); if (parkEntranceFee == 0.00_GBP) return false; - if (parkEntranceFee <= gameState.TotalRideValueForMoney) + if (parkEntranceFee <= gameState.totalRideValueForMoney) return false; return true; } @@ -257,7 +257,7 @@ static bool AwardIsDeservedSafest([[maybe_unused]] int32_t activeAwardTypes) // Check for rides that have crashed maybe? const auto& rideManager = GetRideManager(); if (std::any_of(rideManager.begin(), rideManager.end(), [](const Ride& ride) { - return ride.last_crash_type != RIDE_CRASH_TYPE_NONE; + return ride.lastCrashType != RIDE_CRASH_TYPE_NONE; })) { return false; @@ -289,9 +289,9 @@ static bool AwardIsDeservedBestFood(int32_t activeAwardTypes) uint64_t shopTypes = 0; for (const auto& ride : GetRideManager()) { - if (ride.status != RideStatus::Open) + if (ride.status != RideStatus::open) continue; - if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::sellsFood)) + if (!ride.getRideTypeDescriptor().HasFlag(RtdFlag::sellsFood)) continue; shops++; @@ -306,7 +306,7 @@ static bool AwardIsDeservedBestFood(int32_t activeAwardTypes) } } - if (shops < 7 || uniqueShops < 4 || shops < GetGameState().NumGuestsInPark / 128) + if (shops < 7 || uniqueShops < 4 || shops < getGameState().numGuestsInPark / 128) return false; // Count hungry peeps @@ -334,13 +334,13 @@ static bool AwardIsDeservedWorstFood(int32_t activeAwardTypes) uint64_t shopTypes = 0; for (const auto& ride : GetRideManager()) { - if (ride.status != RideStatus::Open) + if (ride.status != RideStatus::open) continue; - if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::sellsFood)) + if (!ride.getRideTypeDescriptor().HasFlag(RtdFlag::sellsFood)) continue; shops++; - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry != nullptr) { if (!(shopTypes & EnumToFlag(rideEntry->shop_item[0]))) @@ -351,7 +351,7 @@ static bool AwardIsDeservedWorstFood(int32_t activeAwardTypes) } } - if (uniqueShops > 2 || shops > GetGameState().NumGuestsInPark / 256) + if (uniqueShops > 2 || shops > getGameState().numGuestsInPark / 256) return false; // Count hungry peeps @@ -374,8 +374,8 @@ static bool AwardIsDeservedBestToilets([[maybe_unused]] int32_t activeAwardTypes // Count open toilets const auto& rideManager = GetRideManager(); auto numToilets = static_cast(std::count_if(rideManager.begin(), rideManager.end(), [](const Ride& ride) { - const auto& rtd = ride.GetRideTypeDescriptor(); - return rtd.specialType == RtdSpecialType::toilet && ride.status == RideStatus::Open; + const auto& rtd = ride.getRideTypeDescriptor(); + return rtd.specialType == RtdSpecialType::toilet && ride.status == RideStatus::open; })); // At least 4 open toilets @@ -383,7 +383,7 @@ static bool AwardIsDeservedBestToilets([[maybe_unused]] int32_t activeAwardTypes return false; // At least one open toilet for every 128 guests - if (numToilets < GetGameState().NumGuestsInPark / 128u) + if (numToilets < getGameState().numGuestsInPark / 128u) return false; // Count number of guests who are thinking they need the toilet @@ -405,7 +405,7 @@ static bool AwardIsDeservedMostDisappointing(int32_t activeAwardTypes) { if (activeAwardTypes & EnumToFlag(AwardType::BestValue)) return false; - if (GetGameState().Park.Rating > 650) + if (getGameState().park.Rating > 650) return false; // Count the number of disappointing rides @@ -433,18 +433,18 @@ static bool AwardIsDeservedBestWaterRides([[maybe_unused]] int32_t activeAwardTy auto waterRides = 0; for (const auto& ride : GetRideManager()) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) { continue; } - if (ride.status != RideStatus::Open || (ride.lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) + if (ride.status != RideStatus::open || (ride.lifecycleFlags & RIDE_LIFECYCLE_CRASHED)) { continue; } - if (!RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_WATER)) + if (!RideEntryHasCategory(*rideEntry, RideCategory::water)) { continue; } @@ -464,13 +464,13 @@ static bool AwardIsDeservedBestCustomDesignedRides(int32_t activeAwardTypes) auto customDesignedRides = 0; for (const auto& ride : GetRideManager()) { - if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (!ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) continue; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_NOT_CUSTOM_DESIGN) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_NOT_CUSTOM_DESIGN) continue; if (ride.ratings.excitement < MakeRideRating(5, 50)) continue; - if (ride.status != RideStatus::Open || (ride.lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) + if (ride.status != RideStatus::open || (ride.lifecycleFlags & RIDE_LIFECYCLE_CRASHED)) continue; customDesignedRides++; @@ -496,12 +496,12 @@ static bool AwardIsDeservedMostDazzlingRideColours(int32_t activeAwardTypes) auto colourfulRides = 0; for (const auto& ride : GetRideManager()) { - if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (!ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) continue; countedRides++; - auto mainTrackColour = ride.track_colour[0].main; + auto mainTrackColour = ride.trackColours[0].main; for (auto dazzling_ride_colour : dazzling_ride_colours) { if (mainTrackColour == dazzling_ride_colour) @@ -540,18 +540,18 @@ static bool AwardIsDeservedBestGentleRides([[maybe_unused]] int32_t activeAwardT auto gentleRides = 0; for (const auto& ride : GetRideManager()) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) { continue; } - if (ride.status != RideStatus::Open || (ride.lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) + if (ride.status != RideStatus::open || (ride.lifecycleFlags & RIDE_LIFECYCLE_CRASHED)) { continue; } - if (!RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_GENTLE)) + if (!RideEntryHasCategory(*rideEntry, RideCategory::gentle)) { continue; } @@ -593,7 +593,7 @@ static bool AwardIsDeserved(AwardType awardType, int32_t activeAwardTypes) void AwardReset() { - GetGameState().CurrentAwards.clear(); + getGameState().currentAwards.clear(); } /** @@ -604,8 +604,8 @@ void AwardUpdateAll() { PROFILED_FUNCTION(); - auto& gameState = GetGameState(); - auto& currentAwards = gameState.CurrentAwards; + auto& gameState = getGameState(); + auto& currentAwards = gameState.currentAwards; auto* windowMgr = Ui::GetWindowManager(); // Decrease award times @@ -624,7 +624,7 @@ void AwardUpdateAll() } // Only add new awards if park is open - if (gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) + if (gameState.park.Flags & PARK_FLAGS_PARK_OPEN) { // Set active award types as flags int32_t activeAwardTypes = 0; diff --git a/src/openrct2/management/Finance.cpp b/src/openrct2/management/Finance.cpp index 8e70a904ee..00a098e115 100644 --- a/src/openrct2/management/Finance.cpp +++ b/src/openrct2/management/Finance.cpp @@ -14,12 +14,12 @@ #include "../GameState.h" #include "../OpenRCT2.h" #include "../core/EnumUtils.hpp" +#include "../entity/EntityList.h" #include "../entity/Peep.h" #include "../entity/Staff.h" #include "../profiling/Profiling.h" #include "../ride/Ride.h" #include "../ride/RideManager.hpp" -#include "../scenario/Scenario.h" #include "../ui/WindowManager.h" #include "../util/Util.h" #include "../windows/Intent.h" @@ -47,9 +47,9 @@ static constexpr int32_t dword_988E60[EnumValue(ExpenditureType::Count)] = { */ bool FinanceCheckMoneyRequired(uint32_t flags) { - if (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) + if (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) return false; - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + if (isInEditorMode()) return false; if (flags & GAME_COMMAND_FLAG_NO_SPEND) return false; @@ -65,7 +65,7 @@ bool FinanceCheckMoneyRequired(uint32_t flags) */ bool FinanceCheckAffordability(money64 cost, uint32_t flags) { - return !FinanceCheckMoneyRequired(flags) || cost <= 0 || cost <= GetGameState().Cash; + return !FinanceCheckMoneyRequired(flags) || cost <= 0 || cost <= getGameState().cash; } /** @@ -77,14 +77,14 @@ bool FinanceCheckAffordability(money64 cost, uint32_t flags) void FinancePayment(money64 amount, ExpenditureType type) { // overflow check - auto& gameState = GetGameState(); - gameState.Cash = AddClamp(gameState.Cash, -amount); + auto& gameState = getGameState(); + gameState.cash = AddClamp(gameState.cash, -amount); - gameState.ExpenditureTable[0][EnumValue(type)] -= amount; + gameState.expenditureTable[0][EnumValue(type)] -= amount; if (dword_988E60[EnumValue(type)] & 1) { // Cumulative amount of money spent this day - gameState.CurrentExpenditure -= amount; + gameState.currentExpenditure -= amount; } auto intent = Intent(INTENT_ACTION_UPDATE_CASH); @@ -99,7 +99,7 @@ void FinancePayWages() { PROFILED_FUNCTION(); - if (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) + if (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) { return; } @@ -116,13 +116,13 @@ void FinancePayWages() **/ void FinancePayResearch() { - const auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + const auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) { return; } - const uint8_t level = gameState.ResearchFundingLevel; + const uint8_t level = gameState.researchFundingLevel; FinancePayment(research_cost_table[level] / 4, ExpenditureType::Research); } @@ -132,18 +132,18 @@ void FinancePayResearch() */ void FinancePayInterest() { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) { return; } // This variable uses the 64-bit type as the computation below can involve multiplying very large numbers // that will overflow money64 if the loan is greater than (1 << 31) / (5 * current_interest_rate) - const money64 current_loan = gameState.BankLoan; - const auto current_interest_rate = gameState.BankLoanInterestRate; - const money64 interest_to_pay = (gameState.Park.Flags & PARK_FLAGS_RCT1_INTEREST) + const money64 current_loan = gameState.bankLoan; + const auto current_interest_rate = gameState.bankLoanInterestRate; + const money64 interest_to_pay = (gameState.park.Flags & PARK_FLAGS_RCT1_INTEREST) ? (current_loan / 2400) : (current_loan * 5 * current_interest_rate) >> 14; @@ -160,44 +160,44 @@ void FinancePayRideUpkeep() for (auto& ride : GetRideManager()) { - if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_EVER_BEEN_OPENED)) + if (!(ride.lifecycleFlags & RIDE_LIFECYCLE_EVER_BEEN_OPENED)) { - ride.Renew(); + ride.renew(); } - if (ride.status != RideStatus::Closed && !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY)) + if (ride.status != RideStatus::closed && !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY)) { - auto upkeep = ride.upkeep_cost; + auto upkeep = ride.upkeepCost; if (upkeep != kMoney64Undefined) { - ride.total_profit -= upkeep; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.totalProfit -= upkeep; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME; FinancePayment(upkeep, ExpenditureType::RideRunningCosts); } } - if (ride.last_crash_type != RIDE_CRASH_TYPE_NONE) + if (ride.lastCrashType != RIDE_CRASH_TYPE_NONE) { - ride.last_crash_type--; + ride.lastCrashType--; } } } void FinanceResetHistory() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); for (auto i = 0; i < kFinanceHistorySize; i++) { - gameState.CashHistory[i] = kMoney64Undefined; - gameState.WeeklyProfitHistory[i] = kMoney64Undefined; - gameState.Park.ValueHistory[i] = kMoney64Undefined; + gameState.cashHistory[i] = kMoney64Undefined; + gameState.weeklyProfitHistory[i] = kMoney64Undefined; + gameState.park.ValueHistory[i] = kMoney64Undefined; } for (uint32_t i = 0; i < kExpenditureTableMonthCount; ++i) { for (uint32_t j = 0; j < static_cast(ExpenditureType::Count); ++j) { - gameState.ExpenditureTable[i][j] = 0; + gameState.expenditureTable[i][j] = 0; } } } @@ -208,34 +208,34 @@ void FinanceResetHistory() */ void FinanceInit() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // It only initialises the first month for (uint32_t i = 0; i < static_cast(ExpenditureType::Count); i++) { - gameState.ExpenditureTable[0][i] = 0; + gameState.expenditureTable[0][i] = 0; } - gameState.CurrentExpenditure = 0; - gameState.CurrentProfit = 0; + gameState.currentExpenditure = 0; + gameState.currentProfit = 0; - gameState.WeeklyProfitAverageDividend = 0; - gameState.WeeklyProfitAverageDivisor = 0; + gameState.weeklyProfitAverageDividend = 0; + gameState.weeklyProfitAverageDivisor = 0; - gameState.InitialCash = 10000.00_GBP; // Cheat detection + gameState.initialCash = 10000.00_GBP; // Cheat detection - gameState.Cash = 10000.00_GBP; - gameState.BankLoan = 10000.00_GBP; - gameState.MaxBankLoan = 20000.00_GBP; + gameState.cash = 10000.00_GBP; + gameState.bankLoan = 10000.00_GBP; + gameState.maxBankLoan = 20000.00_GBP; - gameState.BankLoanInterestRate = 10; - gameState.Park.Value = 0; - gameState.CompanyValue = 0; - gameState.HistoricalProfit = 0; - gameState.ScenarioCompletedCompanyValue = kMoney64Undefined; - gameState.TotalAdmissions = 0; - gameState.TotalIncomeFromAdmissions = 0; - gameState.ScenarioCompletedBy = std::string("?"); + gameState.bankLoanInterestRate = 10; + gameState.park.Value = 0; + gameState.companyValue = 0; + gameState.historicalProfit = 0; + gameState.scenarioCompletedCompanyValue = kMoney64Undefined; + gameState.totalAdmissions = 0; + gameState.totalIncomeFromAdmissions = 0; + gameState.scenarioCompletedBy = std::string("?"); } /** @@ -245,14 +245,14 @@ void FinanceInit() void FinanceUpdateDailyProfit() { PROFILED_FUNCTION(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - gameState.CurrentProfit = 7 * gameState.CurrentExpenditure; - gameState.CurrentExpenditure = 0; // Reset daily expenditure + gameState.currentProfit = 7 * gameState.currentExpenditure; + gameState.currentExpenditure = 0; // Reset daily expenditure money64 current_profit = 0; - if (!(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) { // Staff costs for (auto peep : EntityList()) @@ -261,19 +261,19 @@ void FinanceUpdateDailyProfit() } // Research costs - uint8_t level = gameState.ResearchFundingLevel; + uint8_t level = gameState.researchFundingLevel; current_profit -= research_cost_table[level]; // Loan costs - auto current_loan = gameState.BankLoan; + auto current_loan = gameState.bankLoan; current_profit -= current_loan / 600; // Ride costs for (auto& ride : GetRideManager()) { - if (ride.status != RideStatus::Closed && ride.upkeep_cost != kMoney64Undefined) + if (ride.status != RideStatus::closed && ride.upkeepCost != kMoney64Undefined) { - current_profit -= 2 * ride.upkeep_cost; + current_profit -= 2 * ride.upkeepCost; } } } @@ -281,11 +281,11 @@ void FinanceUpdateDailyProfit() // This is not equivalent to / 4 due to rounding of negative numbers current_profit = current_profit >> 2; - gameState.CurrentProfit += current_profit; + gameState.currentProfit += current_profit; // These are related to weekly profit graph - gameState.WeeklyProfitAverageDividend += gameState.CurrentProfit; - gameState.WeeklyProfitAverageDivisor += 1; + gameState.weeklyProfitAverageDividend += gameState.currentProfit; + gameState.weeklyProfitAverageDivisor += 1; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::Finances); @@ -293,22 +293,22 @@ void FinanceUpdateDailyProfit() money64 FinanceGetInitialCash() { - return GetGameState().InitialCash; + return getGameState().initialCash; } money64 FinanceGetCurrentLoan() { - return GetGameState().BankLoan; + return getGameState().bankLoan; } money64 FinanceGetMaximumLoan() { - return GetGameState().MaxBankLoan; + return getGameState().maxBankLoan; } money64 FinanceGetCurrentCash() { - return GetGameState().Cash; + return getGameState().cash; } /** @@ -318,15 +318,15 @@ money64 FinanceGetCurrentCash() */ void FinanceShiftExpenditureTable() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // If kExpenditureTableMonthCount months have passed then is full, sum the oldest month if (GetDate().GetMonthsElapsed() >= kExpenditureTableMonthCount) { const money64 sum = std::accumulate( - std::cbegin(gameState.ExpenditureTable[kExpenditureTableMonthCount - 1]), - std::cend(gameState.ExpenditureTable[kExpenditureTableMonthCount - 1]), money64{}); + std::cbegin(gameState.expenditureTable[kExpenditureTableMonthCount - 1]), + std::cend(gameState.expenditureTable[kExpenditureTableMonthCount - 1]), money64{}); - gameState.HistoricalProfit += sum; + gameState.historicalProfit += sum; } // Shift the table @@ -334,14 +334,14 @@ void FinanceShiftExpenditureTable() { for (size_t j = 0; j < static_cast(ExpenditureType::Count); j++) { - gameState.ExpenditureTable[i][j] = gameState.ExpenditureTable[i - 1][j]; + gameState.expenditureTable[i][j] = gameState.expenditureTable[i - 1][j]; } } // Zero the beginning of the table, which is the new month for (uint32_t i = 0; i < static_cast(ExpenditureType::Count); i++) { - gameState.ExpenditureTable[0][i] = 0; + gameState.expenditureTable[0][i] = 0; } auto* windowMgr = Ui::GetWindowManager(); @@ -354,8 +354,8 @@ void FinanceShiftExpenditureTable() */ void FinanceResetCashToInitial() { - auto& gameState = GetGameState(); - gameState.Cash = gameState.InitialCash; + auto& gameState = getGameState(); + gameState.cash = gameState.initialCash; } /** @@ -366,7 +366,7 @@ money64 FinanceGetLastMonthShopProfit() money64 profit = 0; if (GetDate().GetMonthsElapsed() != 0) { - const auto* lastMonthExpenditure = GetGameState().ExpenditureTable[1]; + const auto* lastMonthExpenditure = getGameState().expenditureTable[1]; profit += lastMonthExpenditure[EnumValue(ExpenditureType::ShopSales)]; profit += lastMonthExpenditure[EnumValue(ExpenditureType::ShopStock)]; diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index 8736e7daac..8d4e65cbc3 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -92,7 +92,7 @@ static void MarketingRaiseFinishedNotification(const MarketingCampaign& campaign auto ride = GetRide(campaign.RideId); if (ride != nullptr) { - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } } else if (campaign.Type == ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE) @@ -112,12 +112,12 @@ void MarketingUpdate() { PROFILED_FUNCTION(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - if (gameState.Cheats.neverendingMarketing) + if (gameState.cheats.neverendingMarketing) return; - for (auto it = gameState.MarketingCampaigns.begin(); it != gameState.MarketingCampaigns.end();) + for (auto it = gameState.marketingCampaigns.begin(); it != gameState.marketingCampaigns.end();) { auto& campaign = *it; if (campaign.Flags & MarketingCampaignFlags::FIRST_WEEK) @@ -134,7 +134,7 @@ void MarketingUpdate() if (campaign.WeeksLeft == 0) { MarketingRaiseFinishedNotification(campaign); - it = gameState.MarketingCampaigns.erase(it); + it = gameState.marketingCampaigns.erase(it); } else { @@ -202,7 +202,7 @@ bool MarketingIsCampaignTypeApplicable(int32_t campaignType) // Check if any rides exist for (auto& ride : GetRideManager()) { - if (ride.IsRide()) + if (ride.isRide()) { return true; } @@ -213,7 +213,7 @@ bool MarketingIsCampaignTypeApplicable(int32_t campaignType) // Check if any food or drink stalls exist for (auto& ride : GetRideManager()) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry != nullptr) { for (auto& item : rideEntry->shop_item) @@ -234,7 +234,7 @@ bool MarketingIsCampaignTypeApplicable(int32_t campaignType) MarketingCampaign* MarketingGetCampaign(int32_t campaignType) { - for (auto& campaign : GetGameState().MarketingCampaigns) + for (auto& campaign : getGameState().marketingCampaigns) { if (campaign.Type == campaignType) { @@ -254,7 +254,7 @@ void MarketingNewCampaign(const MarketingCampaign& campaign) } else { - GetGameState().MarketingCampaigns.push_back(campaign); + getGameState().marketingCampaigns.push_back(campaign); } } @@ -268,7 +268,7 @@ void MarketingCancelCampaignsForRide(const RideId rideId) return false; }; - auto& v = GetGameState().MarketingCampaigns; + auto& v = getGameState().marketingCampaigns; auto removedIt = std::remove_if(v.begin(), v.end(), isCampaignForRideFn); v.erase(removedIt, v.end()); } diff --git a/src/openrct2/management/NewsItem.cpp b/src/openrct2/management/NewsItem.cpp index a744a64d8e..14033d8708 100644 --- a/src/openrct2/management/NewsItem.cpp +++ b/src/openrct2/management/NewsItem.cpp @@ -53,7 +53,7 @@ bool News::IsValidIndex(int32_t index) News::Item* News::GetItem(int32_t index) { - return GetGameState().NewsItems.At(index); + return getGameState().newsItems.At(index); } News::Item& News::ItemQueues::operator[](size_t index) @@ -86,7 +86,7 @@ const News::Item* News::ItemQueues::At(int32_t index) const bool News::IsQueueEmpty() { - return GetGameState().NewsItems.IsEmpty(); + return getGameState().newsItems.IsEmpty(); } bool News::ItemQueues::IsEmpty() const @@ -104,14 +104,13 @@ void News::ItemQueues::Clear() Archived.clear(); } -void News::InitQueue() +void News::InitQueue(GameState_t& gameState) { - auto& gameState = GetGameState(); - gameState.NewsItems.Clear(); - assert(gameState.NewsItems.IsEmpty()); + gameState.newsItems.Clear(); + assert(gameState.newsItems.IsEmpty()); // Throttles for warning types (PEEP_*_WARNING) - for (auto& warningThrottle : gameState.PeepWarningThrottle) + for (auto& warningThrottle : gameState.peepWarningThrottle) { warningThrottle = 0; } @@ -127,9 +126,9 @@ uint16_t News::ItemQueues::IncrementTicks() static void TickCurrent() { - int32_t ticks = GetGameState().NewsItems.IncrementTicks(); + int32_t ticks = getGameState().newsItems.IncrementTicks(); // Only play news item sound when in normal playing mode - if (ticks == 1 && (gScreenFlags == SCREEN_FLAGS_PLAYING)) + if (ticks == 1 && (gLegacyScene == LegacyScene::playing)) { // Play sound OpenRCT2::Audio::Play(OpenRCT2::Audio::SoundId::NewsItem, 0, ContextGetWidth() / 2); @@ -158,9 +157,9 @@ void News::UpdateCurrentItem() { PROFILED_FUNCTION(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Check if there is a current news item - if (gameState.NewsItems.IsEmpty()) + if (gameState.newsItems.IsEmpty()) return; auto intent = Intent(INTENT_ACTION_INVALIDATE_TICKER_NEWS); @@ -170,8 +169,8 @@ void News::UpdateCurrentItem() TickCurrent(); // Removal of current news item - if (gameState.NewsItems.CurrentShouldBeArchived()) - gameState.NewsItems.ArchiveCurrent(); + if (gameState.newsItems.CurrentShouldBeArchived()) + gameState.newsItems.ArchiveCurrent(); } /** @@ -180,7 +179,7 @@ void News::UpdateCurrentItem() */ void News::CloseCurrentItem() { - GetGameState().NewsItems.ArchiveCurrent(); + getGameState().newsItems.ArchiveCurrent(); } void News::ItemQueues::ArchiveCurrent() @@ -218,11 +217,11 @@ std::optional News::GetSubjectLocation(News::ItemType type, int32_t s case News::ItemType::Ride: { Ride* ride = GetRide(RideId::FromUnderlying(subject)); - if (ride == nullptr || ride->overall_view.IsNull()) + if (ride == nullptr || ride->overallView.IsNull()) { break; } - auto rideViewCentre = ride->overall_view.ToTileCentre(); + auto rideViewCentre = ride->overallView.ToTileCentre(); subjectLoc = CoordsXYZ{ rideViewCentre, TileElementHeight(rideViewCentre) }; break; } @@ -244,7 +243,7 @@ std::optional News::GetSubjectLocation(News::ItemType type, int32_t s // Find which ride peep is on Ride* ride = GetRide(peep->CurrentRide); - if (ride == nullptr || !(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + if (ride == nullptr || !(ride->lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) { subjectLoc = std::nullopt; break; @@ -327,7 +326,7 @@ News::Item* News::AddItemToQueue(ItemType type, StringId string_id, EntityId ass News::Item* News::AddItemToQueue(News::ItemType type, const utf8* text, uint32_t assoc) { auto& date = GetDate(); - News::Item* newsItem = GetGameState().NewsItems.FirstOpenOrNewSlot(); + News::Item* newsItem = getGameState().newsItems.FirstOpenOrNewSlot(); newsItem->Type = type; newsItem->Flags = 0; newsItem->Assoc = assoc; // Make optional for Award, Money, Graph and Null @@ -413,7 +412,7 @@ void News::OpenSubject(News::ItemType type, int32_t subject) case News::ItemType::Peeps: { auto intent = Intent(WindowClass::GuestList); - intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::GuestsThinkingX)); + intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::guestsThinkingX)); intent.PutExtra(INTENT_EXTRA_RIDE_ID, subject); ContextOpenIntent(&intent); break; @@ -437,13 +436,13 @@ void News::OpenSubject(News::ItemType type, int32_t subject) */ void News::DisableNewsItems(News::ItemType type, uint32_t assoc) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // TODO: write test invalidating windows - gameState.NewsItems.ForeachRecentNews([type, assoc, &gameState](auto& newsItem) { + gameState.newsItems.ForeachRecentNews([type, assoc, &gameState](auto& newsItem) { if (type == newsItem.Type && assoc == newsItem.Assoc) { newsItem.SetFlags(News::ItemFlags::HasButton); - if (&newsItem == &gameState.NewsItems.Current()) + if (&newsItem == &gameState.newsItems.Current()) { auto intent = Intent(INTENT_ACTION_INVALIDATE_TICKER_NEWS); ContextBroadcastIntent(&intent); @@ -451,7 +450,7 @@ void News::DisableNewsItems(News::ItemType type, uint32_t assoc) } }); - gameState.NewsItems.ForeachArchivedNews([type, assoc](auto& newsItem) { + gameState.newsItems.ForeachArchivedNews([type, assoc](auto& newsItem) { if (type == newsItem.Type && assoc == newsItem.Assoc) { newsItem.SetFlags(News::ItemFlags::HasButton); @@ -463,7 +462,7 @@ void News::DisableNewsItems(News::ItemType type, uint32_t assoc) void News::AddItemToQueue(News::Item* newNewsItem) { - News::Item* newsItem = GetGameState().NewsItems.FirstOpenOrNewSlot(); + News::Item* newsItem = getGameState().newsItems.FirstOpenOrNewSlot(); *newsItem = *newNewsItem; } @@ -472,15 +471,30 @@ void News::RemoveItem(int32_t index) if (index < 0 || index >= News::MaxItems) return; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // News item is already null, no need to remove it - if (gameState.NewsItems[index].Type == News::ItemType::Null) + if (gameState.newsItems[index].Type == News::ItemType::Null) return; size_t newsBoundary = index < News::ItemHistoryStart ? News::ItemHistoryStart : News::MaxItems; for (size_t i = index; i < newsBoundary - 1; i++) { - gameState.NewsItems[i] = gameState.NewsItems[i + 1]; + gameState.newsItems[i] = gameState.newsItems[i + 1]; + } + gameState.newsItems[newsBoundary - 1].Type = News::ItemType::Null; +} + +void News::importNewsItems( + GameState_t& gameState, const std::span recent, const std::span archived) +{ + gameState.newsItems.Clear(); + + for (size_t i = 0; i < std::min(recent.size(), News::ItemHistoryStart); i++) + { + gameState.newsItems[i] = recent[i]; + } + for (size_t i = 0; i < std::min(archived.size(), News::MaxItemsArchive); i++) + { + gameState.newsItems[News::ItemHistoryStart + i] = archived[i]; } - gameState.NewsItems[newsBoundary - 1].Type = News::ItemType::Null; } diff --git a/src/openrct2/management/NewsItem.h b/src/openrct2/management/NewsItem.h index 8e850b2a89..4eb89d7fcc 100644 --- a/src/openrct2/management/NewsItem.h +++ b/src/openrct2/management/NewsItem.h @@ -17,11 +17,17 @@ #include #include #include +#include #include struct CoordsXYZ; class Formatter; +namespace OpenRCT2 +{ + struct GameState_t; +} + namespace OpenRCT2::News { enum class ItemType : uint8_t @@ -58,13 +64,13 @@ namespace OpenRCT2::News */ struct Item { - News::ItemType Type; - uint8_t Flags; - uint32_t Assoc; - uint16_t Ticks; - uint16_t MonthYear; - uint8_t Day; - std::string Text; + News::ItemType Type = News::ItemType::Null; + uint8_t Flags{}; + uint32_t Assoc{}; + uint16_t Ticks{}; + uint16_t MonthYear{}; + uint8_t Day{}; + std::string Text{}; constexpr bool IsEmpty() const noexcept { @@ -235,7 +241,7 @@ namespace OpenRCT2::News void clear() noexcept { - front().Type = News::ItemType::Null; + std::fill(Queue.begin(), Queue.end(), News::Item{}); } private: @@ -290,7 +296,7 @@ namespace OpenRCT2::News News::ItemQueue Archived; }; - void InitQueue(); + void InitQueue(GameState_t& gameState); void UpdateCurrentItem(); void CloseCurrentItem(); @@ -315,4 +321,7 @@ namespace OpenRCT2::News void AddItemToQueue(News::Item* newNewsItem); void RemoveItem(int32_t index); + + void importNewsItems( + GameState_t& gameState, const std::span recent, const std::span archived); } // namespace OpenRCT2::News diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index 7ae376b20e..d5c1b9df81 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -33,7 +33,6 @@ #include "../ride/RideData.h" #include "../ride/RideEntry.h" #include "../ride/TrackData.h" -#include "../scenario/Scenario.h" #include "../ui/WindowManager.h" #include "../windows/Intent.h" #include "../world/Park.h" @@ -73,8 +72,8 @@ const StringId kResearchFundingLevelNames[] = { */ void ResearchResetItems(GameState_t& gameState) { - gameState.ResearchItemsUninvented.clear(); - gameState.ResearchItemsInvented.clear(); + gameState.researchItemsUninvented.clear(); + gameState.researchItemsInvented.clear(); } /** @@ -83,15 +82,15 @@ void ResearchResetItems(GameState_t& gameState) */ void ResearchUpdateUncompletedTypes() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); int32_t uncompletedResearchTypes = 0; - for (auto const& researchItem : gameState.ResearchItemsUninvented) + for (auto const& researchItem : gameState.researchItemsUninvented) { uncompletedResearchTypes |= EnumToFlag(researchItem.category); } - gameState.ResearchUncompletedCategories = uncompletedResearchTypes; + gameState.researchUncompletedCategories = uncompletedResearchTypes; } /** @@ -100,19 +99,19 @@ void ResearchUpdateUncompletedTypes() */ static void ResearchCalculateExpectedDate() { - auto& gameState = GetGameState(); - if (gameState.ResearchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH - || gameState.ResearchFundingLevel == RESEARCH_FUNDING_NONE) + auto& gameState = getGameState(); + if (gameState.researchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH + || gameState.researchFundingLevel == RESEARCH_FUNDING_NONE) { - gameState.ResearchExpectedDay = 255; + gameState.researchExpectedDay = 255; } else { auto& date = GetDate(); - int32_t progressRemaining = gameState.ResearchProgressStage == RESEARCH_STAGE_COMPLETING_DESIGN ? 0x10000 : 0x20000; - progressRemaining -= gameState.ResearchProgress; - int32_t daysRemaining = (progressRemaining / _researchRate[gameState.ResearchFundingLevel]) * 128; + int32_t progressRemaining = gameState.researchProgressStage == RESEARCH_STAGE_COMPLETING_DESIGN ? 0x10000 : 0x20000; + progressRemaining -= gameState.researchProgress; + int32_t daysRemaining = (progressRemaining / _researchRate[gameState.researchFundingLevel]) * 128; int32_t expectedDay = date.GetMonthTicks() + (daysRemaining & 0xFFFF); int32_t dayQuotient = expectedDay / 0x10000; @@ -121,8 +120,8 @@ static void ResearchCalculateExpectedDate() int32_t expectedMonth = DateGetMonth(date.GetMonthsElapsed() + dayQuotient + (daysRemaining >> 16)); expectedDay = (dayRemainder * Date::GetDaysInMonth(expectedMonth)) >> 16; - gameState.ResearchExpectedDay = expectedDay; - gameState.ResearchExpectedMonth = expectedMonth; + gameState.researchExpectedDay = expectedDay; + gameState.researchExpectedMonth = expectedMonth; } } @@ -135,12 +134,12 @@ static void ResearchInvalidateRelatedWindows() static void ResearchMarkAsFullyCompleted() { - auto& gameState = GetGameState(); - gameState.ResearchProgress = 0; - gameState.ResearchProgressStage = RESEARCH_STAGE_FINISHED_ALL; + auto& gameState = getGameState(); + gameState.researchProgress = 0; + gameState.researchProgressStage = RESEARCH_STAGE_FINISHED_ALL; ResearchInvalidateRelatedWindows(); // Reset funding to 0 if no more rides. - auto gameAction = ParkSetResearchFundingAction(gameState.ResearchPriorities, 0); + auto gameAction = ParkSetResearchFundingAction(gameState.researchPriorities, 0); GameActions::Execute(&gameAction); } @@ -150,8 +149,8 @@ static void ResearchMarkAsFullyCompleted() */ static void ResearchNextDesign() { - auto& gameState = GetGameState(); - if (gameState.ResearchItemsUninvented.empty()) + auto& gameState = getGameState(); + if (gameState.researchItemsUninvented.empty()) { ResearchMarkAsFullyCompleted(); return; @@ -159,31 +158,31 @@ static void ResearchNextDesign() // Try to find a research item of a matching type, if none found, use any first item auto it = std::find_if( - gameState.ResearchItemsUninvented.begin(), gameState.ResearchItemsUninvented.end(), - [&gameState](const auto& e) { return (gameState.ResearchPriorities & EnumToFlag(e.category)) != 0; }); - if (it == gameState.ResearchItemsUninvented.end()) + gameState.researchItemsUninvented.begin(), gameState.researchItemsUninvented.end(), + [&gameState](const auto& e) { return (gameState.researchPriorities & EnumToFlag(e.category)) != 0; }); + if (it == gameState.researchItemsUninvented.end()) { - it = gameState.ResearchItemsUninvented.begin(); + it = gameState.researchItemsUninvented.begin(); } - gameState.ResearchNextItem = *it; - gameState.ResearchProgress = 0; - gameState.ResearchProgressStage = RESEARCH_STAGE_DESIGNING; + gameState.researchNextItem = *it; + gameState.researchProgress = 0; + gameState.researchProgressStage = RESEARCH_STAGE_DESIGNING; ResearchInvalidateRelatedWindows(); } static void MarkResearchItemInvented(const ResearchItem& researchItem) { - auto& gameState = GetGameState(); - gameState.ResearchItemsUninvented.erase( - std::remove(gameState.ResearchItemsUninvented.begin(), gameState.ResearchItemsUninvented.end(), researchItem), - gameState.ResearchItemsUninvented.end()); + auto& gameState = getGameState(); + gameState.researchItemsUninvented.erase( + std::remove(gameState.researchItemsUninvented.begin(), gameState.researchItemsUninvented.end(), researchItem), + gameState.researchItemsUninvented.end()); - if (std::find(gameState.ResearchItemsInvented.begin(), gameState.ResearchItemsInvented.end(), researchItem) - == gameState.ResearchItemsInvented.end()) + if (std::find(gameState.researchItemsInvented.begin(), gameState.researchItemsInvented.end(), researchItem) + == gameState.researchItemsInvented.end()) { - gameState.ResearchItemsInvented.push_back(researchItem); + gameState.researchItemsInvented.push_back(researchItem); } } @@ -193,8 +192,8 @@ static void MarkResearchItemInvented(const ResearchItem& researchItem) */ void ResearchFinishItem(const ResearchItem& researchItem) { - auto& gameState = GetGameState(); - gameState.ResearchLastItem = researchItem; + auto& gameState = getGameState(); + gameState.researchLastItem = researchItem; ResearchInvalidateRelatedWindows(); if (researchItem.type == Research::EntryType::Ride) @@ -217,7 +216,7 @@ void ResearchFinishItem(const ResearchItem& researchItem) RideEntrySetInvented(rideEntryIndex); bool seenRideEntry[kMaxRideObjects]{}; - for (auto const& researchItem3 : gameState.ResearchItemsUninvented) + for (auto const& researchItem3 : gameState.researchItemsUninvented) { ObjectEntryIndex index = researchItem3.entryIndex; seenRideEntry[index] = true; @@ -314,60 +313,59 @@ void ResearchUpdate() { PROFILED_FUNCTION(); - int32_t editorScreenFlags, researchLevel, currentResearchProgress; + int32_t researchLevel, currentResearchProgress; - editorScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER; - if (gScreenFlags & editorScreenFlags) + if (isInEditorMode()) { return; } - auto& gameState = GetGameState(); - if (gameState.CurrentTicks % 32 != 0) + auto& gameState = getGameState(); + if (gameState.currentTicks % 32 != 0) { return; } - if ((gameState.Park.Flags & PARK_FLAGS_NO_MONEY) && gameState.ResearchFundingLevel == RESEARCH_FUNDING_NONE) + if ((gameState.park.Flags & PARK_FLAGS_NO_MONEY) && gameState.researchFundingLevel == RESEARCH_FUNDING_NONE) { researchLevel = RESEARCH_FUNDING_NORMAL; } else { - researchLevel = gameState.ResearchFundingLevel; + researchLevel = gameState.researchFundingLevel; } - currentResearchProgress = gameState.ResearchProgress; + currentResearchProgress = gameState.researchProgress; currentResearchProgress += _researchRate[researchLevel]; if (currentResearchProgress <= 0xFFFF) { - gameState.ResearchProgress = currentResearchProgress; + gameState.researchProgress = currentResearchProgress; } else { - switch (gameState.ResearchProgressStage) + switch (gameState.researchProgressStage) { case RESEARCH_STAGE_INITIAL_RESEARCH: ResearchNextDesign(); ResearchCalculateExpectedDate(); break; case RESEARCH_STAGE_DESIGNING: - gameState.ResearchProgress = 0; - gameState.ResearchProgressStage = RESEARCH_STAGE_COMPLETING_DESIGN; + gameState.researchProgress = 0; + gameState.researchProgressStage = RESEARCH_STAGE_COMPLETING_DESIGN; ResearchCalculateExpectedDate(); ResearchInvalidateRelatedWindows(); break; case RESEARCH_STAGE_COMPLETING_DESIGN: - MarkResearchItemInvented(*gameState.ResearchNextItem); - ResearchFinishItem(*gameState.ResearchNextItem); - gameState.ResearchProgress = 0; - gameState.ResearchProgressStage = RESEARCH_STAGE_INITIAL_RESEARCH; + MarkResearchItemInvented(*gameState.researchNextItem); + ResearchFinishItem(*gameState.researchNextItem); + gameState.researchProgress = 0; + gameState.researchProgressStage = RESEARCH_STAGE_INITIAL_RESEARCH; ResearchCalculateExpectedDate(); ResearchUpdateUncompletedTypes(); ResearchInvalidateRelatedWindows(); break; case RESEARCH_STAGE_FINISHED_ALL: - gameState.ResearchFundingLevel = RESEARCH_FUNDING_NONE; + gameState.researchFundingLevel = RESEARCH_FUNDING_NONE; break; } } @@ -379,7 +377,7 @@ void ResearchUpdate() */ void ResearchResetCurrentItem() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); SetEveryRideTypeNotInvented(); SetEveryRideEntryNotInvented(); @@ -387,14 +385,14 @@ void ResearchResetCurrentItem() SetAllSceneryItemsInvented(); SetAllSceneryGroupsNotInvented(); - for (const auto& researchItem : gameState.ResearchItemsInvented) + for (const auto& researchItem : gameState.researchItemsInvented) { ResearchFinishItem(researchItem); } - gameState.ResearchLastItem = std::nullopt; - gameState.ResearchProgressStage = RESEARCH_STAGE_INITIAL_RESEARCH; - gameState.ResearchProgress = 0; + gameState.researchLastItem = std::nullopt; + gameState.researchProgressStage = RESEARCH_STAGE_INITIAL_RESEARCH; + gameState.researchProgress = 0; } /** @@ -403,14 +401,14 @@ void ResearchResetCurrentItem() */ static void ResearchInsertUnresearched(ResearchItem&& item) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // First check to make sure that entry is not already accounted for if (item.Exists()) { return; } - gameState.ResearchItemsUninvented.push_back(std::move(item)); + gameState.researchItemsUninvented.push_back(std::move(item)); } /** @@ -419,14 +417,14 @@ static void ResearchInsertUnresearched(ResearchItem&& item) */ static void ResearchInsertResearched(ResearchItem&& item) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // First check to make sure that entry is not already accounted for if (item.Exists()) { return; } - gameState.ResearchItemsInvented.push_back(std::move(item)); + gameState.researchItemsInvented.push_back(std::move(item)); } /** @@ -435,13 +433,13 @@ static void ResearchInsertResearched(ResearchItem&& item) */ void ResearchRemove(const ResearchItem& researchItem) { - auto& gameState = GetGameState(); - gameState.ResearchItemsUninvented.erase( - std::remove(gameState.ResearchItemsUninvented.begin(), gameState.ResearchItemsUninvented.end(), researchItem), - gameState.ResearchItemsUninvented.end()); - gameState.ResearchItemsInvented.erase( - std::remove(gameState.ResearchItemsInvented.begin(), gameState.ResearchItemsInvented.end(), researchItem), - gameState.ResearchItemsInvented.end()); + auto& gameState = getGameState(); + gameState.researchItemsUninvented.erase( + std::remove(gameState.researchItemsUninvented.begin(), gameState.researchItemsUninvented.end(), researchItem), + gameState.researchItemsUninvented.end()); + gameState.researchItemsInvented.erase( + std::remove(gameState.researchItemsInvented.begin(), gameState.researchItemsInvented.end(), researchItem), + gameState.researchItemsInvented.end()); } void ResearchInsert(ResearchItem&& item, bool researched) @@ -462,7 +460,7 @@ void ResearchInsert(ResearchItem&& item, bool researched) */ void ResearchPopulateListRandom() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); ResearchResetItems(gameState); // Rides @@ -627,7 +625,7 @@ void ScenerySetNotInvented(const ScenerySelection& sceneryItem) bool SceneryGroupIsInvented(int32_t sgIndex) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); const auto sgEntry = OpenRCT2::ObjectManager::GetObjectEntry(sgIndex); if (sgEntry == nullptr || sgEntry->SceneryEntries.empty()) { @@ -635,18 +633,18 @@ bool SceneryGroupIsInvented(int32_t sgIndex) } // All scenery is temporarily invented when in the scenario editor - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + if (isInEditorMode()) { return true; } - if (GetGameState().Cheats.ignoreResearchStatus) + if (getGameState().cheats.ignoreResearchStatus) { return true; } return std::none_of( - std::begin(gameState.ResearchItemsUninvented), std::end(gameState.ResearchItemsUninvented), + std::begin(gameState.researchItemsUninvented), std::end(gameState.researchItemsUninvented), [sgIndex](const ResearchItem& item) { return item.type == Research::EntryType::Scenery && item.entryIndex == sgIndex; }); @@ -751,12 +749,12 @@ StringId ResearchItem::GetName() const */ void ResearchRemoveFlags() { - auto& gameState = GetGameState(); - for (auto& researchItem : gameState.ResearchItemsUninvented) + auto& gameState = getGameState(); + for (auto& researchItem : gameState.researchItemsUninvented) { researchItem.flags &= ~(RESEARCH_ENTRY_FLAG_RIDE_ALWAYS_RESEARCHED | RESEARCH_ENTRY_FLAG_SCENERY_SET_ALWAYS_RESEARCHED); } - for (auto& researchItem : gameState.ResearchItemsInvented) + for (auto& researchItem : gameState.researchItemsInvented) { researchItem.flags &= ~(RESEARCH_ENTRY_FLAG_RIDE_ALWAYS_RESEARCHED | RESEARCH_ENTRY_FLAG_SCENERY_SET_ALWAYS_RESEARCHED); } @@ -809,18 +807,18 @@ static void ResearchMarkItemAsResearched(const ResearchItem& item) static void ResearchRebuildInventedTables() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); SetEveryRideTypeNotInvented(); SetEveryRideEntryInvented(); SetEveryRideEntryNotInvented(); SetAllSceneryItemsNotInvented(); - for (const auto& item : gameState.ResearchItemsInvented) + for (const auto& item : gameState.researchItemsInvented) { // Ignore item, if the research of it is in progress - if (gameState.ResearchProgressStage == RESEARCH_STAGE_DESIGNING - || gameState.ResearchProgressStage == RESEARCH_STAGE_COMPLETING_DESIGN) + if (gameState.researchProgressStage == RESEARCH_STAGE_DESIGNING + || gameState.researchProgressStage == RESEARCH_STAGE_COMPLETING_DESIGN) { - if (item == gameState.ResearchNextItem) + if (item == gameState.researchNextItem) { continue; } @@ -833,10 +831,10 @@ static void ResearchRebuildInventedTables() static void ResearchAddAllMissingItems(bool isResearched) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Mark base ridetypes as seen if they exist in the invented research list. bool seenBaseEntry[kMaxRideObjects]{}; - for (auto const& researchItem : gameState.ResearchItemsInvented) + for (auto const& researchItem : gameState.researchItemsInvented) { ObjectEntryIndex index = researchItem.baseRideType; seenBaseEntry[index] = true; @@ -861,7 +859,7 @@ static void ResearchAddAllMissingItems(bool isResearched) } // Mark base ridetypes as seen if they exist in the uninvented research list. - for (auto const& researchItem : gameState.ResearchItemsUninvented) + for (auto const& researchItem : gameState.researchItemsUninvented) { ObjectEntryIndex index = researchItem.baseRideType; seenBaseEntry[index] = true; @@ -902,14 +900,14 @@ static void ResearchAddAllMissingItems(bool isResearched) void ResearchFix() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Remove null entries from the research list - ResearchRemoveNullItems(gameState.ResearchItemsInvented); - ResearchRemoveNullItems(gameState.ResearchItemsUninvented); + ResearchRemoveNullItems(gameState.researchItemsInvented); + ResearchRemoveNullItems(gameState.researchItemsUninvented); // Add missing entries to the research list // If research is complete, mark all the missing items as available - ResearchAddAllMissingItems(gameState.ResearchProgressStage == RESEARCH_STAGE_FINISHED_ALL); + ResearchAddAllMissingItems(gameState.researchProgressStage == RESEARCH_STAGE_FINISHED_ALL); // Now rebuild all the tables that say whether a ride or scenery item is invented ResearchRebuildInventedTables(); @@ -918,20 +916,20 @@ void ResearchFix() void ResearchItemsMakeAllUnresearched() { - auto& gameState = GetGameState(); - gameState.ResearchItemsUninvented.insert( - gameState.ResearchItemsUninvented.end(), std::make_move_iterator(gameState.ResearchItemsInvented.begin()), - std::make_move_iterator(gameState.ResearchItemsInvented.end())); - gameState.ResearchItemsInvented.clear(); + auto& gameState = getGameState(); + gameState.researchItemsUninvented.insert( + gameState.researchItemsUninvented.end(), std::make_move_iterator(gameState.researchItemsInvented.begin()), + std::make_move_iterator(gameState.researchItemsInvented.end())); + gameState.researchItemsInvented.clear(); } void ResearchItemsMakeAllResearched() { - auto& gameState = GetGameState(); - gameState.ResearchItemsInvented.insert( - gameState.ResearchItemsInvented.end(), std::make_move_iterator(gameState.ResearchItemsUninvented.begin()), - std::make_move_iterator(gameState.ResearchItemsUninvented.end())); - gameState.ResearchItemsUninvented.clear(); + auto& gameState = getGameState(); + gameState.researchItemsInvented.insert( + gameState.researchItemsInvented.end(), std::make_move_iterator(gameState.researchItemsUninvented.begin()), + std::make_move_iterator(gameState.researchItemsUninvented.end())); + gameState.researchItemsUninvented.clear(); } /** @@ -940,9 +938,9 @@ void ResearchItemsMakeAllResearched() */ void ResearchItemsShuffle() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); std::shuffle( - std::begin(gameState.ResearchItemsUninvented), std::end(gameState.ResearchItemsUninvented), + std::begin(gameState.researchItemsUninvented), std::end(gameState.researchItemsUninvented), std::default_random_engine{}); } @@ -963,15 +961,15 @@ void ResearchItem::SetNull() bool ResearchItem::Exists() const { - auto& gameState = GetGameState(); - for (auto const& researchItem : gameState.ResearchItemsUninvented) + auto& gameState = getGameState(); + for (auto const& researchItem : gameState.researchItemsUninvented) { if (researchItem == *this) { return true; } } - for (auto const& researchItem : gameState.ResearchItemsInvented) + for (auto const& researchItem : gameState.researchItemsInvented) { if (researchItem == *this) { @@ -1064,10 +1062,10 @@ static void ResearchMarkRideTypeAsSeen(const ResearchItem& researchItem) void ResearchDetermineFirstOfType() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); _seenRideType.reset(); - for (const auto& researchItem : gameState.ResearchItemsInvented) + for (const auto& researchItem : gameState.researchItemsInvented) { if (researchItem.type != Research::EntryType::Ride) continue; @@ -1080,40 +1078,40 @@ void ResearchDetermineFirstOfType() if (rtd.HasFlag(RtdFlag::listVehiclesSeparately)) continue; - // The last research item will also be present in gameState.ResearchItemsInvented. + // The last research item will also be present in gameState.researchItemsInvented. // Avoid marking its ride type as "invented" prematurely. - if (gameState.ResearchLastItem.has_value() && !gameState.ResearchLastItem->IsNull() - && researchItem == gameState.ResearchLastItem.value()) + if (gameState.researchLastItem.has_value() && !gameState.researchLastItem->IsNull() + && researchItem == gameState.researchLastItem.value()) continue; - // The next research item is (sometimes?) also present in gameState.ResearchItemsInvented, even though it isn't invented + // The next research item is (sometimes?) also present in gameState.researchItemsInvented, even though it isn't invented // yet(!) - if (gameState.ResearchNextItem.has_value() && !gameState.ResearchNextItem->IsNull() - && researchItem == gameState.ResearchNextItem.value()) + if (gameState.researchNextItem.has_value() && !gameState.researchNextItem->IsNull() + && researchItem == gameState.researchNextItem.value()) continue; ResearchMarkRideTypeAsSeen(researchItem); } - if (gameState.ResearchLastItem.has_value()) + if (gameState.researchLastItem.has_value()) { - ResearchUpdateFirstOfType(&gameState.ResearchLastItem.value()); - ResearchMarkRideTypeAsSeen(gameState.ResearchLastItem.value()); + ResearchUpdateFirstOfType(&gameState.researchLastItem.value()); + ResearchMarkRideTypeAsSeen(gameState.researchLastItem.value()); } - if (gameState.ResearchNextItem.has_value()) + if (gameState.researchNextItem.has_value()) { - ResearchUpdateFirstOfType(&gameState.ResearchNextItem.value()); - ResearchMarkRideTypeAsSeen(gameState.ResearchNextItem.value()); + ResearchUpdateFirstOfType(&gameState.researchNextItem.value()); + ResearchMarkRideTypeAsSeen(gameState.researchNextItem.value()); } - for (auto& researchItem : gameState.ResearchItemsUninvented) + for (auto& researchItem : gameState.researchItemsUninvented) { - // The next research item is (sometimes?) also present in gameState.ResearchItemsUninvented - if (gameState.ResearchNextItem.has_value() && !gameState.ResearchNextItem->IsNull() - && researchItem.baseRideType == gameState.ResearchNextItem.value().baseRideType) + // The next research item is (sometimes?) also present in gameState.researchItemsUninvented + if (gameState.researchNextItem.has_value() && !gameState.researchNextItem->IsNull() + && researchItem.baseRideType == gameState.researchNextItem.value().baseRideType) { // Copy the "first of type" flag. - researchItem.flags = gameState.ResearchNextItem->flags; + researchItem.flags = gameState.researchNextItem->flags; continue; } diff --git a/src/openrct2/network/DiscordService.cpp b/src/openrct2/network/DiscordService.cpp index f78f342081..5b5eb687f9 100644 --- a/src/openrct2/network/DiscordService.cpp +++ b/src/openrct2/network/DiscordService.cpp @@ -66,8 +66,8 @@ DiscordService::~DiscordService() static std::string GetParkName() { - auto& gameState = GetGameState(); - return gameState.Park.Name; + auto& gameState = getGameState(); + return gameState.park.Name; } void DiscordService::Tick() @@ -88,7 +88,7 @@ void DiscordService::RefreshPresence() const std::string state; std::string details; - switch (gScreenFlags) + switch (gLegacyScene) { default: details = GetParkName(); @@ -127,16 +127,16 @@ void DiscordService::RefreshPresence() const discordPresence.instance = 1; } break; - case SCREEN_FLAGS_TITLE_DEMO: + case LegacyScene::titleSequence: details = "In Menus"; break; - case SCREEN_FLAGS_SCENARIO_EDITOR: + case LegacyScene::scenarioEditor: details = "In Scenario Editor"; break; - case SCREEN_FLAGS_TRACK_DESIGNER: + case LegacyScene::trackDesigner: details = "In Track Designer"; break; - case SCREEN_FLAGS_TRACK_MANAGER: + case LegacyScene::trackDesignsManager: details = "In Track Designs Manager"; break; } diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 5972692a70..783f8c45ed 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -32,11 +32,11 @@ #include "../localisation/LocalisationService.h" #include "../park/ParkFile.h" #include "../platform/Platform.h" -#include "../scenario/Scenario.h" #include "../scripting/ScriptEngine.h" #include "../ui/WindowManager.h" #include "../util/Util.h" #include "../world/Location.hpp" +#include "../world/MapAnimation.h" #include "Network.h" #include @@ -49,7 +49,7 @@ using namespace OpenRCT2; // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -constexpr uint8_t kNetworkStreamVersion = 0; +constexpr uint8_t kNetworkStreamVersion = 2; const std::string kNetworkStreamID = std::string(kOpenRCT2Version) + "-" + std::to_string(kNetworkStreamVersion); @@ -81,7 +81,6 @@ static constexpr uint32_t kMaxPacketsPerUpdate = 100; #include "../localisation/Localisation.Date.h" #include "../object/ObjectManager.h" #include "../object/ObjectRepository.h" - #include "../scenario/Scenario.h" #include "../world/Park.h" #include "NetworkAction.h" #include "NetworkConnection.h" @@ -303,7 +302,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port) try { - auto fs = FileStream(keyPath, FILE_MODE_WRITE); + auto fs = FileStream(keyPath, FileMode::write); _key.SavePrivate(&fs); } catch (const std::exception&) @@ -319,7 +318,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port) try { - auto fs = FileStream(keyPath, FILE_MODE_WRITE); + auto fs = FileStream(keyPath, FileMode::write); _key.SavePublic(&fs); } catch (const std::exception&) @@ -335,7 +334,7 @@ bool NetworkBase::BeginClient(const std::string& host, uint16_t port) try { LOG_VERBOSE("Loading key from %s", keyPath.c_str()); - auto fs = FileStream(keyPath, FILE_MODE_OPEN); + auto fs = FileStream(keyPath, FileMode::open); ok = _key.LoadPrivate(&fs); } catch (const std::exception&) @@ -842,7 +841,7 @@ bool NetworkBase::IsDesynchronised() const noexcept bool NetworkBase::CheckDesynchronizaton() { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; // Check synchronisation if (GetMode() == NETWORK_MODE_CLIENT && _serverState.state != NetworkServerStatus::Desynced @@ -1020,7 +1019,7 @@ void NetworkBase::SaveGroups() if (GetMode() == NETWORK_MODE_SERVER) { auto env = GetContext().GetPlatformEnvironment(); - auto path = Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"groups.json"); + auto path = Path::Combine(env->GetDirectoryPath(DirBase::user), u8"groups.json"); json_t jsonGroups = json_t::array(); for (auto& group : group_list) @@ -1080,7 +1079,7 @@ void NetworkBase::LoadGroups() group_list.clear(); auto env = GetContext().GetPlatformEnvironment(); - auto path = Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"groups.json"); + auto path = Path::Combine(env->GetDirectoryPath(DirBase::user), u8"groups.json"); json_t jsonGroupConfig; if (File::Exists(path)) @@ -1167,7 +1166,7 @@ void NetworkBase::AppendLog(std::ostream& fs, std::string_view s) void NetworkBase::BeginChatLog() { auto env = GetContext().GetPlatformEnvironment(); - auto directory = env->GetDirectoryPath(DIRBASE::USER, DIRID::LOG_CHAT); + auto directory = env->GetDirectoryPath(DirBase::user, DirId::chatLogs); _chatLogPath = BeginLog(directory, "", _chatLogFilenameFormat); _chat_log_fs.open(fs::u8path(_chatLogPath), std::ios::out | std::ios::app); } @@ -1188,7 +1187,7 @@ void NetworkBase::CloseChatLog() void NetworkBase::BeginServerLog() { auto env = GetContext().GetPlatformEnvironment(); - auto directory = env->GetDirectoryPath(DIRBASE::USER, DIRID::LOG_SERVER); + auto directory = env->GetDirectoryPath(DirBase::user, DirId::serverLogs); _serverLogPath = BeginLog(directory, ServerName, _serverLogFilenameFormat); _server_log_fs.open(fs::u8path(_serverLogPath), std::ios::out | std::ios::app | std::ios::binary); @@ -1557,7 +1556,7 @@ void NetworkBase::Client_Send_GAME_ACTION(const GameAction* action) DataSerialiser stream(true); action->Serialise(stream); - packet << GetGameState().CurrentTicks << action->GetType() << stream; + packet << getGameState().currentTicks << action->GetType() << stream; _serverConnection->QueuePacket(std::move(packet)); } @@ -1568,7 +1567,7 @@ void NetworkBase::ServerSendGameAction(const GameAction* action) DataSerialiser stream(true); action->Serialise(stream); - packet << GetGameState().CurrentTicks << action->GetType() << stream; + packet << getGameState().currentTicks << action->GetType() << stream; SendPacketToClients(packet); } @@ -1576,7 +1575,7 @@ void NetworkBase::ServerSendGameAction(const GameAction* action) void NetworkBase::ServerSendTick() { NetworkPacket packet(NetworkCommand::Tick); - packet << GetGameState().CurrentTicks << ScenarioRandState().s0; + packet << getGameState().currentTicks << ScenarioRandState().s0; uint32_t flags = 0; // Simple counter which limits how often a sprite checksum gets sent. // This can get somewhat expensive, so we don't want to push it every tick in release, @@ -1603,7 +1602,7 @@ void NetworkBase::ServerSendTick() void NetworkBase::ServerSendPlayerInfo(int32_t playerId) { NetworkPacket packet(NetworkCommand::PlayerInfo); - packet << GetGameState().CurrentTicks; + packet << getGameState().currentTicks; auto* player = GetPlayerByID(playerId); if (player == nullptr) @@ -1616,7 +1615,7 @@ void NetworkBase::ServerSendPlayerInfo(int32_t playerId) void NetworkBase::ServerSendPlayerList() { NetworkPacket packet(NetworkCommand::PlayerList); - packet << GetGameState().CurrentTicks << static_cast(player_list.size()); + packet << getGameState().currentTicks << static_cast(player_list.size()); for (auto& player : player_list) { player->Write(packet); @@ -1824,7 +1823,7 @@ static bool ProcessPlayerAuthenticatePluginHooks( using namespace OpenRCT2::Scripting; auto& hookEngine = GetContext()->GetScriptEngine().GetHookEngine(); - if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HOOK_TYPE::NETWORK_AUTHENTICATE)) + if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HookType::networkAuthenticate)) { auto ctx = GetContext()->GetScriptEngine().GetContext(); @@ -1837,7 +1836,7 @@ static bool ProcessPlayerAuthenticatePluginHooks( auto e = eObj.Take(); // Call the subscriptions - hookEngine.Call(OpenRCT2::Scripting::HOOK_TYPE::NETWORK_AUTHENTICATE, e, false); + hookEngine.Call(OpenRCT2::Scripting::HookType::networkAuthenticate, e, false); // Check if any hook has cancelled the join if (AsOrDefault(e["cancel"], false)) @@ -1855,7 +1854,7 @@ static void ProcessPlayerJoinedPluginHooks(uint8_t playerId) using namespace OpenRCT2::Scripting; auto& hookEngine = GetContext()->GetScriptEngine().GetHookEngine(); - if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HOOK_TYPE::NETWORK_JOIN)) + if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HookType::networkJoin)) { auto ctx = GetContext()->GetScriptEngine().GetContext(); @@ -1865,7 +1864,7 @@ static void ProcessPlayerJoinedPluginHooks(uint8_t playerId) auto e = eObj.Take(); // Call the subscriptions - hookEngine.Call(OpenRCT2::Scripting::HOOK_TYPE::NETWORK_JOIN, e, false); + hookEngine.Call(OpenRCT2::Scripting::HookType::networkJoin, e, false); } #endif } @@ -1876,7 +1875,7 @@ static void ProcessPlayerLeftPluginHooks(uint8_t playerId) using namespace OpenRCT2::Scripting; auto& hookEngine = GetContext()->GetScriptEngine().GetHookEngine(); - if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HOOK_TYPE::NETWORK_LEAVE)) + if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HookType::networkLeave)) { auto ctx = GetContext()->GetScriptEngine().GetContext(); @@ -1886,7 +1885,7 @@ static void ProcessPlayerLeftPluginHooks(uint8_t playerId) auto e = eObj.Take(); // Call the subscriptions - hookEngine.Call(OpenRCT2::Scripting::HOOK_TYPE::NETWORK_LEAVE, e, false); + hookEngine.Call(OpenRCT2::Scripting::HookType::networkLeave, e, false); } #endif } @@ -1910,7 +1909,7 @@ void NetworkBase::ProcessPlayerList() auto itPending = _pendingPlayerLists.begin(); while (itPending != _pendingPlayerLists.end()) { - if (itPending->first > GetGameState().CurrentTicks) + if (itPending->first > getGameState().currentTicks) break; // List of active players found in the list. @@ -1982,7 +1981,7 @@ void NetworkBase::ProcessPlayerList() void NetworkBase::ProcessPlayerInfo() { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; auto range = _pendingPlayerInfo.equal_range(currentTicks); for (auto it = range.first; it != range.second; it++) @@ -2213,7 +2212,7 @@ void NetworkBase::Client_Handle_TOKEN(NetworkConnection& connection, NetworkPack try { - auto fs = FileStream(keyPath, FILE_MODE_OPEN); + auto fs = FileStream(keyPath, FileMode::open); if (!_key.LoadPrivate(&fs)) { throw std::runtime_error("Failed to load private key."); @@ -2557,7 +2556,7 @@ void NetworkBase::Client_Handle_GAMESTATE(NetworkConnection& connection, Network { GameStateCompareData cmpData = snapshots->Compare(serverSnapshot, *desyncSnapshot); - std::string outputPath = GetContext().GetPlatformEnvironment()->GetDirectoryPath(DIRBASE::USER, DIRID::LOG_DESYNCS); + std::string outputPath = GetContext().GetPlatformEnvironment()->GetDirectoryPath(DirBase::user, DirId::desyncLogs); Path::CreateDirectory(outputPath); @@ -2808,7 +2807,7 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti GameLoadInit(); GameLoadScripts(); GameNotifyMapChanged(); - _serverState.tick = GetGameState().CurrentTicks; + _serverState.tick = getGameState().currentTicks; // NetworkStatusOpen("Loaded new map from network"); _serverState.state = NetworkServerStatus::Ok; _clientMapLoaded = true; @@ -2828,7 +2827,7 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti else { // Something went wrong, game is not loaded. Return to main screen. - auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeQuit); + auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt, PromptMode::saveBeforeQuit); GameActions::Execute(&loadOrQuitAction); } if (has_to_free) @@ -2850,7 +2849,7 @@ bool NetworkBase::LoadMap(IStream* stream) objManager.LoadObjects(loadResult.RequiredObjects); // TODO: Have a separate GameState and exchange once loaded. - auto& gameState = GetGameState(); + auto& gameState = getGameState(); importer->Import(gameState); EntityTweener::Get().Reset(); @@ -2875,7 +2874,7 @@ bool NetworkBase::SaveMap(IStream* stream, const std::vector(); exporter->ExportObjectsList = objects; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); exporter->Export(gameState, *stream); result = true; } @@ -2899,7 +2898,7 @@ static bool ProcessChatMessagePluginHooks(uint8_t playerId, std::string& text) { #ifdef ENABLE_SCRIPTING auto& hookEngine = GetContext()->GetScriptEngine().GetHookEngine(); - if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HOOK_TYPE::NETWORK_CHAT)) + if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HookType::networkChat)) { auto ctx = GetContext()->GetScriptEngine().GetContext(); @@ -2912,7 +2911,7 @@ static bool ProcessChatMessagePluginHooks(uint8_t playerId, std::string& text) auto e = DukValue::take_from_stack(ctx); // Call the subscriptions - hookEngine.Call(OpenRCT2::Scripting::HOOK_TYPE::NETWORK_CHAT, e, false); + hookEngine.Call(OpenRCT2::Scripting::HookType::networkChat, e, false); // Update text from object if subscriptions changed it if (e["message"].type() != DukValue::Type::STRING) @@ -3973,7 +3972,7 @@ void NetworkSendPassword(const std::string& password) } try { - auto fs = FileStream(keyPath, FILE_MODE_OPEN); + auto fs = FileStream(keyPath, FileMode::open); network._key.LoadPrivate(&fs); } catch (const std::exception&) @@ -4012,7 +4011,7 @@ void NetworkAppendServerLog(const utf8* text) static u8string NetworkGetKeysDirectory() { auto env = GetContext()->GetPlatformEnvironment(); - return Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"keys"); + return Path::Combine(env->GetDirectoryPath(DirBase::user), u8"keys"); } static u8string NetworkGetPrivateKeyPath(u8string_view playerName) @@ -4099,7 +4098,7 @@ NetworkAuth NetworkGetAuthstatus() } uint32_t NetworkGetServerTick() { - return GetGameState().CurrentTicks; + return getGameState().currentTicks; } void NetworkFlush() { diff --git a/src/openrct2/network/NetworkServerAdvertiser.cpp b/src/openrct2/network/NetworkServerAdvertiser.cpp index cf702f2be0..43629a99f5 100644 --- a/src/openrct2/network/NetworkServerAdvertiser.cpp +++ b/src/openrct2/network/NetworkServerAdvertiser.cpp @@ -59,7 +59,7 @@ private: std::unique_ptr _lanListener; uint32_t _lastListenTime{}; - ADVERTISE_STATUS _status = ADVERTISE_STATUS::UNREGISTERED; + AdvertiseStatus _status = AdvertiseStatus::unregistered; #ifndef DISABLE_HTTP uint32_t _lastAdvertiseTime = 0; @@ -85,7 +85,7 @@ public: #endif } - ADVERTISE_STATUS GetStatus() const override + AdvertiseStatus GetStatus() const override { return _status; } @@ -147,7 +147,7 @@ private: { switch (_status) { - case ADVERTISE_STATUS::UNREGISTERED: + case AdvertiseStatus::unregistered: if (_lastAdvertiseTime == 0 || Platform::GetTicks() > _lastAdvertiseTime + kMasterServerRegisterTime) { if (_lastAdvertiseTime == 0) @@ -157,14 +157,14 @@ private: SendRegistration(_forceIPv4); } break; - case ADVERTISE_STATUS::REGISTERED: + case AdvertiseStatus::registered: if (Platform::GetTicks() > _lastHeartbeatTime + kMasterServerHeartbeatTime) { SendHeartbeat(); } break; // exhaust enum values to satisfy clang - case ADVERTISE_STATUS::DISABLED: + case AdvertiseStatus::disabled: break; } } @@ -246,7 +246,7 @@ private: if (jsonToken.is_string()) { _token = Json::GetString(jsonToken); - _status = ADVERTISE_STATUS::REGISTERED; + _status = AdvertiseStatus::registered; } } else @@ -288,7 +288,7 @@ private: } else if (status == MasterServerStatus::InvalidToken) { - _status = ADVERTISE_STATUS::UNREGISTERED; + _status = AdvertiseStatus::unregistered; _lastAdvertiseTime = 0; Console::Error::WriteLine("Master server heartbeat failed: Invalid Token"); } @@ -303,20 +303,20 @@ private: { "players", numPlayers }, }; - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); const auto& date = GetDate(); - json_t mapSize = { { "x", gameState.MapSize.x - 2 }, { "y", gameState.MapSize.y - 2 } }; + json_t mapSize = { { "x", gameState.mapSize.x - 2 }, { "y", gameState.mapSize.y - 2 } }; json_t gameInfo = { { "mapSize", mapSize }, { "day", date.GetMonthTicks() }, { "month", date.GetMonthsElapsed() }, - { "guests", gameState.NumGuestsInPark }, - { "parkValue", gameState.Park.Value }, + { "guests", gameState.numGuestsInPark }, + { "parkValue", gameState.park.Value }, }; - if (!(gameState.Park.Flags & PARK_FLAGS_NO_MONEY)) + if (!(gameState.park.Flags & PARK_FLAGS_NO_MONEY)) { - gameInfo["cash"] = gameState.Cash; + gameInfo["cash"] = gameState.cash; } root["gameInfo"] = gameInfo; diff --git a/src/openrct2/network/NetworkServerAdvertiser.h b/src/openrct2/network/NetworkServerAdvertiser.h index 864972ee7c..62ab06f86e 100644 --- a/src/openrct2/network/NetworkServerAdvertiser.h +++ b/src/openrct2/network/NetworkServerAdvertiser.h @@ -11,11 +11,11 @@ #include -enum class ADVERTISE_STATUS +enum class AdvertiseStatus { - DISABLED, - UNREGISTERED, - REGISTERED, + disabled, + unregistered, + registered, }; struct INetworkServerAdvertiser @@ -24,7 +24,7 @@ struct INetworkServerAdvertiser { } - virtual ADVERTISE_STATUS GetStatus() const = 0; + virtual AdvertiseStatus GetStatus() const = 0; virtual void Update() = 0; }; diff --git a/src/openrct2/network/NetworkUser.cpp b/src/openrct2/network/NetworkUser.cpp index 089340c196..27dab0dee8 100644 --- a/src/openrct2/network/NetworkUser.cpp +++ b/src/openrct2/network/NetworkUser.cpp @@ -213,7 +213,7 @@ NetworkUser* NetworkUserManager::GetOrAddUser(const std::string& hash) u8string NetworkUserManager::GetStorePath() { auto env = OpenRCT2::GetContext()->GetPlatformEnvironment(); - return Path::Combine(env->GetDirectoryPath(OpenRCT2::DIRBASE::USER), kUserStoreFilename); + return Path::Combine(env->GetDirectoryPath(OpenRCT2::DirBase::user), kUserStoreFilename); } #endif diff --git a/src/openrct2/network/ServerList.cpp b/src/openrct2/network/ServerList.cpp index d31d6b41f8..3670d0ad30 100644 --- a/src/openrct2/network/ServerList.cpp +++ b/src/openrct2/network/ServerList.cpp @@ -190,10 +190,10 @@ std::vector ServerList::ReadFavourites() const try { auto env = GetContext()->GetPlatformEnvironment(); - auto path = env->GetFilePath(PATHID::NETWORK_SERVERS); + auto path = env->GetFilePath(PathId::networkServers); if (File::Exists(path)) { - auto fs = FileStream(path, FILE_MODE_OPEN); + auto fs = FileStream(path, FileMode::open); auto numEntries = fs.ReadValue(); for (size_t i = 0; i < numEntries; i++) { @@ -243,11 +243,11 @@ bool ServerList::WriteFavourites(const std::vector& entries) co LOG_VERBOSE("server_list_write(%d, 0x%p)", entries.size(), entries.data()); auto env = GetContext()->GetPlatformEnvironment(); - auto path = Path::Combine(env->GetDirectoryPath(DIRBASE::USER), u8"servers.cfg"); + auto path = Path::Combine(env->GetDirectoryPath(DirBase::user), u8"servers.cfg"); try { - auto fs = FileStream(path, FILE_MODE_WRITE); + auto fs = FileStream(path, FileMode::write); fs.WriteValue(static_cast(entries.size())); for (const auto& entry : entries) { diff --git a/src/openrct2/object/ClimateObject.cpp b/src/openrct2/object/ClimateObject.cpp new file mode 100644 index 0000000000..7fafcd3273 --- /dev/null +++ b/src/openrct2/object/ClimateObject.cpp @@ -0,0 +1,225 @@ +/***************************************************************************** + * Copyright (c) 2014-2025 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#include "ClimateObject.h" + +#include "../Diagnostic.h" +#include "../core/Guard.hpp" +#include "../core/IStream.hpp" +#include "../core/Json.hpp" +#include "../localisation/Formatter.h" +#include "../localisation/StringIds.h" + +#include + +using namespace OpenRCT2; + +struct RawClimateMonth +{ + int8_t baseTemperature; + int8_t randomBias; + uint8_t distribution[kNumWeatherTypes]{}; + int8_t distRotation{}; + int16_t distributionSum{}; +}; + +using RawClimate = std::array; + +static constexpr const char* kWeatherTypes[] = { + "sunny", "partiallyCloudy", "cloudy", "rain", "heavyRain", "thunder", "snow", "heavySnow", "blizzard", +}; +static_assert(std::size(kWeatherTypes) == kNumWeatherTypes); + +static constexpr const char* kMonthKeys[] = { + "march", "april", "may", "june", "july", "august", "september", "october", +}; +static_assert(std::size(kMonthKeys) == kNumClimateMonths); + +void ClimateObject::Load() +{ +} + +void ClimateObject::Unload() +{ +} + +static RawClimate readWeatherTable(json_t& weather); +static Climate convertRawClimate(const RawClimate& rawClimate); + +void ClimateObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const +{ + const auto dist = getYearlyDistribution(); + const auto totalSize = kNumClimateMonths * kWeatherDistSize; + + for (auto i = 0u; i < EnumValue(WeatherType::Count); i++) + { + auto type = WeatherType(i); + auto imageId = ImageId(ClimateGetWeatherSpriteId(type)); + auto coords = ScreenCoordsXY(8 + (i % 3) * 35, 3 + (i / 3) * 37); + GfxDrawSprite(dpi, imageId, coords); + + auto ft = Formatter(); + ft.Add(dist[i] * 100 / totalSize); + DrawTextEllipsised( + dpi, coords + ScreenCoordsXY{ 12, 22 }, 35, STR_CLIMATE_WEATHER_PERCENT, ft, + { FontStyle::Small, TextAlignment::CENTRE }); + } +} + +void ClimateObject::ReadJson(IReadObjectContext* context, json_t& root) +{ + Guard::Assert(root.is_object(), "ClimateObject::ReadJson expects parameter root to be an object"); + PopulateTablesFromJson(context, root); + + Guard::Assert(root["weather"].is_object(), "ClimateObject::ReadJson expects weather key to be an object"); + auto rawClimate = readWeatherTable(root["weather"]); + _climate = convertRawClimate(rawClimate); + + _scriptName = Json::GetString(root["scriptName"], std::string(GetIdentifier())); + + Guard::Assert(root["properties"].is_object(), "ClimateObject::ReadJson expects properties key to be an object"); + _climate.itemThresholds.cold = Json::GetNumber(root["properties"]["coldItemTempThreshold"], 11); + _climate.itemThresholds.warm = Json::GetNumber(root["properties"]["warmItemTempThreshold"], 21); +} + +const TemperatureThresholds& ClimateObject::getItemThresholds() const +{ + return _climate.itemThresholds; +} + +const WeatherPattern& ClimateObject::getPatternForMonth(uint8_t month) const +{ + return _climate.patterns[month]; +} + +std::string ClimateObject::getScriptName() const +{ + return _scriptName; +} + +YearlyDistribution ClimateObject::getYearlyDistribution() const +{ + auto weatherTypeCount = [](const WeatherPattern& pattern, const WeatherType target) { + auto count = 0u; + for (auto type : pattern.distribution) + { + if (type == target) + count++; + } + return count; + }; + + YearlyDistribution dist{}; + for (auto m = 0; m < kNumClimateMonths; m++) + { + auto& pattern = getPatternForMonth(m); + for (auto i = 0u; i < EnumValue(WeatherType::Count); i++) + dist[i] += weatherTypeCount(pattern, WeatherType(i)); + } + + return dist; +} + +static Climate convertRawClimate(const RawClimate& rawClimate) +{ + Climate climate{}; + + for (auto m = 0; m < kNumClimateMonths; m++) + { + auto& srcMonth = rawClimate[m]; + auto& dstMonth = climate.patterns[m]; + + dstMonth.baseTemperature = srcMonth.baseTemperature; + dstMonth.randomBias = srcMonth.randomBias; + + auto i = 0; + for (auto w = 0u; w < kNumWeatherTypes; w++) + { + if (i > kWeatherDistSize) + break; + + for (auto k = 0u; k < srcMonth.distribution[w]; k++) + { + dstMonth.distribution[i] = WeatherType(w); + i++; + } + } + + // Rotate weather distribution to be less biased towards sunny weather + auto begin = std::begin(dstMonth.distribution); + auto end = std::end(dstMonth.distribution); + std::rotate(begin, begin + srcMonth.distRotation, end); + } + + return climate; +} + +static RawClimate readWeatherTable(json_t& weather) +{ + // First read raw climate distribution from JSON + RawClimate rawClimate{}; + for (auto i = 0u; i < kNumClimateMonths; i++) + { + auto& monthKey = kMonthKeys[i]; + if (!weather.contains(monthKey)) + { + LOG_ERROR("Climate month not defined: %s", monthKey); + continue; + } + + auto& month = weather[monthKey]; + for (auto j = 0u; j < kNumWeatherTypes; j++) + { + Guard::Assert( + month["baseTemperature"].is_number(), + "ClimateObject::ReadJson expects weather months to contain baseTemperature"); + Guard::Assert( + month["randomBias"].is_number(), "ClimateObject::ReadJson expects weather months to contain randomBias"); + Guard::Assert( + month["distribution"].is_object(), + "ClimateObject::ReadJson expects weather months to contain distribution object"); + + auto& weatherKey = kWeatherTypes[j]; + if (!month["distribution"].contains(weatherKey)) + continue; + + auto weight = Json::GetNumber(month["distribution"][weatherKey]); + if (weight <= 0) + continue; + + rawClimate[i].baseTemperature = Json::GetNumber(month["baseTemperature"]); + rawClimate[i].randomBias = Json::GetNumber(month["randomBias"]); + rawClimate[i].distribution[j] = weight; + rawClimate[i].distRotation = Json::GetNumber(month["distRotation"]); + rawClimate[i].distributionSum += weight; + } + + Guard::Assert(rawClimate[i].distributionSum != 0, "Month %s has no weather defined!", monthKey); + } + + // Adjust distribution to fit internal format + for (auto& climateMonth : rawClimate) + { + auto adjustedDistSum = 0u; + for (auto i = 0u; i < kNumWeatherTypes; i++) + { + auto rawWeight = climateMonth.distribution[i]; + auto adjustedWeight = rawWeight * kWeatherDistSize / climateMonth.distributionSum; + + climateMonth.distribution[i] = adjustedWeight; + adjustedDistSum += adjustedWeight; + } + + Guard::Assert( + adjustedDistSum == kWeatherDistSize, "Weather distribution size mismatches: %d != %d", adjustedDistSum, + kWeatherDistSize); + } + + return rawClimate; +} diff --git a/src/openrct2/object/ClimateObject.h b/src/openrct2/object/ClimateObject.h new file mode 100644 index 0000000000..a8f2637f18 --- /dev/null +++ b/src/openrct2/object/ClimateObject.h @@ -0,0 +1,38 @@ +/***************************************************************************** + * Copyright (c) 2014-2025 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#pragma once + +#include "../world/Climate.h" +#include "Object.h" + +struct IReadObjectContext; + +using YearlyDistribution = std::array; + +class ClimateObject final : public Object +{ +private: + Climate _climate; + std::string _scriptName; + +public: + static constexpr ObjectType kObjectType = ObjectType::climate; + + void ReadJson(IReadObjectContext* context, json_t& root) override; + void Load() override; + void Unload() override; + + void DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t height) const override; + + const TemperatureThresholds& getItemThresholds() const; + const WeatherPattern& getPatternForMonth(uint8_t month) const; + std::string getScriptName() const; + YearlyDistribution getYearlyDistribution() const; +}; diff --git a/src/openrct2/object/DefaultObjects.cpp b/src/openrct2/object/DefaultObjects.cpp index c91af29341..347f893331 100644 --- a/src/openrct2/object/DefaultObjects.cpp +++ b/src/openrct2/object/DefaultObjects.cpp @@ -11,10 +11,14 @@ #include "Object.h" -// clang-format off -const std::string_view MinimumRequiredObjects[] = { "rct2.terrain_surface.grass", "rct2.terrain_edge.rock" }; +constexpr std::array kMinimumRequiredObjects = { + "rct2.terrain_surface.grass", + "rct2.terrain_edge.rock", -const std::string_view DefaultSelectedObjects[] = { + "rct2.station.plain", +}; + +constexpr std::array kCommonScenarioAndTrackDesignerObjects = { // An initial default selection "rct2.scenery_group.scgtrees", // Scenery: Trees "rct2.scenery_group.scgshrub", // Scenery: Shrubs and Ornaments @@ -22,54 +26,12 @@ const std::string_view DefaultSelectedObjects[] = { "rct2.scenery_group.scgfence", // Scenery: Fences and Walls "rct2.scenery_group.scgwalls", // Scenery: Walls and Roofs "rct2.scenery_group.scgpathx", // Scenery: Signs and Items for Footpaths - "rct2.ride.twist1", // Ride: Twist - "rct2.ride.ptct1", // Ride: Wooden Roller Coaster (Wooden Roller Coaster Trains) - "rct2.ride.zldb", // Ride: Junior Roller Coaster (Ladybird Trains) - "rct2.ride.lfb1", // Ride: Log Flume - "rct2.ride.vcr", // Ride: Vintage Cars - "rct2.ride.mgr1", // Ride: Merry-Go-Round - "rct2.ride.tlt1", // Ride: Toilet - "rct2.ride.atm1", // Ride: Cash Machine - "rct2.ride.faid1", // Ride: First Aid Room - "rct2.ride.infok", // Ride: Information Kiosk - "rct2.ride.drnks", // Ride: Drinks Stall - "rct2.ride.cndyf", // Ride: Candyfloss Stall - "rct2.ride.burgb", // Ride: Burger Bar - "rct2.ride.balln", // Ride: Balloon Stall - "rct2.ride.arrt1", // Ride: Corkscrew Roller Coaster - "rct2.ride.rboat", // Ride: Rowing Boats - "rct2.park_entrance.pkent1", // Park Entrance: Traditional Park Entrance - "rct2.water.wtrcyan", // Water: Natural Water - // The following are for all random map generation features to work out the box - "rct2.scenery_group.scgjungl", // Jungle Theming - "rct2.scenery_group.scgsnow", // Snow and Ice Theming - "rct2.scenery_group.scgwater", // Water Feature Theming + "rct2.park_entrance.pkent1", // Park Entrance: Traditional Park Entrance - // Surfaces - "rct2.terrain_surface.grass", - "rct2.terrain_surface.sand", - "rct2.terrain_surface.dirt", - "rct2.terrain_surface.rock", - "rct2.terrain_surface.martian", - "rct2.terrain_surface.chequerboard", - "rct2.terrain_surface.grass_clumps", - "rct2.terrain_surface.ice", - "rct2.terrain_surface.grid_red", - "rct2.terrain_surface.grid_yellow", - "rct2.terrain_surface.grid_purple", - "rct2.terrain_surface.grid_green", - "rct2.terrain_surface.sand_red", - "rct2.terrain_surface.sand_brown", - - // Edges - "rct2.terrain_edge.rock", - "rct2.terrain_edge.wood_red", - "rct2.terrain_edge.wood_black", - "rct2.terrain_edge.ice", + "rct2.water.wtrcyan", // Water: Natural Water // Stations - "rct2.station.plain", "rct2.station.wooden", "rct2.station.canvas_tent", "rct2.station.castle_grey", @@ -153,55 +115,51 @@ const std::string_view DefaultSelectedObjects[] = { "rct2.peep_animations.handyman", "rct2.peep_animations.mechanic", "rct2.peep_animations.security", + + // Climate object + "rct2.climate.warm", }; -const std::string_view DesignerSelectedObjects[] = { - // An initial default selection + all standard footpaths + all standard stations - "rct2.scenery_group.scgtrees", // Scenery: Trees - "rct2.scenery_group.scgshrub", // Scenery: Shrubs and Ornaments - "rct2.scenery_group.scggardn", // Scenery: Gardens - "rct2.scenery_group.scgfence", // Scenery: Fences and Walls - "rct2.scenery_group.scgwalls", // Scenery: Walls and Roofs - "rct2.scenery_group.scgpathx", // Scenery: Signs and Items for Footpaths - "rct2.water.wtrcyan", // Water: Natural Water - "rct2.park_entrance.pkent1", // Park Entrance: Traditional Park Entrance - "rct2.terrain_surface.grass", - "rct2.terrain_edge.rock", +constexpr std::array kDefaultScenarioObjects = { + "rct2.ride.twist1", // Ride: Twist + "rct2.ride.ptct1", // Ride: Wooden Roller Coaster (Wooden Roller Coaster Trains) + "rct2.ride.zldb", // Ride: Junior Roller Coaster (Ladybird Trains) + "rct2.ride.lfb1", // Ride: Log Flume + "rct2.ride.vcr", // Ride: Vintage Cars + "rct2.ride.mgr1", // Ride: Merry-Go-Round + "rct2.ride.tlt1", // Ride: Toilet + "rct2.ride.atm1", // Ride: Cash Machine + "rct2.ride.faid1", // Ride: First Aid Room + "rct2.ride.infok", // Ride: Information Kiosk + "rct2.ride.drnks", // Ride: Drinks Stall + "rct2.ride.cndyf", // Ride: Candyfloss Stall + "rct2.ride.burgb", // Ride: Burger Bar + "rct2.ride.balln", // Ride: Balloon Stall + "rct2.ride.arrt1", // Ride: Corkscrew Roller Coaster + "rct2.ride.rboat", // Ride: Rowing Boats - // Footpath surfaces - "rct2.footpath_surface.tarmac", - "rct2.footpath_surface.tarmac_brown", - "rct2.footpath_surface.tarmac_red", - "rct2.footpath_surface.tarmac_green", - "rct2.footpath_surface.dirt", - "rct2.footpath_surface.crazy_paving", - "rct2.footpath_surface.ash", - "rct2.footpath_surface.queue_blue", - "rct2.footpath_surface.queue_green", - "rct2.footpath_surface.queue_red", - "rct2.footpath_surface.queue_yellow", + // The following are for all random map generation features to work out the box + "rct2.scenery_group.scgjungl", // Jungle Theming + "rct2.scenery_group.scgsnow", // Snow and Ice Theming + "rct2.scenery_group.scgwater", // Water Feature Theming - // Footpath railings - "rct2.footpath_railings.bamboo_black", - "rct2.footpath_railings.bamboo_brown", - "rct2.footpath_railings.concrete", - "rct2.footpath_railings.concrete_green", - "rct2.footpath_railings.space", - "rct2.footpath_railings.wood", + // Surfaces + "rct2.terrain_surface.sand", + "rct2.terrain_surface.dirt", + "rct2.terrain_surface.rock", + "rct2.terrain_surface.martian", + "rct2.terrain_surface.chequerboard", + "rct2.terrain_surface.grass_clumps", + "rct2.terrain_surface.ice", + "rct2.terrain_surface.grid_red", + "rct2.terrain_surface.grid_yellow", + "rct2.terrain_surface.grid_purple", + "rct2.terrain_surface.grid_green", + "rct2.terrain_surface.sand_red", + "rct2.terrain_surface.sand_brown", - // Stations - "rct2.station.plain", - "rct2.station.wooden", - "rct2.station.canvas_tent", - "rct2.station.castle_grey", - "rct2.station.castle_brown", - "rct2.station.jungle", - "rct2.station.log", - "rct2.station.classical", - "rct2.station.abstract", - "rct2.station.snow", - "rct2.station.pagoda", - "rct2.station.space", + // Edges + "rct2.terrain_edge.wood_red", + "rct2.terrain_edge.wood_black", + "rct2.terrain_edge.ice", }; - -// clang-format on diff --git a/src/openrct2/object/DefaultObjects.h b/src/openrct2/object/DefaultObjects.h index dc8c378179..30261d23db 100644 --- a/src/openrct2/object/DefaultObjects.h +++ b/src/openrct2/object/DefaultObjects.h @@ -11,6 +11,19 @@ #include "Object.h" -extern const std::string_view MinimumRequiredObjects[2]; -extern const std::string_view DefaultSelectedObjects[119]; -extern const std::string_view DesignerSelectedObjects[39]; +#include + +/** + * Used by all editor modes: Scenario Editor, Track Designer and Track Designs Manager. + */ +extern const std::array kMinimumRequiredObjects; + +/** + * Used by the Scenario Editor and Track Designer. + */ +extern const std::array kCommonScenarioAndTrackDesignerObjects; + +/** + * Used only by the Scenario Editor. + */ +extern const std::array kDefaultScenarioObjects; diff --git a/src/openrct2/object/ImageTable.cpp b/src/openrct2/object/ImageTable.cpp index d2fec7bf98..f6b1645e06 100644 --- a/src/openrct2/object/ImageTable.cpp +++ b/src/openrct2/object/ImageTable.cpp @@ -380,7 +380,7 @@ std::vector ImageTable::ParseRange(std::string s) std::string ImageTable::FindLegacyObject(const std::string& name) { const auto env = GetContext()->GetPlatformEnvironment(); - auto objectsPath = env->GetDirectoryPath(DIRBASE::RCT2, DIRID::OBJECT); + auto objectsPath = env->GetDirectoryPath(DirBase::rct2, DirId::objects); auto objectPath = Path::Combine(objectsPath, name); if (File::Exists(objectPath)) { @@ -512,7 +512,7 @@ std::vector> ImageTable::GetImageSources(IReadObje if (itSource == result.end()) { auto imageData = context->GetData(path); - auto imageFormat = keepPalette ? IMAGE_FORMAT::PNG : IMAGE_FORMAT::PNG_32; + auto imageFormat = keepPalette ? ImageFormat::png : ImageFormat::png32; auto image = Imaging::ReadFromBuffer(imageData, imageFormat); auto pair = std::make_pair(std::move(path), std::move(image)); result.push_back(std::move(pair)); diff --git a/src/openrct2/object/MusicObject.cpp b/src/openrct2/object/MusicObject.cpp index 9fb7f2300a..a9d455d92d 100644 --- a/src/openrct2/object/MusicObject.cpp +++ b/src/openrct2/object/MusicObject.cpp @@ -227,7 +227,7 @@ ObjectAsset MusicObject::GetAsset(IReadObjectContext& context, std::string_view if (path.find("$RCT2:DATA/") == 0) { auto env = GetContext()->GetPlatformEnvironment(); - auto path2 = env->FindFile(DIRBASE::RCT2, DIRID::DATA, path.substr(11)); + auto path2 = env->FindFile(DirBase::rct2, DirId::data, path.substr(11)); return ObjectAsset(path2); } diff --git a/src/openrct2/object/Object.cpp b/src/openrct2/object/Object.cpp index e33ddd1011..6082d15586 100644 --- a/src/openrct2/object/Object.cpp +++ b/src/openrct2/object/Object.cpp @@ -311,7 +311,7 @@ bool ObjectAsset::IsAvailable() const return File::Exists(_path); } - auto zipArchive = Zip::TryOpen(_zipPath, ZIP_ACCESS::READ); + auto zipArchive = Zip::TryOpen(_zipPath, ZipAccess::read); return zipArchive != nullptr && zipArchive->Exists(_path); } @@ -322,7 +322,7 @@ uint64_t ObjectAsset::GetSize() const return File::GetSize(_path); } - auto zipArchive = Zip::TryOpen(_zipPath, ZIP_ACCESS::READ); + auto zipArchive = Zip::TryOpen(_zipPath, ZipAccess::read); if (zipArchive != nullptr) { auto index = zipArchive->GetIndexFromPath(_path); @@ -342,7 +342,7 @@ std::vector ObjectAsset::GetData() const return File::ReadAllBytes(_path); } - auto zipArchive = Zip::TryOpen(_zipPath, ZIP_ACCESS::READ); + auto zipArchive = Zip::TryOpen(_zipPath, ZipAccess::read); if (zipArchive != nullptr) { return zipArchive->GetFileData(_path); @@ -356,10 +356,10 @@ std::unique_ptr ObjectAsset::GetStream() const { if (_zipPath.empty()) { - return std::make_unique(_path, FILE_MODE_OPEN); + return std::make_unique(_path, FileMode::open); } - auto zipArchive = Zip::TryOpen(_zipPath, ZIP_ACCESS::READ); + auto zipArchive = Zip::TryOpen(_zipPath, ZipAccess::read); if (zipArchive != nullptr) { auto stream = zipArchive->GetFileStream(_path); diff --git a/src/openrct2/object/ObjectFactory.cpp b/src/openrct2/object/ObjectFactory.cpp index 33b625675f..9f428069fc 100644 --- a/src/openrct2/object/ObjectFactory.cpp +++ b/src/openrct2/object/ObjectFactory.cpp @@ -15,6 +15,7 @@ #include "../PlatformEnvironment.h" #include "../audio/Audio.h" #include "../core/Console.hpp" +#include "../core/EnumMap.hpp" #include "../core/File.h" #include "../core/FileStream.h" #include "../core/Json.hpp" @@ -26,6 +27,7 @@ #include "../rct12/SawyerChunkReader.h" #include "AudioObject.h" #include "BannerObject.h" +#include "ClimateObject.h" #include "EntranceObject.h" #include "FootpathObject.h" #include "FootpathRailingsObject.h" @@ -265,7 +267,7 @@ namespace OpenRCT2::ObjectFactory std::unique_ptr result; try { - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::open); auto chunkReader = SawyerChunkReader(&fs); RCTObjectEntry entry = fs.ReadValue(); @@ -394,60 +396,44 @@ namespace OpenRCT2::ObjectFactory case ObjectType::peepAnimations: result = std::make_unique(); break; + case ObjectType::climate: + result = std::make_unique(); + break; default: throw std::runtime_error("Invalid object type"); } return result; } - static ObjectType ParseObjectType(const std::string& s) - { - if (s == "ride") - return ObjectType::ride; - if (s == "footpath_banner") - return ObjectType::banners; - if (s == "footpath_item") - return ObjectType::pathAdditions; - if (s == "scenery_small") - return ObjectType::smallScenery; - if (s == "scenery_large") - return ObjectType::largeScenery; - if (s == "scenery_wall") - return ObjectType::walls; - if (s == "scenery_group") - return ObjectType::sceneryGroup; - if (s == "park_entrance") - return ObjectType::parkEntrance; - if (s == "water") - return ObjectType::water; - if (s == "scenario_text") - return ObjectType::scenarioText; - if (s == "terrain_surface") - return ObjectType::terrainSurface; - if (s == "terrain_edge") - return ObjectType::terrainEdge; - if (s == "station") - return ObjectType::station; - if (s == "music") - return ObjectType::music; - if (s == "footpath_surface") - return ObjectType::footpathSurface; - if (s == "footpath_railings") - return ObjectType::footpathRailings; - if (s == "audio") - return ObjectType::audio; - if (s == "peep_names") - return ObjectType::peepNames; - if (s == "peep_animations") - return ObjectType::peepAnimations; - return ObjectType::none; - } + static const EnumMap kObjectTypeMap = { + { "ride", ObjectType::ride }, + { "scenery_small", ObjectType::smallScenery }, + { "scenery_large", ObjectType::largeScenery }, + { "scenery_wall", ObjectType::walls }, + { "footpath_banner", ObjectType::banners }, + { "footpath_legacy", ObjectType::paths }, + { "footpath_item", ObjectType::pathAdditions }, + { "scenery_group", ObjectType::sceneryGroup }, + { "park_entrance", ObjectType::parkEntrance }, + { "water", ObjectType::water }, + { "scenario_text", ObjectType::scenarioText }, + { "terrain_surface", ObjectType::terrainSurface }, + { "terrain_edge", ObjectType::terrainEdge }, + { "station", ObjectType::station }, + { "music", ObjectType::music }, + { "footpath_surface", ObjectType::footpathSurface }, + { "footpath_railings", ObjectType::footpathRailings }, + { "audio", ObjectType::audio }, + { "peep_names", ObjectType::peepNames }, + { "peep_animations", ObjectType::peepAnimations }, + { "climate", ObjectType::climate }, + }; std::unique_ptr CreateObjectFromZipFile(IObjectRepository& objectRepository, std::string_view path, bool loadImages) { try { - auto archive = Zip::Open(path, ZIP_ACCESS::READ); + auto archive = Zip::Open(path, ZipAccess::read); auto jsonBytes = archive->GetFileData("object.json"); if (jsonBytes.empty()) { @@ -538,9 +524,10 @@ namespace OpenRCT2::ObjectFactory std::unique_ptr result; - auto objectType = ParseObjectType(Json::GetString(jRoot["objectType"])); - if (objectType != ObjectType::none) + auto lookup = kObjectTypeMap.find(Json::GetString(jRoot["objectType"])); + if (lookup != kObjectTypeMap.end()) { + auto objectType = lookup->second; auto id = Json::GetString(jRoot["id"]); // Base audio files are renamed to a common, virtual name so asset packs can override it correctly. diff --git a/src/openrct2/object/ObjectLimits.h b/src/openrct2/object/ObjectLimits.h index 634a450de4..51ae09fd5e 100644 --- a/src/openrct2/object/ObjectLimits.h +++ b/src/openrct2/object/ObjectLimits.h @@ -33,5 +33,6 @@ constexpr uint16_t kMaxFootpathRailingsObjects = 255; constexpr uint16_t kMaxAudioObjects = 255; constexpr uint16_t kMaxPeepNamesObjects = 1; constexpr uint16_t kMaxPeepAnimationsObjects = 255; +constexpr uint16_t kMaxClimateObjects = 1; constexpr uint8_t kDatNameLength = 8; diff --git a/src/openrct2/object/ObjectList.cpp b/src/openrct2/object/ObjectList.cpp index db3379afa9..b5d83f0227 100644 --- a/src/openrct2/object/ObjectList.cpp +++ b/src/openrct2/object/ObjectList.cpp @@ -37,6 +37,7 @@ static constexpr std::array kObjectEntryG kMaxTerrainSurfaceObjects, kMaxTerrainEdgeObjects, kMaxStationObjects, kMaxMusicObjects, kMaxFootpathSurfaceObjects, kMaxFootpathRailingsObjects, kMaxAudioObjects, kMaxPeepNamesObjects, kMaxPeepAnimationsObjects, + kMaxClimateObjects, }; static_assert(std::size(kObjectEntryGroupCounts) == EnumValue(ObjectType::count)); diff --git a/src/openrct2/object/ObjectRepository.cpp b/src/openrct2/object/ObjectRepository.cpp index 9df16b144d..2fe05c3b04 100644 --- a/src/openrct2/object/ObjectRepository.cpp +++ b/src/openrct2/object/ObjectRepository.cpp @@ -75,19 +75,19 @@ using ObjectEntryMap = std::unordered_map { private: - static constexpr uint32_t MAGIC_NUMBER = 0x5844494F; // OIDX - static constexpr uint16_t VERSION = 30; - static constexpr auto PATTERN = "*.dat;*.pob;*.json;*.parkobj"; + static constexpr uint32_t kMagicNumber = 0x5844494F; // OIDX + static constexpr uint16_t kVersion = 31; + static constexpr auto kPattern = "*.dat;*.pob;*.json;*.parkobj"; IObjectRepository& _objectRepository; public: explicit ObjectFileIndex(IObjectRepository& objectRepository, const IPlatformEnvironment& env) : FileIndex( - "object index", MAGIC_NUMBER, VERSION, env.GetFilePath(PATHID::CACHE_OBJECTS), std::string(PATTERN), + "object index", kMagicNumber, kVersion, env.GetFilePath(PathId::cacheObjects), std::string(kPattern), std::vector{ - env.GetDirectoryPath(DIRBASE::OPENRCT2, DIRID::OBJECT), - env.GetDirectoryPath(DIRBASE::USER, DIRID::OBJECT), + env.GetDirectoryPath(DirBase::openrct2, DirId::objects), + env.GetDirectoryPath(DirBase::user, DirId::objects), }) , _objectRepository(objectRepository) { @@ -149,7 +149,6 @@ protected: { case ObjectType::ride: ds << item.RideInfo.RideFlags; - ds << item.RideInfo.RideCategory; ds << item.RideInfo.RideType; break; case ObjectType::sceneryGroup: @@ -541,7 +540,7 @@ private: // Save to file try { - auto fs = FileStream(std::string(path), FILE_MODE_WRITE); + auto fs = FileStream(std::string(path), FileMode::write); fs.Write(entry, sizeof(RCTObjectEntry)); fs.Write(encodedDataBuffer, encodedDataSize); @@ -587,7 +586,7 @@ private: std::string GetPathForNewObject(ObjectGeneration generation, std::string_view name) { // Get object directory and create it if it doesn't exist - auto userObjPath = _env->GetDirectoryPath(DIRBASE::USER, DIRID::OBJECT); + auto userObjPath = _env->GetDirectoryPath(DirBase::user, DirId::objects); Path::CreateDirectory(userObjPath); // Find a unique file name @@ -642,7 +641,7 @@ private: } // Read object data from file - auto fs = OpenRCT2::FileStream(item->Path, OpenRCT2::FILE_MODE_OPEN); + auto fs = OpenRCT2::FileStream(item->Path, OpenRCT2::FileMode::open); auto fileEntry = fs.ReadValue(); if (*entry != fileEntry) { diff --git a/src/openrct2/object/ObjectRepository.h b/src/openrct2/object/ObjectRepository.h index 4251fb4096..39e99d1eef 100644 --- a/src/openrct2/object/ObjectRepository.h +++ b/src/openrct2/object/ObjectRepository.h @@ -22,6 +22,7 @@ namespace OpenRCT2 } // namespace OpenRCT2 class Object; +enum class RideCategory : uint8_t; namespace OpenRCT2::Localisation { @@ -52,7 +53,6 @@ struct ObjectRepositoryItem struct { uint8_t RideFlags; - uint8_t RideCategory[OpenRCT2::RCT2::ObjectLimits::kMaxCategoriesPerRide]; ride_type_t RideType[OpenRCT2::RCT2::ObjectLimits::kMaxRideTypesPerRideEntry]; } RideInfo; struct diff --git a/src/openrct2/object/ObjectTypes.cpp b/src/openrct2/object/ObjectTypes.cpp index 38e4a5e934..b7ccee39c0 100644 --- a/src/openrct2/object/ObjectTypes.cpp +++ b/src/openrct2/object/ObjectTypes.cpp @@ -35,6 +35,7 @@ constexpr std::array kAllObjectTypes = { ObjectType::audio, ObjectType::peepNames, ObjectType::peepAnimations, + ObjectType::climate, }; static_assert(kAllObjectTypes.size() == EnumValue(ObjectType::count)); @@ -45,7 +46,7 @@ static constexpr std::array kTransie ObjectType::banners, ObjectType::paths, ObjectType::pathAdditions, ObjectType::sceneryGroup, ObjectType::parkEntrance, ObjectType::water, ObjectType::terrainSurface, ObjectType::terrainEdge, ObjectType::station, ObjectType::music, ObjectType::footpathSurface, ObjectType::footpathRailings, - ObjectType::peepNames, ObjectType::peepAnimations, + ObjectType::peepNames, ObjectType::peepAnimations, ObjectType::climate, }; // Object types that cannot be saved in a park file. diff --git a/src/openrct2/object/ObjectTypes.h b/src/openrct2/object/ObjectTypes.h index d7428e1bd2..247f796dae 100644 --- a/src/openrct2/object/ObjectTypes.h +++ b/src/openrct2/object/ObjectTypes.h @@ -41,12 +41,13 @@ enum class ObjectType : uint8_t audio, peepNames, peepAnimations, + climate, count, none = 255 }; -static constexpr size_t kNumTransientObjectTypes = 18; +static constexpr size_t kNumTransientObjectTypes = 19; static constexpr size_t kNumIntransientObjectTypes = 2; bool ObjectTypeIsTransient(ObjectType type); diff --git a/src/openrct2/object/ResourceTable.cpp b/src/openrct2/object/ResourceTable.cpp index 025aeff076..a524365f10 100644 --- a/src/openrct2/object/ResourceTable.cpp +++ b/src/openrct2/object/ResourceTable.cpp @@ -79,34 +79,34 @@ ResourceTable::SourceInfo ResourceTable::ParseSource(std::string_view source) else if (String::startsWith(base, "$G1")) { auto env = GetContext()->GetPlatformEnvironment(); - auto dataPath = env->GetDirectoryPath(DIRBASE::RCT2, DIRID::DATA); + auto dataPath = env->GetDirectoryPath(DirBase::rct2, DirId::data); info.Kind = SourceKind::G1; - // info.Path = env->FindFile(DIRBASE::RCT2, DIRID::DATA, "g1.dat"); + // info.Path = env->FindFile(DirBase::rct2, DirId::data, "g1.dat"); } else if (String::startsWith(base, "$CSG")) { auto env = GetContext()->GetPlatformEnvironment(); - auto dataPath = env->GetDirectoryPath(DIRBASE::RCT2, DIRID::DATA); + auto dataPath = env->GetDirectoryPath(DirBase::rct2, DirId::data); info.Kind = SourceKind::Csg; - // info.Path = env->FindFile(DIRBASE::RCT2, DIRID::DATA, "g1.dat"); + // info.Path = env->FindFile(DirBase::rct2, DirId::data, "g1.dat"); } else if (String::startsWith(base, "$RCT1:DATA/")) { auto env = GetContext()->GetPlatformEnvironment(); info.Kind = SourceKind::Data; - info.Path = env->FindFile(DIRBASE::RCT1, DIRID::DATA, fileName); + info.Path = env->FindFile(DirBase::rct1, DirId::data, fileName); } else if (String::startsWith(base, "$RCT2:DATA/")) { auto env = GetContext()->GetPlatformEnvironment(); info.Kind = SourceKind::Data; - info.Path = env->FindFile(DIRBASE::RCT2, DIRID::DATA, fileName); + info.Path = env->FindFile(DirBase::rct2, DirId::data, fileName); } else if (String::startsWith(base, "$RCT2:OBJDATA/")) { auto env = GetContext()->GetPlatformEnvironment(); info.Kind = SourceKind::ObjData; - info.Path = env->FindFile(DIRBASE::RCT2, DIRID::OBJECT, fileName); + info.Path = env->FindFile(DirBase::rct2, DirId::objects, fileName); } else if (!String::startsWith(base, "$")) { diff --git a/src/openrct2/object/RideObject.cpp b/src/openrct2/object/RideObject.cpp index 2d88bca0ca..0635f24122 100644 --- a/src/openrct2/object/RideObject.cpp +++ b/src/openrct2/object/RideObject.cpp @@ -188,7 +188,7 @@ void RideObject::ReadLegacy(IReadObjectContext* context, IStream* stream) _presetColours.list[i] = stream->ReadValue(); } - if (IsRideTypeShopOrFacility(_legacyType.ride_type[0])) + if (isRideTypeShopOrFacility(_legacyType.ride_type[0])) { // This used to be hard-coded. JSON objects set this themselves. _presetColours.count = 1; @@ -386,18 +386,10 @@ ImageIndex RideObject::GetPreviewImage(ride_type_t type) void RideObject::SetRepositoryItem(ObjectRepositoryItem* item) const { - // Find the first non-null ride type, to be used when checking the ride group and determining the category. - auto firstRideType = _legacyType.GetFirstNonNullRideType(); - uint8_t category = GetRideTypeDescriptor(firstRideType).Category; - for (int32_t i = 0; i < RCT2::ObjectLimits::kMaxRideTypesPerRideEntry; i++) { item->RideInfo.RideType[i] = _legacyType.ride_type[i]; } - for (int32_t i = 0; i < RCT2::ObjectLimits::kMaxCategoriesPerRide; i++) - { - item->RideInfo.RideCategory[i] = category; - } item->RideInfo.RideFlags = 0; } @@ -555,7 +547,7 @@ void RideObject::ReadJson(IReadObjectContext* context, json_t& root) auto carColours = Json::AsArray(properties["carColours"]); _presetColours = ReadJsonCarColours(carColours); - if (IsRideTypeShopOrFacility(_legacyType.ride_type[0])) + if (isRideTypeShopOrFacility(_legacyType.ride_type[0])) { // Standard car info for a shop auto& car = _legacyType.Cars[0]; @@ -648,7 +640,7 @@ void RideObject::ReadJsonVehicleInfo([[maybe_unused]] IReadObjectContext* contex _legacyType.min_cars_in_train = Json::GetNumber(properties["minCarsPerTrain"], 1); _legacyType.max_cars_in_train = Json::GetNumber(properties["maxCarsPerTrain"], 1); - _legacyType.cars_per_flat_ride = Json::GetNumber(properties["carsPerFlatRide"], NoFlatRideCars); + _legacyType.cars_per_flat_ride = Json::GetNumber(properties["carsPerFlatRide"], kNoFlatRideCars); _legacyType.zero_cars = Json::GetNumber(properties["numEmptyCars"]); // Train formation from car indices @@ -962,7 +954,7 @@ std::vector RideObject::ReadJsonColourConfiguration(json_t& jColo return config; } -bool RideObject::IsRideTypeShopOrFacility(ride_type_t rideType) +bool RideObject::isRideTypeShopOrFacility(ride_type_t rideType) { return GetRideTypeDescriptor(rideType).HasFlag(RtdFlag::isShopOrFacility); } @@ -977,19 +969,19 @@ ride_type_t RideObject::ParseRideType(const std::string& s) return std::distance(std::begin(kRideTypeDescriptors), result); } -static const EnumMap RideCategoryLookupTable{ - { "transport", RIDE_CATEGORY_TRANSPORT }, - { "gentle", RIDE_CATEGORY_GENTLE }, - { "rollercoaster", RIDE_CATEGORY_ROLLERCOASTER }, - { "thrill", RIDE_CATEGORY_THRILL }, - { "water", RIDE_CATEGORY_WATER }, - { "stall", RIDE_CATEGORY_SHOP }, +static const EnumMap RideCategoryLookupTable{ + { "transport", RideCategory::transport }, + { "gentle", RideCategory::gentle }, + { "rollercoaster", RideCategory::rollerCoaster }, + { "thrill", RideCategory::thrill }, + { "water", RideCategory::water }, + { "stall", RideCategory::shop }, }; -uint8_t RideObject::ParseRideCategory(const std::string& s) +RideCategory RideObject::ParseRideCategory(const std::string& s) { auto result = RideCategoryLookupTable.find(s); - return (result != RideCategoryLookupTable.end()) ? result->second : static_cast(RIDE_CATEGORY_TRANSPORT); + return (result != RideCategoryLookupTable.end()) ? result->second : RideCategory::transport; } static const EnumMap ShopItemLookupTable{ diff --git a/src/openrct2/object/RideObject.h b/src/openrct2/object/RideObject.h index e76744d622..97507ba87a 100644 --- a/src/openrct2/object/RideObject.h +++ b/src/openrct2/object/RideObject.h @@ -17,6 +17,8 @@ #include +enum class RideCategory : uint8_t; + class RideObject final : public Object { private: @@ -64,8 +66,8 @@ private: static uint8_t CalculateNumVerticalFrames(const CarEntry& carEntry); static uint8_t CalculateNumHorizontalFrames(const CarEntry& carEntry); - static bool IsRideTypeShopOrFacility(ride_type_t rideType); - static uint8_t ParseRideCategory(const std::string& s); + static bool isRideTypeShopOrFacility(ride_type_t rideType); + static RideCategory ParseRideCategory(const std::string& s); static ShopItem ParseShopItem(const std::string& s); static colour_t ParseColour(const std::string& s); diff --git a/src/openrct2/object/StationObject.cpp b/src/openrct2/object/StationObject.cpp index e009773f0b..d32302bfdb 100644 --- a/src/openrct2/object/StationObject.cpp +++ b/src/openrct2/object/StationObject.cpp @@ -28,7 +28,7 @@ void StationObject::Load() { BaseImageId = LoadImages(); - uint32_t shelterOffset = (Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT) ? 32 : 16; + uint32_t shelterOffset = (Flags & StationObjectFlags::isTransparent) ? 32 : 16; if (numImages > shelterOffset) { ShelterImageId = BaseImageId + shelterOffset; @@ -56,23 +56,23 @@ void StationObject::DrawPreview(DrawPixelInfo& dpi, int32_t width, int32_t heigh auto imageId = ImageId(BaseImageId); auto tImageId = ImageId(BaseImageId + 16).WithTransparency(tcolour0); - if (Flags & STATION_OBJECT_FLAGS::HAS_PRIMARY_COLOUR) + if (Flags & StationObjectFlags::hasPrimaryColour) { imageId = imageId.WithPrimary(colour0); } - if (Flags & STATION_OBJECT_FLAGS::HAS_SECONDARY_COLOUR) + if (Flags & StationObjectFlags::hasSecondaryColour) { imageId = imageId.WithSecondary(colour1); } GfxDrawSprite(dpi, imageId, screenCoords); - if (Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT) + if (Flags & StationObjectFlags::isTransparent) { GfxDrawSprite(dpi, tImageId, screenCoords); } GfxDrawSprite(dpi, imageId.WithIndexOffset(4), screenCoords); - if (Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT) + if (Flags & StationObjectFlags::isTransparent) { GfxDrawSprite(dpi, tImageId.WithIndexOffset(4), screenCoords); } @@ -91,11 +91,11 @@ void StationObject::ReadJson(IReadObjectContext* context, json_t& root) Flags = Json::GetFlags( properties, { - { "hasPrimaryColour", STATION_OBJECT_FLAGS::HAS_PRIMARY_COLOUR }, - { "hasSecondaryColour", STATION_OBJECT_FLAGS::HAS_SECONDARY_COLOUR }, - { "isTransparent", STATION_OBJECT_FLAGS::IS_TRANSPARENT }, - { "noPlatforms", STATION_OBJECT_FLAGS::NO_PLATFORMS }, - { "hasShelter", STATION_OBJECT_FLAGS::HAS_SHELTER }, + { "hasPrimaryColour", StationObjectFlags::hasPrimaryColour }, + { "hasSecondaryColour", StationObjectFlags::hasSecondaryColour }, + { "isTransparent", StationObjectFlags::isTransparent }, + { "noPlatforms", StationObjectFlags::noPlatforms }, + { "hasShelter", StationObjectFlags::hasShelter }, }); } diff --git a/src/openrct2/object/StationObject.h b/src/openrct2/object/StationObject.h index b0cfb615cc..c6a4bd4648 100644 --- a/src/openrct2/object/StationObject.h +++ b/src/openrct2/object/StationObject.h @@ -12,14 +12,14 @@ #include "../drawing/ImageId.hpp" #include "Object.h" -namespace OpenRCT2::STATION_OBJECT_FLAGS +namespace OpenRCT2::StationObjectFlags { - const uint32_t HAS_PRIMARY_COLOUR = 1 << 0; - const uint32_t HAS_SECONDARY_COLOUR = 1 << 1; - const uint32_t IS_TRANSPARENT = 1 << 2; - const uint32_t NO_PLATFORMS = 1 << 3; - const uint32_t HAS_SHELTER = (1 << 4); -} // namespace OpenRCT2::STATION_OBJECT_FLAGS + const uint32_t hasPrimaryColour = 1 << 0; + const uint32_t hasSecondaryColour = 1 << 1; + const uint32_t isTransparent = 1 << 2; + const uint32_t noPlatforms = 1 << 3; + const uint32_t hasShelter = (1 << 4); +} // namespace OpenRCT2::StationObjectFlags class StationObject final : public Object { diff --git a/src/openrct2/object/TerrainEdgeObject.cpp b/src/openrct2/object/TerrainEdgeObject.cpp index 38670accea..b28db34207 100644 --- a/src/openrct2/object/TerrainEdgeObject.cpp +++ b/src/openrct2/object/TerrainEdgeObject.cpp @@ -65,6 +65,5 @@ void TerrainEdgeObject::ReadJson(IReadObjectContext* context, json_t& root) TerrainEdgeObject* TerrainEdgeObject::GetById(ObjectEntryIndex entryIndex) { auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto* obj = objMgr.GetLoadedObject(ObjectType::terrainEdge, entryIndex); - return static_cast(obj); + return objMgr.GetLoadedObject(entryIndex); } diff --git a/src/openrct2/object/TerrainSurfaceObject.cpp b/src/openrct2/object/TerrainSurfaceObject.cpp index 5e1c33cb01..77def97d92 100644 --- a/src/openrct2/object/TerrainSurfaceObject.cpp +++ b/src/openrct2/object/TerrainSurfaceObject.cpp @@ -25,7 +25,7 @@ void TerrainSurfaceObject::Load() GetStringTable().Sort(); NameStringId = LanguageAllocateObjectString(GetName()); IconImageId = LoadImages(); - if ((Flags & SMOOTH_WITH_SELF) || (Flags & SMOOTH_WITH_OTHER)) + if ((Flags & TerrainSurfaceFlags::smoothWithSelf) || (Flags & TerrainSurfaceFlags::smoothWithOther)) { PatternBaseImageId = IconImageId + 1; EntryBaseImageId = PatternBaseImageId + 6; @@ -87,11 +87,11 @@ void TerrainSurfaceObject::ReadJson(IReadObjectContext* context, json_t& root) Colour = Colour::FromString(Json::GetString(properties["colour"]), kNoValue); Rotations = Json::GetNumber(properties["rotations"], 1); Price = Json::GetNumber(properties["price"]); - Flags = Json::GetFlags( + Flags = Json::GetFlags( properties, - { { "smoothWithSelf", TERRAIN_SURFACE_FLAGS::SMOOTH_WITH_SELF }, - { "smoothWithOther", TERRAIN_SURFACE_FLAGS::SMOOTH_WITH_OTHER }, - { "canGrow", TERRAIN_SURFACE_FLAGS::CAN_GROW } }); + { { "smoothWithSelf", TerrainSurfaceFlags::smoothWithSelf }, + { "smoothWithOther", TerrainSurfaceFlags::smoothWithOther }, + { "canGrow", TerrainSurfaceFlags::canGrow } }); const auto mapColours = properties["mapColours"]; const bool mapColoursAreValid = mapColours.is_array() && mapColours.size() == std::size(MapColours); @@ -182,6 +182,5 @@ ImageId TerrainSurfaceObject::GetImageId( TerrainSurfaceObject* TerrainSurfaceObject::GetById(ObjectEntryIndex entryIndex) { auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto* obj = objMgr.GetLoadedObject(ObjectType::terrainSurface, entryIndex); - return static_cast(obj); + return objMgr.GetLoadedObject(entryIndex); } diff --git a/src/openrct2/object/TerrainSurfaceObject.h b/src/openrct2/object/TerrainSurfaceObject.h index a47c1a9138..73ab8d0d9b 100644 --- a/src/openrct2/object/TerrainSurfaceObject.h +++ b/src/openrct2/object/TerrainSurfaceObject.h @@ -14,12 +14,11 @@ struct CoordsXY; -enum TERRAIN_SURFACE_FLAGS +enum TerrainSurfaceFlags { - NONE = 0, - SMOOTH_WITH_SELF = 1 << 0, - SMOOTH_WITH_OTHER = 1 << 1, - CAN_GROW = 1 << 2, + smoothWithSelf = 1 << 0, + smoothWithOther = 1 << 1, + canGrow = 1 << 2, }; class TerrainSurfaceObject final : public Object @@ -55,7 +54,7 @@ public: colour_t Colour{}; uint8_t Rotations{}; money64 Price{}; - TERRAIN_SURFACE_FLAGS Flags{}; + TerrainSurfaceFlags Flags{}; PaletteIndex MapColours[2]{}; void ReadJson(IReadObjectContext* context, json_t& root) override; diff --git a/src/openrct2/paint/Painter.cpp b/src/openrct2/paint/Painter.cpp index 23fb5f87e5..4fc85a9d35 100644 --- a/src/openrct2/paint/Painter.cpp +++ b/src/openrct2/paint/Painter.cpp @@ -87,7 +87,7 @@ void Painter::PaintReplayNotice(DrawPixelInfo& dpi, const char* text) auto stringWidth = GfxGetStringWidth(buffer, FontStyle::Medium); screenCoords.x = screenCoords.x - stringWidth; - if (((GetGameState().CurrentTicks >> 1) & 0xF) > 4) + if (((getGameState().currentTicks >> 1) & 0xF) > 4) DrawText(dpi, screenCoords, { COLOUR_SATURATED_RED }, buffer); // Make area dirty so the text doesn't get drawn over the last @@ -96,7 +96,7 @@ void Painter::PaintReplayNotice(DrawPixelInfo& dpi, const char* text) static bool ShouldShowFPS() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return true; auto* windowMgr = Ui::GetWindowManager(); @@ -119,7 +119,7 @@ void Painter::PaintFPS(DrawPixelInfo& dpi) screenCoords.x = screenCoords.x - (stringWidth / 2); // Move counter below toolbar if buttons are centred - const bool isTitle = gScreenFlags == SCREEN_FLAGS_TITLE_DEMO; + const bool isTitle = gLegacyScene == LegacyScene::titleSequence; if (!isTitle && Config::Get().interface.ToolbarButtonsCentred) { screenCoords.y = kTopToolbarHeight + 3; diff --git a/src/openrct2/paint/VirtualFloor.cpp b/src/openrct2/paint/VirtualFloor.cpp index 65d5947223..205cf2fa54 100644 --- a/src/openrct2/paint/VirtualFloor.cpp +++ b/src/openrct2/paint/VirtualFloor.cpp @@ -247,7 +247,7 @@ static void VirtualFloorGetTileProperties( *tileOwned = MapIsLocationOwned({ loc, height }); - if (GetGameState().Cheats.sandboxMode) + if (getGameState().cheats.sandboxMode) *tileOwned = true; // Iterate through the map elements of the current tile to find: diff --git a/src/openrct2/paint/tile_element/Paint.Banner.cpp b/src/openrct2/paint/tile_element/Paint.Banner.cpp index 023b1d3a4e..938fc49ce9 100644 --- a/src/openrct2/paint/tile_element/Paint.Banner.cpp +++ b/src/openrct2/paint/tile_element/Paint.Banner.cpp @@ -68,7 +68,7 @@ static void PaintBannerScrollingText( } auto stringWidth = GfxGetStringWidth(text, FontStyle::Tiny); - auto scroll = stringWidth > 0 ? (GetGameState().CurrentTicks / 2) % stringWidth : 0; + auto scroll = stringWidth > 0 ? (getGameState().currentTicks / 2) % stringWidth : 0; auto imageId = ScrollingTextSetup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode, COLOUR_BLACK); PaintAddImageAsChild(session, imageId, { 0, 0, height + 22 }, { bbOffset, { 1, 1, 21 } }); } diff --git a/src/openrct2/paint/tile_element/Paint.Entrance.cpp b/src/openrct2/paint/tile_element/Paint.Entrance.cpp index 97cff835e6..b0a412e232 100644 --- a/src/openrct2/paint/tile_element/Paint.Entrance.cpp +++ b/src/openrct2/paint/tile_element/Paint.Entrance.cpp @@ -57,9 +57,9 @@ static void PaintRideEntranceExitScrollingText( auto ft = Formatter(); ft.Add(STR_RIDE_ENTRANCE_NAME); - if (ride->status == RideStatus::Open && !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (ride->status == RideStatus::open && !(ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } else { @@ -76,7 +76,7 @@ static void PaintRideEntranceExitScrollingText( FormatStringLegacy(text, sizeof(text), STR_BANNER_TEXT_FORMAT, ft.Data()); } auto stringWidth = GfxGetStringWidth(text, FontStyle::Tiny); - auto scroll = stringWidth > 0 ? (GetGameState().CurrentTicks / 2) % stringWidth : 0; + auto scroll = stringWidth > 0 ? (getGameState().currentTicks / 2) % stringWidth : 0; PaintAddImageAsChild( session, ScrollingTextSetup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, stationObj.ScrollingMode, COLOUR_BLACK), @@ -129,7 +129,7 @@ static void PaintRideEntranceExit(PaintSession& session, uint8_t direction, int3 return; } - auto stationObj = ride->GetStationObject(); + auto stationObj = ride->getStationObject(); if (stationObj == nullptr || stationObj->BaseImageId == kImageIndexUndefined) { return; @@ -139,10 +139,9 @@ static void PaintRideEntranceExit(PaintSession& session, uint8_t direction, int3 PaintRideEntranceExitLightEffects(session, height, entranceEl); - auto hasGlass = (stationObj->Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT) != 0; - auto colourPrimary = ride->track_colour[0].main; - auto colourSecondary = ride->track_colour[0].additional; - auto imageTemplate = ImageId(0, colourPrimary, colourSecondary); + auto hasGlass = (stationObj->Flags & StationObjectFlags::isTransparent) != 0; + auto colourPrimary = ride->trackColours[0].main; + auto imageTemplate = ImageId(0); ImageId glassImageTemplate; if (hasGlass) { @@ -158,6 +157,18 @@ static void PaintRideEntranceExit(PaintSession& session, uint8_t direction, int3 { imageTemplate = ImageId().WithRemap(FilterPaletteID::PaletteGhost); } + else + { + if (stationObj->Flags & StationObjectFlags::hasPrimaryColour) + { + imageTemplate = imageTemplate.WithPrimary(colourPrimary); + } + if (stationObj->Flags & StationObjectFlags::hasSecondaryColour) + { + auto colourSecondary = ride->trackColours[0].additional; + imageTemplate = imageTemplate.WithSecondary(colourSecondary); + } + } // Format modified to stop repeated code @@ -222,10 +233,10 @@ static void PaintParkEntranceScrollingText( return; auto ft = Formatter(); - auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) + auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_PARK_OPEN) { - const auto& park = gameState.Park; + const auto& park = gameState.park; auto name = park.Name.c_str(); ft.Add(STR_STRING); ft.Add(name); @@ -247,7 +258,7 @@ static void PaintParkEntranceScrollingText( } auto stringWidth = GfxGetStringWidth(text, FontStyle::Tiny); - auto scroll = stringWidth > 0 ? (gameState.CurrentTicks / 2) % stringWidth : 0; + auto scroll = stringWidth > 0 ? (gameState.currentTicks / 2) % stringWidth : 0; auto imageIndex = ScrollingTextSetup( session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode + direction / 2, COLOUR_BLACK); auto textHeight = height + entrance.GetTextHeight(); @@ -287,8 +298,7 @@ static void PaintParkEntrance(PaintSession& session, uint8_t direction, int32_t } auto& objManager = GetContext()->GetObjectManager(); - auto entrance = reinterpret_cast( - objManager.GetLoadedObject(ObjectType::parkEntrance, entranceEl.getEntryIndex())); + const auto* entrance = objManager.GetLoadedObject(entranceEl.getEntryIndex()); auto sequence = entranceEl.GetSequenceIndex(); switch (sequence) { diff --git a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp index b8c74bf5c9..a5eb7e293b 100644 --- a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp @@ -329,7 +329,7 @@ static void PaintLargeSceneryScrollingText( auto scrollMode = sceneryEntry.scrolling_mode + ((direction + 1) & 3); auto stringWidth = GfxGetStringWidth(text, FontStyle::Tiny); - auto scroll = stringWidth > 0 ? (GetGameState().CurrentTicks / 2) % stringWidth : 0; + auto scroll = stringWidth > 0 ? (getGameState().currentTicks / 2) % stringWidth : 0; auto imageId = ScrollingTextSetup(session, STR_SCROLLING_SIGN_TEXT, ft, scroll, scrollMode, textPaletteIndex); PaintAddImageAsChild(session, imageId, { 0, 0, height + 25 }, { bbOffset, { 1, 1, 21 } }); } diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index 7b5f19e840..0d3e819750 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -155,10 +155,10 @@ static void PathPaintQueueBanner( auto ft = Formatter(); - if (ride->status == RideStatus::Open && !(ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (ride->status == RideStatus::open && !(ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { ft.Add(STR_RIDE_ENTRANCE_NAME); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } else { @@ -176,7 +176,7 @@ static void PathPaintQueueBanner( } uint16_t stringWidth = GfxGetStringWidth(bannerBuffer, FontStyle::Tiny); - uint16_t scroll = stringWidth > 0 ? (GetGameState().CurrentTicks / 2) % stringWidth : 0; + uint16_t scroll = stringWidth > 0 ? (getGameState().currentTicks / 2) % stringWidth : 0; PaintAddImageAsChild( session, ScrollingTextSetup(session, STR_BANNER_TEXT_FORMAT, ft, scroll, scrollingMode, COLOUR_BLACK), @@ -200,25 +200,25 @@ static void PathPaintSlopedFences( PaintAddImageAsParent( session, imageId.WithIndexOffset(8 + queueOffset), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(8 + queueOffset), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 23 } }); + session, imageId.WithIndexOffset(8 + queueOffset), { 0, 28, height }, { { 0, 27, height + 2 }, { 32, 1, 23 } }); break; case 1: PaintAddImageAsParent( session, imageId.WithIndexOffset(7 + queueOffset), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(7 + queueOffset), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 23 } }); + session, imageId.WithIndexOffset(7 + queueOffset), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 32, 23 } }); break; case 2: PaintAddImageAsParent( session, imageId.WithIndexOffset(9 + queueOffset), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(9 + queueOffset), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 23 } }); + session, imageId.WithIndexOffset(9 + queueOffset), { 0, 28, height }, { { 0, 27, height + 2 }, { 32, 1, 23 } }); break; case 3: PaintAddImageAsParent( session, imageId.WithIndexOffset(6 + queueOffset), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 23 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(6 + queueOffset), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 23 } }); + session, imageId.WithIndexOffset(6 + queueOffset), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 32, 23 } }); break; } } @@ -240,44 +240,43 @@ static void PathPaintFencesAndQueueBannersQueue( { case 0b0001: PaintAddImageAsParent( - session, imageId.WithIndexOffset(17), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(17), { 0, 4, height }, { { 0, 4, height + 2 }, { 27, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(17), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(17), { 0, 28, height }, { { 0, 27, height + 2 }, { 27, 1, 7 } }); break; case 0b0010: PaintAddImageAsParent( - session, imageId.WithIndexOffset(18), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(18), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 27, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(18), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(18), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 27, 7 } }); break; case 0b0011: PaintAddImageAsParent( - session, imageId.WithIndexOffset(17), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(17), { 0, 4, height }, { { 0, 4, height + 2 }, { 26, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(18), { 28, 0, height }, - { { 28, 4, height + 2 }, { 1, 28, 7 } }); // bound_box_offset_y seems to be a bug + session, imageId.WithIndexOffset(18), { 28, 0, height }, { { 27, 4, height + 2 }, { 1, 27, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 27, height + 2 }, { 4, 4, 7 } }); break; case 0b0100: PaintAddImageAsParent( - session, imageId.WithIndexOffset(19), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(19), { 0, 4, height }, { { 0, 4, height + 2 }, { 27, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(19), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(19), { 0, 28, height }, { { 0, 27, height + 2 }, { 27, 1, 7 } }); break; case 0b0101: PaintAddImageAsParent( session, imageId.WithIndexOffset(15), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(15), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 7 } }); + session, imageId.WithIndexOffset(15), { 0, 28, height }, { { 0, 27, height + 2 }, { 32, 1, 7 } }); break; case 0b0110: PaintAddImageAsParent( - session, imageId.WithIndexOffset(18), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(18), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 27, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(19), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(19), { 0, 4, height }, { { 0, 4, height + 2 }, { 27, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 27, 27, height + 2 }, { 4, 4, 7 } }); break; case 0b0111: if (pathElement.HasJunctionRailings()) @@ -285,22 +284,22 @@ static void PathPaintFencesAndQueueBannersQueue( PaintAddImageAsParent( session, imageId.WithIndexOffset(15), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 27, height + 2 }, { 4, 4, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 27, 27, height + 2 }, { 4, 4, 7 } }); } break; case 0b1000: PaintAddImageAsParent( - session, imageId.WithIndexOffset(16), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(16), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 27, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(16), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(16), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 27, 7 } }); break; case 0b1001: PaintAddImageAsParent( - session, imageId.WithIndexOffset(16), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(16), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 27, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(17), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(17), { 0, 28, height }, { { 0, 27, height + 2 }, { 27, 1, 7 } }); PaintAddImageAsParent( session, imageId.WithIndexOffset(24), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); break; @@ -308,37 +307,36 @@ static void PathPaintFencesAndQueueBannersQueue( PaintAddImageAsParent( session, imageId.WithIndexOffset(14), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(14), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 7 } }); + session, imageId.WithIndexOffset(14), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 32, 7 } }); break; case 0b1011: if (pathElement.HasJunctionRailings()) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(14), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 7 } }); + session, imageId.WithIndexOffset(14), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 32, 7 } }); PaintAddImageAsParent( session, imageId.WithIndexOffset(24), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 27, height + 2 }, { 4, 4, 7 } }); } break; case 0b1100: PaintAddImageAsParent( - session, imageId.WithIndexOffset(16), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(16), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 26, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(19), { 0, 28, height }, - { { 4, 28, height + 2 }, { 28, 1, 7 } }); // bound_box_offset_x seems to be a bug + session, imageId.WithIndexOffset(19), { 0, 28, height }, { { 4, 27, height + 2 }, { 27, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 27, 0, height + 2 }, { 4, 4, 7 } }); break; case 0b1101: if (pathElement.HasJunctionRailings()) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(15), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 7 } }); + session, imageId.WithIndexOffset(15), { 0, 28, height }, { { 0, 27, height + 2 }, { 32, 1, 7 } }); PaintAddImageAsParent( session, imageId.WithIndexOffset(24), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 27, 0, height + 2 }, { 4, 4, 7 } }); } break; case 0b1110: @@ -347,9 +345,9 @@ static void PathPaintFencesAndQueueBannersQueue( PaintAddImageAsParent( session, imageId.WithIndexOffset(14), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 27, 27, height + 2 }, { 4, 4, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 27, 0, height + 2 }, { 4, 4, 7 } }); } break; case 0b1111: @@ -358,11 +356,11 @@ static void PathPaintFencesAndQueueBannersQueue( PaintAddImageAsParent( session, imageId.WithIndexOffset(24), { 0, 0, height }, { { 0, 0, height + 2 }, { 4, 4, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(25), { 0, 0, height }, { { 0, 27, height + 2 }, { 4, 4, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(26), { 0, 0, height }, { { 27, 27, height + 2 }, { 4, 4, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(27), { 0, 0, height }, { { 27, 0, height + 2 }, { 4, 4, 7 } }); } } } @@ -406,69 +404,68 @@ static void PathPaintFencesAndQueueBannersNonQueue( break; case 1: PaintAddImageAsParent( - session, imageId.WithIndexOffset(3), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(3), { 0, 4, height }, { { 0, 4, height + 2 }, { 27, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(3), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(3), { 0, 28, height }, { { 0, 27, height + 2 }, { 27, 1, 7 } }); break; case 2: PaintAddImageAsParent( - session, imageId.WithIndexOffset(4), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(4), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 27, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(4), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(4), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 27, 7 } }); break; case 4: PaintAddImageAsParent( - session, imageId.WithIndexOffset(5), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(5), { 0, 4, height }, { { 0, 4, height + 2 }, { 27, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(5), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(5), { 0, 28, height }, { { 0, 27, height + 2 }, { 27, 1, 7 } }); break; case 5: PaintAddImageAsParent( session, imageId.WithIndexOffset(1), { 0, 4, height }, { { 0, 4, height + 2 }, { 32, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(1), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 7 } }); + session, imageId.WithIndexOffset(1), { 0, 28, height }, { { 0, 27, height + 2 }, { 32, 1, 7 } }); break; case 8: PaintAddImageAsParent( - session, imageId.WithIndexOffset(2), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(2), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 27, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(2), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(2), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 27, 7 } }); break; case 10: PaintAddImageAsParent( session, imageId.WithIndexOffset(0), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 32, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(0), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 7 } }); + session, imageId.WithIndexOffset(0), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 32, 7 } }); break; case 3: PaintAddImageAsParent( - session, imageId.WithIndexOffset(3), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(3), { 0, 4, height }, { { 0, 4, height + 2 }, { 26, 1, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(4), { 28, 0, height }, - { { 28, 4, height + 2 }, { 1, 28, 7 } }); // bound_box_offset_y seems to be a bug + session, imageId.WithIndexOffset(4), { 28, 0, height }, { { 27, 4, height + 2 }, { 1, 27, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_0)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 27, height + 2 }, { 4, 4, 7 } }); } break; case 6: PaintAddImageAsParent( - session, imageId.WithIndexOffset(4), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(4), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 27, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(5), { 0, 4, height }, { { 0, 4, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(5), { 0, 4, height }, { { 0, 4, height + 2 }, { 27, 1, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_1)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 27, 27, height + 2 }, { 4, 4, 7 } }); } break; case 9: PaintAddImageAsParent( - session, imageId.WithIndexOffset(2), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(2), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 27, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(3), { 0, 28, height }, { { 0, 28, height + 2 }, { 28, 1, 7 } }); + session, imageId.WithIndexOffset(3), { 0, 28, height }, { { 0, 27, height + 2 }, { 27, 1, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_3)) { PaintAddImageAsParent( @@ -477,14 +474,13 @@ static void PathPaintFencesAndQueueBannersNonQueue( break; case 12: PaintAddImageAsParent( - session, imageId.WithIndexOffset(2), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 28, 7 } }); + session, imageId.WithIndexOffset(2), { 4, 0, height }, { { 4, 0, height + 2 }, { 1, 26, 7 } }); PaintAddImageAsParent( - session, imageId.WithIndexOffset(5), { 0, 28, height }, - { { 4, 28, height + 2 }, { 28, 1, 7 } }); // bound_box_offset_x seems to be a bug + session, imageId.WithIndexOffset(5), { 0, 28, height }, { { 4, 27, height + 2 }, { 27, 1, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_2)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 27, 0, height + 2 }, { 4, 4, 7 } }); } break; @@ -494,21 +490,21 @@ static void PathPaintFencesAndQueueBannersNonQueue( if (!(drawnCorners & FOOTPATH_CORNER_0)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 27, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_1)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 27, 27, height + 2 }, { 4, 4, 7 } }); } break; case 13: PaintAddImageAsParent( - session, imageId.WithIndexOffset(1), { 0, 28, height }, { { 0, 28, height + 2 }, { 32, 1, 7 } }); + session, imageId.WithIndexOffset(1), { 0, 28, height }, { { 0, 27, height + 2 }, { 32, 1, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_2)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 27, 0, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_3)) { @@ -522,21 +518,21 @@ static void PathPaintFencesAndQueueBannersNonQueue( if (!(drawnCorners & FOOTPATH_CORNER_1)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 27, 27, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_2)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 27, 0, height + 2 }, { 4, 4, 7 } }); } break; case 11: PaintAddImageAsParent( - session, imageId.WithIndexOffset(0), { 28, 0, height }, { { 28, 0, height + 2 }, { 1, 32, 7 } }); + session, imageId.WithIndexOffset(0), { 28, 0, height }, { { 27, 0, height + 2 }, { 1, 32, 7 } }); if (!(drawnCorners & FOOTPATH_CORNER_0)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 27, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_3)) { @@ -549,17 +545,17 @@ static void PathPaintFencesAndQueueBannersNonQueue( if (!(drawnCorners & FOOTPATH_CORNER_0)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(11), { 0, 0, height }, { { 0, 27, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_1)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 28, 28, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(12), { 0, 0, height }, { { 27, 27, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_2)) { PaintAddImageAsParent( - session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 28, 0, height + 2 }, { 4, 4, 7 } }); + session, imageId.WithIndexOffset(13), { 0, 0, height }, { { 27, 0, height + 2 }, { 4, 4, 7 } }); } if (!(drawnCorners & FOOTPATH_CORNER_3)) { @@ -927,9 +923,7 @@ static void PathPaintSegmentSupportHeight( { PaintUtilSetSegmentSupportHeight( session, - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), 0xFFFF, 0); return; } @@ -938,22 +932,22 @@ static void PathPaintSegmentSupportHeight( if (edges & EDGE_NE) { - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::topRightSide), 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::topRight), 0xFFFF, 0); } if (edges & EDGE_SE) { - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottomRightSide), 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottomRight), 0xFFFF, 0); } if (edges & EDGE_SW) { - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottomLeftSide), 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottomLeft), 0xFFFF, 0); } if (edges & EDGE_NW) { - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::topLeftSide), 0xFFFF, 0); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::topLeft), 0xFFFF, 0); } } diff --git a/src/openrct2/paint/tile_element/Paint.PathAddition.cpp b/src/openrct2/paint/tile_element/Paint.PathAddition.cpp index 943e3c66ca..b304efe431 100644 --- a/src/openrct2/paint/tile_element/Paint.PathAddition.cpp +++ b/src/openrct2/paint/tile_element/Paint.PathAddition.cpp @@ -78,25 +78,25 @@ static void PathAdditionLightsPaint( { auto imageIndex = GetFootpathLampImage(pathAdditionEntry, EDGE_NE, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 2, 16, height }, { { 6, 8, height + 2 }, { 0, 16, 23 } }); + session, imageTemplate.WithIndex(imageIndex), { 2, 16, height }, { { 3, 8, height + 2 }, { 0, 16, 23 } }); } if (edges & EDGE_SE) { auto imageIndex = GetFootpathLampImage(pathAdditionEntry, EDGE_SE, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 16, 30, height }, { { 8, 23, height + 2 }, { 16, 0, 23 } }); + session, imageTemplate.WithIndex(imageIndex), { 16, 30, height }, { { 2, 29, height + 2 }, { 22, 0, 23 } }); } if (edges & EDGE_SW) { auto imageIndex = GetFootpathLampImage(pathAdditionEntry, EDGE_SW, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 30, 16, height }, { { 23, 8, height + 2 }, { 0, 16, 23 } }); + session, imageTemplate.WithIndex(imageIndex), { 30, 16, height }, { { 29, 2, height + 2 }, { 0, 22, 23 } }); } if (edges & EDGE_NW) { auto imageIndex = GetFootpathLampImage(pathAdditionEntry, EDGE_NW, isBroken); PaintAddImageAsParent( - session, imageTemplate.WithIndex(imageIndex), { 16, 2, height }, { { 8, 6, height + 2 }, { 16, 0, 23 } }); + session, imageTemplate.WithIndex(imageIndex), { 16, 2, height }, { { 8, 3, height + 2 }, { 16, 0, 23 } }); } } diff --git a/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp b/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp index 065a5c8c2f..7f750fd5fd 100644 --- a/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.SmallScenery.cpp @@ -91,7 +91,7 @@ static void SetSupportHeights( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), height, 0x20); } } @@ -108,8 +108,7 @@ static void SetSupportHeights( auto direction = (sceneryElement.GetSceneryQuadrant() + session.CurrentRotation) % 4; PaintUtilSetSegmentSupportHeight( session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + PaintUtilRotateSegments(EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); } } @@ -219,7 +218,7 @@ static void PaintSmallSceneryBody( if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_ANIMATED)) { - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_VISIBLE_WHEN_ZOOMED) || (session.DPI.zoom_level <= ZoomLevel{ 1 })) { diff --git a/src/openrct2/paint/tile_element/Paint.Surface.cpp b/src/openrct2/paint/tile_element/Paint.Surface.cpp index d950e82dbc..87173bc0c9 100644 --- a/src/openrct2/paint/tile_element/Paint.Surface.cpp +++ b/src/openrct2/paint/tile_element/Paint.Surface.cpp @@ -312,7 +312,7 @@ static bool SurfaceShouldSmoothSelf(const TerrainSurfaceObject* surfaceObject) if (surfaceObject == nullptr) return false; - return surfaceObject->Flags & TERRAIN_SURFACE_FLAGS::SMOOTH_WITH_SELF; + return surfaceObject->Flags & TerrainSurfaceFlags::smoothWithSelf; } static bool SurfaceShouldSmooth(const TerrainSurfaceObject* surfaceObject) @@ -320,7 +320,7 @@ static bool SurfaceShouldSmooth(const TerrainSurfaceObject* surfaceObject) if (surfaceObject == nullptr) return false; - return surfaceObject->Flags & TERRAIN_SURFACE_FLAGS::SMOOTH_WITH_OTHER; + return surfaceObject->Flags & TerrainSurfaceFlags::smoothWithOther; } static ImageId GetEdgeImageWithOffset(const TerrainEdgeObject* edgeObject, uint32_t offset) @@ -573,6 +573,9 @@ static void ViewportSurfaceDrawTileSideBottom( return; } + neighbourCornerHeight1 = std::max(cornerHeight1, neighbourCornerHeight1); + neighbourCornerHeight2 = std::max(cornerHeight2, neighbourCornerHeight2); + cornerHeight1 = height; cornerHeight2 = height; } @@ -763,6 +766,9 @@ static void ViewportSurfaceDrawTileSideTop( return; } + neighbourCornerHeight1 = std::max(cornerHeight1, neighbourCornerHeight1); + neighbourCornerHeight2 = std::max(cornerHeight2, neighbourCornerHeight2); + cornerHeight1 = height; cornerHeight2 = height; } @@ -782,6 +788,9 @@ static void ViewportSurfaceDrawTileSideTop( baseImageId = GetEdgeImage(edgeObject, 1); // var_04 } baseImageId = baseImageId.WithIndexOffset(edge == EDGE_TOPLEFT ? 5 : 0); + + offset.x = 0; + offset.y = 0; } else { @@ -817,12 +826,6 @@ static void ViewportSurfaceDrawTileSideTop( neighbourCornerHeight1 = cornerHeight2; - if (isWater) - { - offset.x = 0; - offset.y = 0; - } - while (cur_height < cornerHeight1 && cur_height < neighbourCornerHeight1) { PaintAddImageAsParent(session, baseImageId, { offset, cur_height * kCoordsZPerTinyZ }, { bounds, 15 }); @@ -1091,7 +1094,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con const uint8_t image_offset = Byte97B444[surfaceShape]; ImageId imageId; - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (isInTrackDesignerOrManager()) { imageId = ImageId(SPR_TERRAIN_TRACK_DESIGNER); } @@ -1123,13 +1126,13 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con PaintPatrolArea(session, tileElement, height, surfaceShape); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Draw Peep Spawns - if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || gameState.Cheats.sandboxMode) + if ((gLegacyScene == LegacyScene::scenarioEditor || gameState.cheats.sandboxMode) && session.ViewFlags & VIEWPORT_FLAG_LAND_OWNERSHIP) { const CoordsXY& pos = session.MapPosition; - for (auto& spawn : gameState.PeepSpawns) + for (auto& spawn : gameState.peepSpawns) { if ((spawn.x & 0xFFE0) == pos.x && (spawn.y & 0xFFE0) == pos.y) { @@ -1274,7 +1277,7 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con } if ((session.ViewFlags & VIEWPORT_FLAG_UNDERGROUND_INSIDE) && !(session.ViewFlags & VIEWPORT_FLAG_HIDE_BASE) - && !(gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER))) + && !(isInTrackDesignerOrManager())) { const uint8_t image_offset = Byte97B444[surfaceShape]; ImageId imageId; @@ -1416,13 +1419,12 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con // 1B 1B // 1B PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), height, - 0); + session, EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), height, 0); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::rightCorner), height, 1); + session, EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::right), height, 1); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), height + 6, 0x1B); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottomCorner), height + 6 + 6, 0x1B); + session, EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottomRight), height + 6, 0x1B); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottom), height + 6 + 6, 0x1B); PaintUtilForceSetGeneralSupportHeight(session, height, 1); break; @@ -1434,13 +1436,12 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con // 17 00 // 02 PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - height, 0); + session, EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), height, 0); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::centre, PaintSegment::bottomCorner), height, 2); + session, EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::bottom), height, 2); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), height + 6, 0x17); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::leftCorner), height + 6 + 6, 0x17); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::bottomLeft), height + 6, 0x17); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::left), height + 6 + 6, 0x17); PaintUtilForceSetGeneralSupportHeight(session, height, 2); break; @@ -1452,14 +1453,13 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con // 03 03 // 03 PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner), - height + 2, 3); + session, EnumsToFlags(PaintSegment::top, PaintSegment::topRight, PaintSegment::right), height + 2, 3); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), - height + 2 + 6, 3); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomRight), height + 2 + 6, + 3); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner), - height + 2 + 6 + 6, 3); + session, EnumsToFlags(PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom), height + 2 + 6 + 6, + 3); PaintUtilForceSetGeneralSupportHeight(session, height, 3); break; @@ -1471,13 +1471,12 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con // 00 00 // 00 PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::bottomCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - height, 0); + session, EnumsToFlags(PaintSegment::bottom, PaintSegment::bottomLeft, PaintSegment::bottomRight), height, 0); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::rightCorner), height, 4); + session, EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::right), height, 4); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::topRightSide), height + 6, 0x1E); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::topCorner), height + 6 + 6, 0x1E); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::topRight), height + 6, 0x1E); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::top), height + 6 + 6, 0x1E); PaintUtilForceSetGeneralSupportHeight(session, height, 4); break; @@ -1488,14 +1487,14 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con // 05 05 05 ░░ ░░ ░░ // 1B 1B ▒▒ ▒▒ // 1B ▓▓ - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::topCorner), height + 6 + 6, 0x1E); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::top), height + 6 + 6, 0x1E); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::topRightSide), height + 6, 0x1E); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::topRight), height + 6, 0x1E); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::rightCorner), height, 5); + session, EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::right), height, 5); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), height + 6, 0x1B); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottomCorner), height + 6 + 6, 0x1B); + session, EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottomRight), height + 6, 0x1B); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottom), height + 6 + 6, 0x1B); PaintUtilForceSetGeneralSupportHeight(session, height, 5); break; @@ -1507,14 +1506,12 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con // 06 06 ▒▒ ░░ // 06 ░░ PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::rightCorner, PaintSegment::bottomRightSide, PaintSegment::bottomCorner), - height + 2, 6); + session, EnumsToFlags(PaintSegment::right, PaintSegment::bottomRight, PaintSegment::bottom), height + 2, 6); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), - height + 2 + 6, 6); + session, EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), height + 2 + 6, + 6); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner), - height + 2 + 6 + 6, 6); + session, EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::top), height + 2 + 6 + 6, 6); PaintUtilForceSetGeneralSupportHeight(session, height, 6); break; @@ -1525,28 +1522,26 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con // 00 07 17 ▓▓ ▓▓ ░░ // 00 17 ▓▓ ▒▒ // 07 ▓▓ - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::rightCorner), height + 4, 0x17); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::right), height + 4, 0x17); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topRightSide, PaintSegment::bottomRightSide), height + 4 + 6, 0x17); + session, EnumsToFlags(PaintSegment::topRight, PaintSegment::bottomRight), height + 4 + 6, 0x17); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::centre, PaintSegment::bottomCorner), - height + 4 + 6 + 6, 7); + session, EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::bottom), height + 4 + 6 + 6, 7); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::leftCorner), - height + 4 + 6 + 6, 0); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::left), height + 4 + 6 + 6, + 0); PaintUtilForceSetGeneralSupportHeight(session, height, 7); break; case 8: // Loc6620D8 PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), - height, 0); + session, EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft), height, 0); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::centre, PaintSegment::bottomCorner), height, 8); + session, EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::bottom), height, 8); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topRightSide, PaintSegment::bottomRightSide), height + 6, 0x1D); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::rightCorner), height + 6 + 6, 0x1D); + session, EnumsToFlags(PaintSegment::topRight, PaintSegment::bottomRight), height + 6, 0x1D); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::right), height + 6 + 6, 0x1D); PaintUtilForceSetGeneralSupportHeight(session, height, 8); break; @@ -1554,40 +1549,38 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con // Loc66216D PaintUtilForceSetGeneralSupportHeight(session, height, 9); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner), height + 2, + session, EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::left), height + 2, 9); + PaintUtilSetSegmentSupportHeight( + session, EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), height + 2 + 6, 9); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), - height + 2 + 6, 9); - PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), - height + 2 + 6 + 6, 9); + session, EnumsToFlags(PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right), height + 2 + 6 + 6, + 9); break; case 10: // Loc662206 PaintUtilForceSetGeneralSupportHeight(session, height, 0xA); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::leftCorner), height + 6 + 6, 0x17); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::left), height + 6 + 6, 0x17); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), height + 6, 0x17); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::bottomLeft), height + 6, 0x17); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::centre, PaintSegment::bottomCorner), height, 0xA); + session, EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::bottom), height, 0xA); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topRightSide, PaintSegment::bottomRightSide), height + 6, 0x1D); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::rightCorner), height + 6 + 6, 0x1D); + session, EnumsToFlags(PaintSegment::topRight, PaintSegment::bottomRight), height + 6, 0x1D); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::right), height + 6 + 6, 0x1D); break; case 11: // Loc66229B PaintUtilForceSetGeneralSupportHeight(session, height, 0xB); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::topCorner), height + 4, 0x1B); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::top), height + 4, 0x1B); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::topRightSide), height + 4 + 6, 0x1B); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::topRight), height + 4 + 6, 0x1B); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::rightCorner), - height + 4 + 6 + 6, 0xB); + session, EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::right), height + 4 + 6 + 6, 0xB); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide, PaintSegment::bottomCorner), + session, EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottomRight, PaintSegment::bottom), height + 4 + 6 + 6, 0); break; @@ -1595,99 +1588,89 @@ void PaintSurface(PaintSession& session, uint8_t direction, uint16_t height, con // Loc662334 PaintUtilForceSetGeneralSupportHeight(session, height, 0xC); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner), - height + 2, 0xC); + session, EnumsToFlags(PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom), height + 2, 0xC); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), - height + 2 + 6, 0xC); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomRight), height + 2 + 6, + 0xC); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner), - height + 2 + 6 + 6, 0xC); + session, EnumsToFlags(PaintSegment::top, PaintSegment::topRight, PaintSegment::right), height + 2 + 6 + 6, 0xC); break; case 13: // Loc6623CD PaintUtilForceSetGeneralSupportHeight(session, height, 0xD); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::leftCorner), height + 4, 0x1D); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::left), height + 4, 0x1D); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), height + 4 + 6, 0x1D); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::bottomLeft), height + 4 + 6, 0x1D); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::centre, PaintSegment::bottomCorner), - height + 4 + 6 + 6, 0xD); + session, EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::bottom), height + 4 + 6 + 6, 0xD); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + session, EnumsToFlags(PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), height + 4 + 6 + 6, 0); break; case 14: // Loc662466 PaintUtilForceSetGeneralSupportHeight(session, height, 0xE); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottomCorner), height + 4, 0x1E); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottom), height + 4, 0x1E); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), height + 4 + 6, 0x1E); + session, EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottomRight), height + 4 + 6, 0x1E); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::rightCorner), - height + 4 + 6 + 6, 0xE); + session, EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::right), height + 4 + 6 + 6, 0xE); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::topCorner), - height + 4 + 6 + 6, 0); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::top), height + 4 + 6 + 6, 0); break; case 23: // Loc6624FF PaintUtilForceSetGeneralSupportHeight(session, height, 0x17); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::rightCorner), height + 4, 0x17); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::right), height + 4, 0x17); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topRightSide, PaintSegment::bottomRightSide), height + 4 + 6, 0x17); + session, EnumsToFlags(PaintSegment::topRight, PaintSegment::bottomRight), height + 4 + 6, 0x17); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::centre, PaintSegment::bottomCorner), - height + 4 + 6 + 6, 0x17); + session, EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::bottom), height + 4 + 6 + 6, 0x17); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), height + 4 + 6 + 6 + 6, 0x17); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::leftCorner), height + 4 + 6 + 6 + 6 + 6, 0x17); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::bottomLeft), height + 4 + 6 + 6 + 6, 0x17); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::left), height + 4 + 6 + 6 + 6 + 6, 0x17); break; case 27: // Loc6625A0 PaintUtilForceSetGeneralSupportHeight(session, height, 0x1B); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::topCorner), height + 4, 0x1B); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::top), height + 4, 0x1B); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::topRightSide), height + 4 + 6, 0x1B); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::topRight), height + 4 + 6, 0x1B); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::rightCorner), - height + 4 + 6 + 6, 0x1B); + session, EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::right), height + 4 + 6 + 6, 0x1B); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), height + 4 + 6 + 6 + 6, - 0x1B); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottomCorner), height + 4 + 6 + 6 + 6 + 6, 0x1B); + session, EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottomRight), height + 4 + 6 + 6 + 6, 0x1B); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottom), height + 4 + 6 + 6 + 6 + 6, 0x1B); break; case 29: // Loc662641 PaintUtilForceSetGeneralSupportHeight(session, height, 0x1D); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::leftCorner), height + 4, 0x1D); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::left), height + 4, 0x1D); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), height + 4 + 6, 0x1D); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::bottomLeft), height + 4 + 6, 0x1D); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topCorner, PaintSegment::centre, PaintSegment::bottomCorner), - height + 4 + 6 + 6, 0x1D); + session, EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::bottom), height + 4 + 6 + 6, 0x1D); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topRightSide, PaintSegment::bottomRightSide), height + 4 + 6 + 6 + 6, 0x1D); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::rightCorner), height + 4 + 6 + 6 + 6 + 6, 0x1D); + session, EnumsToFlags(PaintSegment::topRight, PaintSegment::bottomRight), height + 4 + 6 + 6 + 6, 0x1D); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::right), height + 4 + 6 + 6 + 6 + 6, 0x1D); break; case 30: // Loc6626E2 PaintUtilForceSetGeneralSupportHeight(session, height, 0x1E); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottomCorner), height + 4, 0x1E); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::bottom), height + 4, 0x1E); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), height + 4 + 6, 0x1E); + session, EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottomRight), height + 4 + 6, 0x1E); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::rightCorner), - height + 4 + 6 + 6, 0x1E); + session, EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::right), height + 4 + 6 + 6, 0x1E); PaintUtilSetSegmentSupportHeight( - session, EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::topRightSide), height + 4 + 6 + 6 + 6, 0x1E); - PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::topCorner), height + 4 + 6 + 6 + 6 + 6, 0x1E); + session, EnumsToFlags(PaintSegment::topLeft, PaintSegment::topRight), height + 4 + 6 + 6 + 6, 0x1E); + PaintUtilSetSegmentSupportHeight(session, EnumToFlag(PaintSegment::top), height + 4 + 6 + 6 + 6 + 6, 0x1E); break; } } diff --git a/src/openrct2/paint/tile_element/Paint.TileElement.cpp b/src/openrct2/paint/tile_element/Paint.TileElement.cpp index 60cf265456..cfee1fe9f1 100644 --- a/src/openrct2/paint/tile_element/Paint.TileElement.cpp +++ b/src/openrct2/paint/tile_element/Paint.TileElement.cpp @@ -360,9 +360,9 @@ void PaintUtilForceSetGeneralSupportHeight(PaintSession& session, int16_t height } const uint16_t kSegmentOffsets[9] = { - EnumToFlag(PaintSegment::topCorner), EnumToFlag(PaintSegment::leftCorner), EnumToFlag(PaintSegment::rightCorner), - EnumToFlag(PaintSegment::bottomCorner), EnumToFlag(PaintSegment::centre), EnumToFlag(PaintSegment::topLeftSide), - EnumToFlag(PaintSegment::topRightSide), EnumToFlag(PaintSegment::bottomLeftSide), EnumToFlag(PaintSegment::bottomRightSide), + EnumToFlag(PaintSegment::top), EnumToFlag(PaintSegment::left), EnumToFlag(PaintSegment::right), + EnumToFlag(PaintSegment::bottom), EnumToFlag(PaintSegment::centre), EnumToFlag(PaintSegment::topLeft), + EnumToFlag(PaintSegment::topRight), EnumToFlag(PaintSegment::bottomLeft), EnumToFlag(PaintSegment::bottomRight), }; void PaintUtilSetSegmentSupportHeight(PaintSession& session, int32_t segments, uint16_t height, uint8_t slope) diff --git a/src/openrct2/paint/tile_element/Paint.Wall.cpp b/src/openrct2/paint/tile_element/Paint.Wall.cpp index b57a2ae3ec..dcdd5a8e07 100644 --- a/src/openrct2/paint/tile_element/Paint.Wall.cpp +++ b/src/openrct2/paint/tile_element/Paint.Wall.cpp @@ -139,7 +139,7 @@ static void PaintWallWall( { PROFILED_FUNCTION(); - auto frameNum = (wallEntry.flags2 & WALL_SCENERY_2_ANIMATED) ? (GetGameState().CurrentTicks & 7) * 2 : 0; + auto frameNum = (wallEntry.flags2 & WALL_SCENERY_2_ANIMATED) ? (getGameState().currentTicks & 7) * 2 : 0; auto imageIndex = wallEntry.image + imageOffset + frameNum; PaintAddImageAsParent(session, imageTemplate.WithIndex(imageIndex), offset, boundBox); if ((wallEntry.flags & WALL_SCENERY_HAS_GLASS) && !isGhost) @@ -186,7 +186,7 @@ static void PaintWallScrollingText( } auto stringWidth = GfxGetStringWidth(signString, FontStyle::Tiny); - auto scroll = stringWidth > 0 ? (GetGameState().CurrentTicks / 2) % stringWidth : 0; + auto scroll = stringWidth > 0 ? (getGameState().currentTicks / 2) % stringWidth : 0; auto imageId = ScrollingTextSetup(session, STR_SCROLLING_SIGN_TEXT, ft, scroll, scrollingMode, textPaletteIndex); PaintAddImageAsChild(session, imageId, { 0, 0, height + 8 }, { boundsOffset, { 1, 1, 13 } }); } diff --git a/src/openrct2/paint/tile_element/Segment.h b/src/openrct2/paint/tile_element/Segment.h index 70e687d3ab..1d7c9b8a2e 100644 --- a/src/openrct2/paint/tile_element/Segment.h +++ b/src/openrct2/paint/tile_element/Segment.h @@ -14,20 +14,19 @@ #include // This controls in which segment of a tile something is drawn. -// This is from a screen perspective, e.g. topCorner will always represent the part of top of the screen. +// This is from a screen perspective, e.g. top will always represent the part of top of the screen. enum class PaintSegment : uint16_t { - topCorner = 0, - topRightSide = 1, - rightCorner = 2, - bottomRightSide = 3, - bottomCorner = 4, - bottomLeftSide = 5, - leftCorner = 6, - topLeftSide = 7, + top = 0, + topRight = 1, + right = 2, + bottomRight = 3, + bottom = 4, + bottomLeft = 5, + left = 6, + topLeft = 7, centre = 8, }; constexpr int32_t kSegmentsAll = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide); + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight); diff --git a/src/openrct2/paint/track/Segment.h b/src/openrct2/paint/track/Segment.h index b9e6213859..87a05b0907 100644 --- a/src/openrct2/paint/track/Segment.h +++ b/src/openrct2/paint/track/Segment.h @@ -15,14 +15,11 @@ namespace OpenRCT2::BlockedSegments { - constexpr uint16_t kStraightFlat = EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide); + constexpr uint16_t kStraightFlat = EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft); constexpr uint16_t kDiagStraightFlat[] = { - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), - EnumsToFlags(PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::topLeftSide, PaintSegment::topCorner), - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, PaintSegment::bottomRightSide), - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::leftCorner, PaintSegment::topLeftSide), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::topLeft, PaintSegment::top), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::left, PaintSegment::topLeft), }; } // namespace OpenRCT2::BlockedSegments diff --git a/src/openrct2/paint/track/coaster/AirPoweredVerticalCoaster.cpp b/src/openrct2/paint/track/coaster/AirPoweredVerticalCoaster.cpp index daee9c1298..eb74e1e168 100644 --- a/src/openrct2/paint/track/coaster/AirPoweredVerticalCoaster.cpp +++ b/src/openrct2/paint/track/coaster/AirPoweredVerticalCoaster.cpp @@ -201,24 +201,20 @@ static void AirPoweredVerticalRCTrackStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][2] = { - { SPR_AIR_POWERED_VERTICAL_RC_STATION_SW_NE, SPR_STATION_BASE_B_SW_NE }, - { SPR_AIR_POWERED_VERTICAL_RC_STATION_NW_SE, SPR_STATION_BASE_B_NW_SE }, - { SPR_AIR_POWERED_VERTICAL_RC_STATION_SW_NE, SPR_STATION_BASE_B_SW_NE }, - { SPR_AIR_POWERED_VERTICAL_RC_STATION_NW_SE, SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + SPR_AIR_POWERED_VERTICAL_RC_STATION_SW_NE, + SPR_AIR_POWERED_VERTICAL_RC_STATION_NW_SE, + SPR_AIR_POWERED_VERTICAL_RC_STATION_SW_NE, + SPR_AIR_POWERED_VERTICAL_RC_STATION_NW_SE, }; - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), - { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsChildRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 6, height }, { 32, 20, 1 } }); + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, + { { 0, 6, height + 1 }, { 32, 20, 1 } }); DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); - TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 5, trackElement); + TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 5, trackElement, StationBaseType::b, -2); TrackPaintUtilDrawStationTunnel(session, direction, height); @@ -275,7 +271,7 @@ static void AirPoweredVerticalRCTrackRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; case 2: @@ -283,8 +279,8 @@ static void AirPoweredVerticalRCTrackRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -293,9 +289,8 @@ static void AirPoweredVerticalRCTrackRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre, - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre, + PaintSegment::left, PaintSegment::right, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -303,7 +298,7 @@ static void AirPoweredVerticalRCTrackRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; case 5: @@ -311,8 +306,8 @@ static void AirPoweredVerticalRCTrackRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -471,7 +466,7 @@ static void AirPoweredVerticalRCTrackBankedRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; case 2: @@ -479,8 +474,8 @@ static void AirPoweredVerticalRCTrackBankedRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -489,9 +484,8 @@ static void AirPoweredVerticalRCTrackBankedRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre, - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre, + PaintSegment::left, PaintSegment::right, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -499,7 +493,7 @@ static void AirPoweredVerticalRCTrackBankedRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; case 5: @@ -507,8 +501,8 @@ static void AirPoweredVerticalRCTrackBankedRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; diff --git a/src/openrct2/paint/track/coaster/AlpineCoaster.cpp b/src/openrct2/paint/track/coaster/AlpineCoaster.cpp index d1aa06c560..2600471060 100644 --- a/src/openrct2/paint/track/coaster/AlpineCoaster.cpp +++ b/src/openrct2/paint/track/coaster/AlpineCoaster.cpp @@ -114,11 +114,15 @@ namespace OpenRCT2::AlpineRC session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][2]), - { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 4, 7); + if (TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::b, -2, 4, 7)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -421,9 +425,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -458,9 +460,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -505,8 +505,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -561,9 +560,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -599,8 +596,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -633,8 +630,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -670,8 +666,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -716,8 +712,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -801,8 +796,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -835,8 +830,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -845,9 +840,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -884,8 +877,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -961,8 +954,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -995,8 +988,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1006,8 +999,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1043,8 +1035,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1117,8 +1109,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1150,9 +1141,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1185,8 +1174,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1220,9 +1208,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1264,8 +1250,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1297,9 +1282,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1332,8 +1315,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1367,9 +1349,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1411,8 +1391,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1444,9 +1423,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1479,8 +1456,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1518,9 +1494,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1562,8 +1536,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1595,9 +1568,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1630,8 +1601,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1665,9 +1635,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1709,8 +1677,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1741,9 +1708,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -1775,8 +1740,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1809,9 +1773,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -1854,8 +1816,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1887,9 +1848,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1922,8 +1881,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1957,9 +1915,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2366,8 +2322,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2389,9 +2344,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2410,8 +2363,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2431,9 +2383,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2461,8 +2411,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2480,9 +2429,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2505,8 +2452,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2526,9 +2472,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2556,8 +2500,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2579,9 +2522,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2600,8 +2541,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2621,9 +2561,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2651,8 +2589,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2670,9 +2607,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2695,8 +2630,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2716,9 +2650,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2746,8 +2678,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2769,9 +2700,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2790,8 +2719,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2811,9 +2739,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2841,8 +2767,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2860,9 +2785,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2885,8 +2808,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2906,9 +2828,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2936,8 +2856,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2959,9 +2878,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2980,8 +2897,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3001,9 +2917,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3031,8 +2945,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3050,9 +2963,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3075,8 +2986,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3096,9 +3006,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3126,8 +3034,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -3148,9 +3055,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -3168,8 +3073,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -3188,9 +3092,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -3219,8 +3121,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -3237,9 +3138,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -3261,8 +3160,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -3281,9 +3179,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -3312,8 +3208,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3335,9 +3230,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3356,8 +3249,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3377,9 +3269,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3407,8 +3297,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3426,9 +3315,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3451,8 +3338,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3472,9 +3358,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3502,8 +3386,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3521,9 +3404,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3542,8 +3423,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3563,9 +3443,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3593,8 +3471,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3612,9 +3489,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3633,8 +3508,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3654,9 +3528,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3706,9 +3578,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3743,9 +3613,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3793,8 +3661,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3852,9 +3719,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3890,8 +3755,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3924,8 +3789,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3961,8 +3825,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4010,8 +3874,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4095,8 +3958,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4129,8 +3992,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4139,9 +4002,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4177,8 +4038,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4254,8 +4115,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4288,8 +4149,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4299,8 +4160,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4336,8 +4196,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4400,9 +4260,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4453,8 +4311,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4502,8 +4359,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4554,8 +4410,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4618,9 +4473,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4656,8 +4509,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4690,8 +4543,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4727,8 +4579,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4773,8 +4625,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4822,8 +4673,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4859,8 +4709,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4892,9 +4742,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4930,8 +4778,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4976,8 +4824,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5039,9 +4886,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5076,8 +4921,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5112,8 +4957,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5156,8 +5001,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5204,8 +5048,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5239,8 +5082,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5274,8 +5117,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5318,8 +5161,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5370,8 +5212,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5406,9 +5248,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5456,8 +5296,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5505,8 +5345,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5542,8 +5382,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5585,8 +5424,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5637,8 +5476,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5674,8 +5513,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5723,8 +5561,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5772,8 +5610,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5808,9 +5646,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5852,8 +5688,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5930,8 +5766,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5967,8 +5803,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6001,8 +5837,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6038,8 +5873,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6087,8 +5922,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6136,8 +5971,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6173,8 +6008,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6206,9 +6041,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6244,8 +6077,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6287,8 +6120,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6338,8 +6171,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6375,8 +6208,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6408,9 +6241,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6446,8 +6277,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6495,8 +6326,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6544,8 +6375,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6581,8 +6412,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6615,8 +6446,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6652,8 +6482,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6696,8 +6526,8 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6803,9 +6633,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -6856,8 +6684,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -6908,8 +6735,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -6960,8 +6786,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7008,9 +6833,7 @@ namespace OpenRCT2::AlpineRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7064,8 +6887,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7113,8 +6935,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7168,8 +6989,7 @@ namespace OpenRCT2::AlpineRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); diff --git a/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp b/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp index 5d487bdf60..58a2fe2571 100644 --- a/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp +++ b/src/openrct2/paint/track/coaster/BobsleighCoaster.cpp @@ -108,21 +108,24 @@ static void BobsleighRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][2] = { - { 14580, SPR_STATION_BASE_B_SW_NE }, - { 14581, SPR_STATION_BASE_B_NW_SE }, - { 14580, SPR_STATION_BASE_B_SW_NE }, - { 14581, SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + 14580, + 14581, + 14580, + 14581, }; - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, 0)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -506,9 +509,7 @@ static void BobsleighRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -556,8 +557,8 @@ static void BobsleighRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -601,9 +602,7 @@ static void BobsleighRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -651,8 +650,8 @@ static void BobsleighRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -706,9 +705,7 @@ static void BobsleighRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -972,9 +969,7 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1022,8 +1017,8 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1067,9 +1062,7 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1117,8 +1110,8 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1172,9 +1165,7 @@ static void BobsleighRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1556,9 +1547,7 @@ static void BobsleighRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1604,8 +1593,8 @@ static void BobsleighRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1651,8 +1640,8 @@ static void BobsleighRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1706,9 +1695,7 @@ static void BobsleighRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1767,9 +1754,7 @@ static void BobsleighRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1815,8 +1800,8 @@ static void BobsleighRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1862,8 +1847,8 @@ static void BobsleighRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1917,9 +1902,7 @@ static void BobsleighRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1978,9 +1961,7 @@ static void BobsleighRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2027,9 +2008,7 @@ static void BobsleighRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2083,9 +2062,7 @@ static void BobsleighRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2153,9 +2130,7 @@ static void BobsleighRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2202,9 +2177,7 @@ static void BobsleighRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2258,9 +2231,7 @@ static void BobsleighRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2329,8 +2300,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2377,9 +2348,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2434,8 +2403,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2490,8 +2459,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2539,8 +2508,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2590,8 +2558,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2651,8 +2619,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2700,8 +2668,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2756,8 +2723,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2812,8 +2779,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2860,9 +2827,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2912,8 +2877,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3003,8 +2968,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3052,8 +3017,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3097,9 +3062,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3147,8 +3110,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3203,8 +3166,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3259,8 +3222,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3308,8 +3271,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3353,8 +3316,7 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3402,8 +3364,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3453,8 +3415,8 @@ static void BobsleighRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3514,8 +3476,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3563,8 +3525,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3608,8 +3570,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3657,8 +3618,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3713,8 +3674,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3769,8 +3730,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3818,8 +3779,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3863,9 +3824,7 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3913,8 +3872,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3964,8 +3923,8 @@ static void BobsleighRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); diff --git a/src/openrct2/paint/track/coaster/ClassicStandUpRollerCoaster.cpp b/src/openrct2/paint/track/coaster/ClassicStandUpRollerCoaster.cpp index fb58869d42..3752000cc8 100644 --- a/src/openrct2/paint/track/coaster/ClassicStandUpRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/ClassicStandUpRollerCoaster.cpp @@ -245,9 +245,7 @@ static void classicStandUpRCTrackBankedRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -283,8 +281,8 @@ static void classicStandUpRCTrackBankedRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::right, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -316,8 +314,7 @@ static void classicStandUpRCTrackBankedRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -353,8 +350,8 @@ static void classicStandUpRCTrackBankedRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -380,9 +377,7 @@ static void classicStandUpRCTrackBankedRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -658,8 +653,8 @@ static void classicStandUpRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -692,8 +687,8 @@ static void classicStandUpRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -702,9 +697,7 @@ static void classicStandUpRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -740,8 +733,8 @@ static void classicStandUpRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -812,8 +805,8 @@ static void classicStandUpRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -846,8 +839,8 @@ static void classicStandUpRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -857,8 +850,7 @@ static void classicStandUpRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -894,8 +886,8 @@ static void classicStandUpRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -958,9 +950,7 @@ static void classicStandUpRCTrackRightBankedQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -990,8 +980,7 @@ static void classicStandUpRCTrackRightBankedQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1008,9 +997,7 @@ static void classicStandUpRCTrackRightBankedQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1160,9 +1147,7 @@ static void classicStandUpRCTrackDiagFlatTo25DegUpBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1178,8 +1163,7 @@ static void classicStandUpRCTrackDiagFlatTo25DegUpBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -1196,8 +1180,7 @@ static void classicStandUpRCTrackDiagFlatTo25DegUpBanked( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1216,9 +1199,7 @@ static void classicStandUpRCTrackDiagFlatTo25DegUpBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -1283,9 +1264,7 @@ static void classicStandUpRCTrackDiag25DegUpToFlatBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1301,8 +1280,7 @@ static void classicStandUpRCTrackDiag25DegUpToFlatBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -1319,8 +1297,7 @@ static void classicStandUpRCTrackDiag25DegUpToFlatBanked( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1339,9 +1316,7 @@ static void classicStandUpRCTrackDiag25DegUpToFlatBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; diff --git a/src/openrct2/paint/track/coaster/ClassicWoodenRollerCoaster.cpp b/src/openrct2/paint/track/coaster/ClassicWoodenRollerCoaster.cpp index 0327181daf..a5f3fe0bb8 100644 --- a/src/openrct2/paint/track/coaster/ClassicWoodenRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/ClassicWoodenRollerCoaster.cpp @@ -903,17 +903,17 @@ static void ClassicWoodenRCTrackBankedRightQuarterTurn5( static constexpr int blockedSegments[7] = { kSegmentsAll, - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), kSegmentsAll, }; @@ -1072,10 +1072,10 @@ static void ClassicWoodenRCTrackRightQuarterTurn3Bank( static constexpr int blockedSegments[4] = { kSegmentsAll, 0, - EnumsToFlags(PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), }; WoodenRCTrackPaintBb(session, &imageIds[direction][trackSequence][0], height); diff --git a/src/openrct2/paint/track/coaster/CompactInvertedCoaster.cpp b/src/openrct2/paint/track/coaster/CompactInvertedCoaster.cpp index 3ff899cc70..5cddd9b20e 100644 --- a/src/openrct2/paint/track/coaster/CompactInvertedCoaster.cpp +++ b/src/openrct2/paint/track/coaster/CompactInvertedCoaster.cpp @@ -112,24 +112,24 @@ static void CompactInvertedRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, - { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, + { 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, + { 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, + { 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, }; - + const bool stationDrawn = TrackPaintUtilDrawStationInverted( + session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height + 29 }, + session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); - PaintAddImageAsChildRotated( - session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, - { { 0, 6, height + 29 }, { 32, 20, 3 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); + if (stationDrawn) + { + PaintAddImageAsChildRotated( + session, direction, session.SupportColours.WithIndex(imageIds[direction][1]), { 0, 6, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } TrackPaintUtilDrawStationTunnelTall(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -755,8 +755,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -797,8 +797,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -829,9 +829,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -865,8 +863,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -900,8 +898,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -964,8 +962,8 @@ static void CompactInvertedRCTrackFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1011,8 +1009,8 @@ static void CompactInvertedRCTrackFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1058,8 +1056,8 @@ static void CompactInvertedRCTrackLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1105,8 +1103,8 @@ static void CompactInvertedRCTrackRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1155,8 +1153,8 @@ static void CompactInvertedRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1197,8 +1195,8 @@ static void CompactInvertedRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1229,9 +1227,7 @@ static void CompactInvertedRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1265,8 +1261,8 @@ static void CompactInvertedRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1300,8 +1296,8 @@ static void CompactInvertedRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1364,8 +1360,8 @@ static void CompactInvertedRCTrackLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1435,8 +1431,8 @@ static void CompactInvertedRCTrackRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1506,8 +1502,8 @@ static void CompactInvertedRCTrack25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1577,8 +1573,8 @@ static void CompactInvertedRCTrack25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1684,8 +1680,8 @@ static void CompactInvertedRCTrackLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1738,8 +1734,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1778,8 +1774,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -1807,9 +1803,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -1841,8 +1835,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -1872,8 +1866,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1925,8 +1919,8 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1965,8 +1959,8 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -1994,8 +1988,7 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -2027,8 +2020,8 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -2058,8 +2051,8 @@ static void CompactInvertedRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2134,9 +2127,7 @@ static void CompactInvertedRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2174,8 +2165,8 @@ static void CompactInvertedRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2209,8 +2200,8 @@ static void CompactInvertedRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2245,9 +2236,7 @@ static void CompactInvertedRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2301,9 +2290,7 @@ static void CompactInvertedRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2341,8 +2328,8 @@ static void CompactInvertedRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2376,8 +2363,8 @@ static void CompactInvertedRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2412,9 +2399,7 @@ static void CompactInvertedRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2469,9 +2454,8 @@ static void CompactInvertedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -2554,9 +2538,7 @@ static void CompactInvertedRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2589,8 +2571,8 @@ static void CompactInvertedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2629,8 +2611,8 @@ static void CompactInvertedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2662,9 +2644,7 @@ static void CompactInvertedRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2725,9 +2705,8 @@ static void CompactInvertedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -2800,9 +2779,8 @@ static void CompactInvertedRCTrackRightVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -2886,8 +2864,7 @@ static void CompactInvertedRCTrackRightVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2920,8 +2897,8 @@ static void CompactInvertedRCTrackRightVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2960,8 +2937,8 @@ static void CompactInvertedRCTrackRightVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2993,8 +2970,7 @@ static void CompactInvertedRCTrackRightVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -3055,9 +3031,8 @@ static void CompactInvertedRCTrackRightVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3130,8 +3105,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3172,9 +3147,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3208,8 +3181,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3275,8 +3248,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3318,9 +3291,7 @@ static void CompactInvertedRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3354,8 +3325,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3417,8 +3388,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3461,8 +3432,8 @@ static void CompactInvertedRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3514,8 +3485,8 @@ static void CompactInvertedRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3558,8 +3529,8 @@ static void CompactInvertedRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3631,8 +3602,8 @@ static void CompactInvertedRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3668,8 +3639,8 @@ static void CompactInvertedRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3708,8 +3679,8 @@ static void CompactInvertedRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3749,8 +3720,8 @@ static void CompactInvertedRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3786,8 +3757,8 @@ static void CompactInvertedRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3826,8 +3797,8 @@ static void CompactInvertedRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3871,8 +3842,8 @@ static void CompactInvertedRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3901,8 +3872,8 @@ static void CompactInvertedRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3932,8 +3903,8 @@ static void CompactInvertedRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3989,8 +3960,8 @@ static void CompactInvertedRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4019,8 +3990,8 @@ static void CompactInvertedRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4050,8 +4021,8 @@ static void CompactInvertedRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4186,8 +4157,8 @@ static void CompactInvertedRCTrackHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -4271,8 +4242,8 @@ static void CompactInvertedRCTrackLeftCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4350,8 +4321,8 @@ static void CompactInvertedRCTrackLeftCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4395,8 +4366,8 @@ static void CompactInvertedRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4474,8 +4445,8 @@ static void CompactInvertedRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4679,8 +4650,8 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4723,8 +4694,8 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4756,9 +4727,7 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4794,8 +4763,8 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4829,8 +4798,8 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4886,8 +4855,8 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4930,8 +4899,8 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4963,8 +4932,7 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5000,8 +4968,8 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5035,8 +5003,8 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -5092,8 +5060,8 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -5136,8 +5104,8 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5169,9 +5137,7 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5207,8 +5173,8 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5242,8 +5208,8 @@ static void CompactInvertedRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -5299,8 +5265,8 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -5343,8 +5309,8 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5376,8 +5342,7 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5413,8 +5378,8 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5448,8 +5413,8 @@ static void CompactInvertedRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -5878,8 +5843,8 @@ static void CompactInvertedRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5912,8 +5877,8 @@ static void CompactInvertedRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5922,9 +5887,7 @@ static void CompactInvertedRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5958,8 +5921,8 @@ static void CompactInvertedRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -6062,8 +6025,8 @@ static void CompactInvertedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6096,8 +6059,8 @@ static void CompactInvertedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6107,8 +6070,7 @@ static void CompactInvertedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6142,8 +6104,8 @@ static void CompactInvertedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -6231,8 +6193,7 @@ static void CompactInvertedRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -6272,8 +6233,8 @@ static void CompactInvertedRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6306,8 +6267,8 @@ static void CompactInvertedRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6316,9 +6277,7 @@ static void CompactInvertedRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6352,8 +6311,8 @@ static void CompactInvertedRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -6420,9 +6379,7 @@ static void CompactInvertedRCTrackRightEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -6462,8 +6419,8 @@ static void CompactInvertedRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6496,8 +6453,8 @@ static void CompactInvertedRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6507,8 +6464,7 @@ static void CompactInvertedRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6542,8 +6498,8 @@ static void CompactInvertedRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -6670,9 +6626,7 @@ static void CompactInvertedRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6703,8 +6657,7 @@ static void CompactInvertedRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6736,8 +6689,7 @@ static void CompactInvertedRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6769,9 +6721,7 @@ static void CompactInvertedRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6818,9 +6768,7 @@ static void CompactInvertedRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -6837,8 +6785,7 @@ static void CompactInvertedRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -6856,8 +6803,7 @@ static void CompactInvertedRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -6875,9 +6821,7 @@ static void CompactInvertedRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6942,9 +6886,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -6975,8 +6917,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7008,8 +6949,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7041,9 +6981,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7090,9 +7028,7 @@ static void CompactInvertedRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7109,8 +7045,7 @@ static void CompactInvertedRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7128,8 +7063,7 @@ static void CompactInvertedRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7147,9 +7081,7 @@ static void CompactInvertedRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7200,9 +7132,7 @@ static void CompactInvertedRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7219,8 +7149,7 @@ static void CompactInvertedRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7238,8 +7167,7 @@ static void CompactInvertedRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7257,9 +7185,7 @@ static void CompactInvertedRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7324,9 +7250,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7357,8 +7281,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7390,8 +7313,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7423,9 +7345,7 @@ static void CompactInvertedRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7486,9 +7406,7 @@ static void CompactInvertedRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7519,8 +7437,7 @@ static void CompactInvertedRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7552,8 +7469,7 @@ static void CompactInvertedRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7585,9 +7501,7 @@ static void CompactInvertedRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7634,9 +7548,7 @@ static void CompactInvertedRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -7653,8 +7565,7 @@ static void CompactInvertedRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -7672,8 +7583,7 @@ static void CompactInvertedRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -7691,9 +7601,7 @@ static void CompactInvertedRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7758,9 +7666,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7790,8 +7696,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -7822,8 +7727,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7854,9 +7758,7 @@ static void CompactInvertedRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7903,9 +7805,7 @@ static void CompactInvertedRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7922,8 +7822,7 @@ static void CompactInvertedRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7941,8 +7840,7 @@ static void CompactInvertedRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7960,9 +7858,7 @@ static void CompactInvertedRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8013,9 +7909,7 @@ static void CompactInvertedRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -8032,8 +7926,7 @@ static void CompactInvertedRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -8051,8 +7944,7 @@ static void CompactInvertedRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -8070,9 +7962,7 @@ static void CompactInvertedRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8137,9 +8027,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8170,8 +8058,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8203,8 +8090,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8236,9 +8122,7 @@ static void CompactInvertedRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8285,9 +8169,7 @@ static void CompactInvertedRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8304,8 +8186,7 @@ static void CompactInvertedRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8323,8 +8204,7 @@ static void CompactInvertedRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8343,8 +8223,8 @@ static void CompactInvertedRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8395,9 +8275,7 @@ static void CompactInvertedRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8414,8 +8292,7 @@ static void CompactInvertedRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8433,8 +8310,7 @@ static void CompactInvertedRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8453,8 +8329,8 @@ static void CompactInvertedRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8505,9 +8381,7 @@ static void CompactInvertedRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8524,8 +8398,7 @@ static void CompactInvertedRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8543,8 +8416,7 @@ static void CompactInvertedRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8563,8 +8435,8 @@ static void CompactInvertedRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8615,9 +8487,7 @@ static void CompactInvertedRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8634,8 +8504,7 @@ static void CompactInvertedRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8653,8 +8522,7 @@ static void CompactInvertedRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8673,8 +8541,8 @@ static void CompactInvertedRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8725,9 +8593,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8744,8 +8610,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8763,8 +8628,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8782,9 +8646,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8831,9 +8693,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8850,8 +8710,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8869,8 +8728,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8888,9 +8746,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8937,9 +8793,7 @@ static void CompactInvertedRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8956,8 +8810,7 @@ static void CompactInvertedRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8975,8 +8828,7 @@ static void CompactInvertedRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8994,9 +8846,7 @@ static void CompactInvertedRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9043,9 +8893,7 @@ static void CompactInvertedRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9062,8 +8910,7 @@ static void CompactInvertedRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9081,8 +8928,7 @@ static void CompactInvertedRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9100,9 +8946,7 @@ static void CompactInvertedRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9149,9 +8993,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9167,8 +9009,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -9185,8 +9026,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9203,9 +9043,7 @@ static void CompactInvertedRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9252,9 +9090,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9270,8 +9106,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -9288,8 +9123,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9306,9 +9140,7 @@ static void CompactInvertedRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9355,9 +9187,7 @@ static void CompactInvertedRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9374,8 +9204,7 @@ static void CompactInvertedRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9393,8 +9222,7 @@ static void CompactInvertedRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9412,9 +9240,7 @@ static void CompactInvertedRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9461,9 +9287,7 @@ static void CompactInvertedRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9480,8 +9304,7 @@ static void CompactInvertedRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9499,8 +9322,7 @@ static void CompactInvertedRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9518,9 +9340,7 @@ static void CompactInvertedRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9567,9 +9387,7 @@ static void CompactInvertedRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9586,8 +9404,7 @@ static void CompactInvertedRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9605,8 +9422,7 @@ static void CompactInvertedRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9625,8 +9441,8 @@ static void CompactInvertedRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9677,9 +9493,7 @@ static void CompactInvertedRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9696,8 +9510,7 @@ static void CompactInvertedRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9715,8 +9528,7 @@ static void CompactInvertedRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9735,8 +9547,8 @@ static void CompactInvertedRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) diff --git a/src/openrct2/paint/track/coaster/CorkscrewRollerCoaster.cpp b/src/openrct2/paint/track/coaster/CorkscrewRollerCoaster.cpp index 7956415b5c..75884e3395 100644 --- a/src/openrct2/paint/track/coaster/CorkscrewRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/CorkscrewRollerCoaster.cpp @@ -129,11 +129,11 @@ static void CorkscrewRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t kImageIds[4][2] = { - { 16236, SPR_STATION_BASE_A_SW_NE }, - { 16237, SPR_STATION_BASE_A_NW_SE }, - { 16236, SPR_STATION_BASE_A_SW_NE }, - { 16237, SPR_STATION_BASE_A_NW_SE }, + static constexpr ImageIndex kImageIds[4] = { + 16236, + 16237, + 16236, + 16237, }; if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -146,14 +146,18 @@ static void CorkscrewRCTrackStation( else { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(kImageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(kImageIds[direction]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(kImageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); + if (TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::a, 0, 9, 11)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -745,9 +749,7 @@ static void CorkscrewRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -783,8 +785,8 @@ static void CorkscrewRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -816,9 +818,7 @@ static void CorkscrewRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -854,8 +854,8 @@ static void CorkscrewRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -898,9 +898,7 @@ static void CorkscrewRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1136,9 +1134,7 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1174,8 +1170,8 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1207,9 +1203,7 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1245,8 +1239,8 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1292,9 +1286,7 @@ static void CorkscrewRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1634,9 +1626,7 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1670,8 +1660,8 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1702,9 +1692,7 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1738,8 +1726,8 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1782,9 +1770,7 @@ static void CorkscrewRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1832,9 +1818,7 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1868,8 +1852,8 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1900,8 +1884,7 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1935,8 +1918,8 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1979,9 +1962,7 @@ static void CorkscrewRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2048,9 +2029,7 @@ static void CorkscrewRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2082,8 +2061,8 @@ static void CorkscrewRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2115,8 +2094,8 @@ static void CorkscrewRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2158,9 +2137,7 @@ static void CorkscrewRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2207,9 +2184,7 @@ static void CorkscrewRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2241,8 +2216,8 @@ static void CorkscrewRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2274,8 +2249,8 @@ static void CorkscrewRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2317,9 +2292,7 @@ static void CorkscrewRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2370,8 +2343,8 @@ static void CorkscrewRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2408,8 +2381,8 @@ static void CorkscrewRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2441,9 +2414,7 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2472,8 +2443,8 @@ static void CorkscrewRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2508,8 +2479,8 @@ static void CorkscrewRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2541,9 +2512,7 @@ static void CorkscrewRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2580,8 +2549,8 @@ static void CorkscrewRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2627,8 +2596,8 @@ static void CorkscrewRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2911,9 +2880,7 @@ static void CorkscrewRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2948,9 +2915,7 @@ static void CorkscrewRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2993,9 +2958,7 @@ static void CorkscrewRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3055,9 +3018,7 @@ static void CorkscrewRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3092,9 +3053,7 @@ static void CorkscrewRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3140,9 +3099,7 @@ static void CorkscrewRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3195,9 +3152,7 @@ static void CorkscrewRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3242,9 +3197,7 @@ static void CorkscrewRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3288,9 +3241,7 @@ static void CorkscrewRCTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3341,9 +3292,7 @@ static void CorkscrewRCTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3468,8 +3417,8 @@ static void CorkscrewRCTrackHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -3609,8 +3558,8 @@ static void CorkscrewRCTrackLeftCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3671,8 +3620,8 @@ static void CorkscrewRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3733,8 +3682,8 @@ static void CorkscrewRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3814,8 +3763,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3850,9 +3799,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3899,8 +3846,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3947,8 +3894,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3984,8 +3931,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4027,8 +3973,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4080,8 +4026,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4117,8 +4063,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4165,8 +4110,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4213,8 +4158,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4249,9 +4194,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4293,8 +4236,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4376,8 +4319,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4413,8 +4356,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4446,9 +4389,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4484,8 +4425,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4532,8 +4473,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4580,8 +4521,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4617,8 +4558,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4650,8 +4591,7 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4687,8 +4627,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4730,8 +4670,8 @@ static void CorkscrewRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4783,8 +4723,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4820,8 +4760,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4853,8 +4793,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4890,8 +4829,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4938,8 +4877,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4986,8 +4925,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5023,8 +4962,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5056,9 +4995,7 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5094,8 +5031,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5137,8 +5074,8 @@ static void CorkscrewRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5746,8 +5683,8 @@ static void CorkscrewRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5780,8 +5717,8 @@ static void CorkscrewRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5790,9 +5727,7 @@ static void CorkscrewRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5833,8 +5768,8 @@ static void CorkscrewRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5911,8 +5846,8 @@ static void CorkscrewRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5945,8 +5880,8 @@ static void CorkscrewRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5956,8 +5891,7 @@ static void CorkscrewRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5998,8 +5932,8 @@ static void CorkscrewRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6094,8 +6028,8 @@ static void CorkscrewRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6128,8 +6062,8 @@ static void CorkscrewRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6138,9 +6072,7 @@ static void CorkscrewRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6181,8 +6113,8 @@ static void CorkscrewRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6259,8 +6191,8 @@ static void CorkscrewRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6293,8 +6225,8 @@ static void CorkscrewRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6304,8 +6236,7 @@ static void CorkscrewRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6346,8 +6277,8 @@ static void CorkscrewRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6458,9 +6389,7 @@ static void CorkscrewRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6491,8 +6420,7 @@ static void CorkscrewRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6524,8 +6452,7 @@ static void CorkscrewRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6584,9 +6511,7 @@ static void CorkscrewRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6627,9 +6552,7 @@ static void CorkscrewRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6660,8 +6583,7 @@ static void CorkscrewRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6693,8 +6615,7 @@ static void CorkscrewRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6753,9 +6674,7 @@ static void CorkscrewRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6796,9 +6715,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6829,8 +6746,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6862,8 +6778,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6922,9 +6837,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6965,9 +6878,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6998,8 +6909,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7031,8 +6941,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7091,9 +7000,7 @@ static void CorkscrewRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7134,9 +7041,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7167,8 +7072,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7200,8 +7104,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7260,9 +7163,7 @@ static void CorkscrewRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7303,9 +7204,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7336,8 +7235,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7369,8 +7267,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7429,9 +7326,7 @@ static void CorkscrewRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7472,9 +7367,7 @@ static void CorkscrewRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7505,8 +7398,7 @@ static void CorkscrewRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7538,8 +7430,7 @@ static void CorkscrewRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7598,9 +7489,7 @@ static void CorkscrewRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7641,9 +7530,7 @@ static void CorkscrewRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7674,8 +7561,7 @@ static void CorkscrewRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7707,8 +7593,7 @@ static void CorkscrewRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7767,9 +7652,7 @@ static void CorkscrewRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7810,9 +7693,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7842,8 +7723,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -7874,8 +7754,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7933,9 +7812,7 @@ static void CorkscrewRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -7977,9 +7854,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8010,8 +7885,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8043,8 +7917,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8103,9 +7976,7 @@ static void CorkscrewRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8146,9 +8017,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8179,8 +8048,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8212,8 +8080,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8272,9 +8139,7 @@ static void CorkscrewRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8315,9 +8180,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8348,8 +8211,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8381,8 +8243,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8441,9 +8302,7 @@ static void CorkscrewRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8470,9 +8329,7 @@ static void CorkscrewRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8492,8 +8349,7 @@ static void CorkscrewRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8511,8 +8367,7 @@ static void CorkscrewRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8543,9 +8398,7 @@ static void CorkscrewRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8572,9 +8425,7 @@ static void CorkscrewRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8591,8 +8442,7 @@ static void CorkscrewRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8613,8 +8463,7 @@ static void CorkscrewRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8645,9 +8494,7 @@ static void CorkscrewRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8674,9 +8521,7 @@ static void CorkscrewRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8696,8 +8541,7 @@ static void CorkscrewRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8715,8 +8559,7 @@ static void CorkscrewRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8747,9 +8590,7 @@ static void CorkscrewRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8776,9 +8617,7 @@ static void CorkscrewRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8795,8 +8634,7 @@ static void CorkscrewRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8817,8 +8655,7 @@ static void CorkscrewRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8849,9 +8686,7 @@ static void CorkscrewRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8878,9 +8713,7 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8900,8 +8733,7 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8919,8 +8751,7 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8951,9 +8782,7 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8980,9 +8809,7 @@ static void CorkscrewRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8999,8 +8826,7 @@ static void CorkscrewRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9021,8 +8847,7 @@ static void CorkscrewRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9053,9 +8878,7 @@ static void CorkscrewRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9082,9 +8905,7 @@ static void CorkscrewRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9104,8 +8925,7 @@ static void CorkscrewRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9123,8 +8943,7 @@ static void CorkscrewRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9155,9 +8974,7 @@ static void CorkscrewRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9184,9 +9001,7 @@ static void CorkscrewRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9203,8 +9018,7 @@ static void CorkscrewRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9225,8 +9039,7 @@ static void CorkscrewRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9257,9 +9070,7 @@ static void CorkscrewRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9286,9 +9097,7 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9307,8 +9116,7 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -9325,8 +9133,7 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9356,9 +9163,7 @@ static void CorkscrewRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -9386,9 +9191,7 @@ static void CorkscrewRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9404,8 +9207,7 @@ static void CorkscrewRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -9425,8 +9227,7 @@ static void CorkscrewRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9456,9 +9257,7 @@ static void CorkscrewRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -9486,9 +9285,7 @@ static void CorkscrewRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9508,8 +9305,7 @@ static void CorkscrewRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9527,8 +9323,7 @@ static void CorkscrewRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9559,9 +9354,7 @@ static void CorkscrewRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9588,9 +9381,7 @@ static void CorkscrewRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9607,8 +9398,7 @@ static void CorkscrewRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9629,8 +9419,7 @@ static void CorkscrewRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9661,9 +9450,7 @@ static void CorkscrewRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9690,9 +9477,7 @@ static void CorkscrewRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9709,8 +9494,7 @@ static void CorkscrewRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9728,8 +9512,7 @@ static void CorkscrewRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9760,9 +9543,7 @@ static void CorkscrewRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9789,9 +9570,7 @@ static void CorkscrewRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9808,8 +9587,7 @@ static void CorkscrewRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9827,8 +9605,7 @@ static void CorkscrewRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9859,9 +9636,7 @@ static void CorkscrewRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9956,8 +9731,8 @@ static void CorkscrewRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9986,8 +9761,8 @@ static void CorkscrewRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10016,8 +9791,8 @@ static void CorkscrewRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -10073,8 +9848,8 @@ static void CorkscrewRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10103,8 +9878,8 @@ static void CorkscrewRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10133,8 +9908,8 @@ static void CorkscrewRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -10184,8 +9959,8 @@ static void CorkscrewRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -10221,8 +9996,8 @@ static void CorkscrewRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10262,8 +10037,8 @@ static void CorkscrewRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10301,8 +10076,8 @@ static void CorkscrewRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -10338,8 +10113,8 @@ static void CorkscrewRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10379,8 +10154,8 @@ static void CorkscrewRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10425,8 +10200,8 @@ static void LayDownRCTrackLeftFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10456,8 +10231,8 @@ static void LayDownRCTrackLeftFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10488,8 +10263,8 @@ static void LayDownRCTrackLeftFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -10546,8 +10321,8 @@ static void LayDownRCTrackRightFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10576,8 +10351,8 @@ static void LayDownRCTrackRightFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10607,8 +10382,8 @@ static void LayDownRCTrackRightFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -10725,8 +10500,8 @@ static void LayDownRCTrackFlyerHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -10800,8 +10575,8 @@ static void LayDownRCTrackLeftFlyerCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); } @@ -10813,8 +10588,8 @@ static void LayDownRCTrackLeftFlyerCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); } @@ -10881,8 +10656,8 @@ static void LayDownRCTrackLeftFlyerCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -10943,8 +10718,8 @@ static void LayDownRCTrackRightFlyerCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11005,8 +10780,8 @@ static void LayDownRCTrackRightFlyerCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -11164,9 +10939,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -11183,8 +10956,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -11202,8 +10974,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -11234,9 +11005,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -11262,9 +11031,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11281,8 +11048,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11300,8 +11066,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11332,9 +11097,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11360,9 +11123,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11379,8 +11140,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11398,8 +11158,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11430,9 +11189,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11458,9 +11215,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -11477,8 +11232,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -11496,8 +11250,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -11528,9 +11281,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -12605,9 +12356,7 @@ static void CorkscrewRCTrackLeftBankedQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12668,9 +12417,7 @@ static void CorkscrewRCTrackLeftBankedQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12720,9 +12467,7 @@ static void CorkscrewRCTrackRightBankedQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12790,9 +12535,7 @@ static void CorkscrewRCTrackRightBankedQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12860,9 +12603,7 @@ static void CorkscrewRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12902,8 +12643,8 @@ static void CorkscrewRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12939,9 +12680,7 @@ static void CorkscrewRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -12981,8 +12720,8 @@ static void CorkscrewRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13028,9 +12767,7 @@ static void CorkscrewRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13080,9 +12817,7 @@ static void CorkscrewRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13122,8 +12857,8 @@ static void CorkscrewRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13159,8 +12894,7 @@ static void CorkscrewRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13200,8 +12934,8 @@ static void CorkscrewRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13247,9 +12981,7 @@ static void CorkscrewRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13342,8 +13074,8 @@ static void CorkscrewRCTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13376,8 +13108,8 @@ static void CorkscrewRCTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13386,9 +13118,7 @@ static void CorkscrewRCTrackLeftEighthToDiagUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13429,8 +13159,8 @@ static void CorkscrewRCTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13505,8 +13235,8 @@ static void CorkscrewRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13539,8 +13269,8 @@ static void CorkscrewRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13550,8 +13280,7 @@ static void CorkscrewRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13592,8 +13321,8 @@ static void CorkscrewRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13643,8 +13372,8 @@ static void CorkscrewRCTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13677,8 +13406,8 @@ static void CorkscrewRCTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13687,8 +13416,7 @@ static void CorkscrewRCTrackLeftEighthToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13721,8 +13449,8 @@ static void CorkscrewRCTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13807,8 +13535,8 @@ static void CorkscrewRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13841,8 +13569,8 @@ static void CorkscrewRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13852,8 +13580,7 @@ static void CorkscrewRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13886,8 +13613,8 @@ static void CorkscrewRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13924,7 +13651,7 @@ static void CorkscrewRCTrackRightEighthToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -13986,9 +13713,7 @@ static void CorkscrewRCTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14010,8 +13735,7 @@ static void CorkscrewRCTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14030,8 +13754,7 @@ static void CorkscrewRCTrackDiagUp25ToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14063,9 +13786,7 @@ static void CorkscrewRCTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14092,9 +13813,7 @@ static void CorkscrewRCTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14112,8 +13831,7 @@ static void CorkscrewRCTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14136,8 +13854,7 @@ static void CorkscrewRCTrackDiagUp25ToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14169,9 +13886,7 @@ static void CorkscrewRCTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14198,9 +13913,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14222,8 +13935,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14242,8 +13954,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14275,9 +13986,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14304,9 +14013,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14324,8 +14031,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14348,8 +14054,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14381,9 +14086,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14442,9 +14145,7 @@ static void CorkscrewRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14462,8 +14163,7 @@ static void CorkscrewRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14482,8 +14182,7 @@ static void CorkscrewRCTrackDiagLeftBankedFlatToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14515,9 +14214,7 @@ static void CorkscrewRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14544,9 +14241,7 @@ static void CorkscrewRCTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14564,8 +14259,7 @@ static void CorkscrewRCTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14584,8 +14278,7 @@ static void CorkscrewRCTrackDiagRightBankedFlatToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14617,9 +14310,7 @@ static void CorkscrewRCTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14646,9 +14337,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14666,8 +14355,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14686,8 +14374,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToLeftBankedFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14719,9 +14406,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14748,9 +14433,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14768,8 +14451,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14788,8 +14470,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToRightBankedFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14821,9 +14502,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14882,9 +14561,7 @@ static void CorkscrewRCTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14902,8 +14579,7 @@ static void CorkscrewRCTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14922,8 +14598,7 @@ static void CorkscrewRCTrackDiagUp25LeftBanked( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14955,9 +14630,7 @@ static void CorkscrewRCTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14984,9 +14657,7 @@ static void CorkscrewRCTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15004,8 +14675,7 @@ static void CorkscrewRCTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15024,8 +14694,7 @@ static void CorkscrewRCTrackDiagUp25RightBanked( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15057,9 +14726,7 @@ static void CorkscrewRCTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15102,9 +14769,7 @@ static void CorkscrewRCTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15126,8 +14791,7 @@ static void CorkscrewRCTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15146,8 +14810,7 @@ static void CorkscrewRCTrackDiagFlatToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15179,9 +14842,7 @@ static void CorkscrewRCTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15208,9 +14869,7 @@ static void CorkscrewRCTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15228,8 +14887,7 @@ static void CorkscrewRCTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15252,8 +14910,7 @@ static void CorkscrewRCTrackDiagFlatToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15285,9 +14942,7 @@ static void CorkscrewRCTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15314,9 +14969,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15338,8 +14991,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15358,8 +15010,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15391,9 +15042,7 @@ static void CorkscrewRCTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15420,9 +15069,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15440,8 +15087,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15464,8 +15110,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15497,9 +15142,7 @@ static void CorkscrewRCTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15621,8 +15264,8 @@ static void CorkscrewRCTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15659,8 +15302,8 @@ static void CorkscrewRCTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15669,9 +15312,7 @@ static void CorkscrewRCTrackLeftEighthBankToDiagUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15716,8 +15357,8 @@ static void CorkscrewRCTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15807,8 +15448,8 @@ static void CorkscrewRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15845,8 +15486,8 @@ static void CorkscrewRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15856,8 +15497,7 @@ static void CorkscrewRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15902,8 +15542,8 @@ static void CorkscrewRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15957,8 +15597,8 @@ static void CorkscrewRCTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15995,8 +15635,8 @@ static void CorkscrewRCTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16005,8 +15645,7 @@ static void CorkscrewRCTrackLeftEighthBankToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16043,8 +15682,8 @@ static void CorkscrewRCTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16142,8 +15781,8 @@ static void CorkscrewRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16180,8 +15819,8 @@ static void CorkscrewRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16191,8 +15830,7 @@ static void CorkscrewRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16229,8 +15867,8 @@ static void CorkscrewRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16278,7 +15916,7 @@ static void CorkscrewRCTrackRightEighthBankToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -16364,9 +16002,7 @@ static void CorkscrewRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16432,9 +16068,7 @@ static void CorkscrewRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16483,9 +16117,7 @@ static void CorkscrewRCTrackRightBankToRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16551,9 +16183,7 @@ static void CorkscrewRCTrackRightBankToRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16609,9 +16239,7 @@ static void CorkscrewRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16670,9 +16298,7 @@ static void CorkscrewRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16728,9 +16354,7 @@ static void CorkscrewRCTrackRightQuarterTurn325DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16789,9 +16413,7 @@ static void CorkscrewRCTrackRightQuarterTurn325DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16840,8 +16462,8 @@ static void CorkscrewRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -16882,8 +16504,8 @@ static void CorkscrewRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16910,9 +16532,7 @@ static void CorkscrewRCTrackLeftLargeCorkscrewUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16925,8 +16545,8 @@ static void CorkscrewRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -16995,8 +16615,8 @@ static void CorkscrewRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -17054,8 +16674,8 @@ static void CorkscrewRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::rightCorner, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::right, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -17096,8 +16716,8 @@ static void CorkscrewRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomRightSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17125,8 +16745,7 @@ static void CorkscrewRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17139,8 +16758,8 @@ static void CorkscrewRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -17208,8 +16827,8 @@ static void CorkscrewRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -17275,7 +16894,7 @@ static void CorkscrewRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -17312,7 +16931,7 @@ static void CorkscrewRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -17347,7 +16966,7 @@ static void CorkscrewRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -17438,8 +17057,8 @@ static void CorkscrewRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17479,9 +17098,7 @@ static void CorkscrewRCTrackLeftMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -17520,8 +17137,7 @@ static void CorkscrewRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -17555,8 +17171,8 @@ static void CorkscrewRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); @@ -17645,8 +17261,8 @@ static void CorkscrewRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17687,8 +17303,7 @@ static void CorkscrewRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -17727,9 +17342,7 @@ static void CorkscrewRCTrackRightMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -17763,8 +17376,8 @@ static void CorkscrewRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); if (direction == 0 || direction == 3) @@ -17902,8 +17515,8 @@ static void CorkscrewRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -17944,8 +17557,8 @@ static void CorkscrewRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -17978,8 +17591,7 @@ static void CorkscrewRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -18015,8 +17627,8 @@ static void CorkscrewRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -18053,8 +17665,8 @@ static void CorkscrewRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -18174,8 +17786,8 @@ static void CorkscrewRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -18216,8 +17828,8 @@ static void CorkscrewRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -18249,9 +17861,7 @@ static void CorkscrewRCTrackRightLargeHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -18287,8 +17897,8 @@ static void CorkscrewRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -18325,8 +17935,8 @@ static void CorkscrewRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -18406,8 +18016,8 @@ static void CorkscrewRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -18452,8 +18062,8 @@ static void CorkscrewRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18507,8 +18117,8 @@ static void CorkscrewRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18574,8 +18184,8 @@ static void CorkscrewRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -18620,8 +18230,8 @@ static void CorkscrewRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18675,8 +18285,8 @@ static void CorkscrewRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18781,8 +18391,8 @@ static void CorkscrewRCTrackLeftZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18792,8 +18402,8 @@ static void CorkscrewRCTrackLeftZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -18927,8 +18537,8 @@ static void CorkscrewRCTrackRightZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18938,8 +18548,8 @@ static void CorkscrewRCTrackRightZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -19120,8 +18730,8 @@ static void CorkscrewRCTrackLeftLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19131,8 +18741,8 @@ static void CorkscrewRCTrackLeftLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -19300,8 +18910,8 @@ static void CorkscrewRCTrackRightLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19311,8 +18921,8 @@ static void CorkscrewRCTrackRightLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -19400,9 +19010,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32); @@ -19419,8 +19027,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -19438,8 +19045,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -19475,8 +19081,8 @@ static void CorkscrewRCTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19493,8 +19099,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -19512,8 +19117,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -19549,8 +19153,8 @@ static void CorkscrewRCTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19567,8 +19171,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19586,8 +19189,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19618,9 +19220,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 136); @@ -19647,9 +19247,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19667,8 +19265,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -19687,8 +19284,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -19725,8 +19321,8 @@ static void CorkscrewRCTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -19744,8 +19340,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19764,8 +19359,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19802,8 +19396,8 @@ static void CorkscrewRCTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19821,8 +19415,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19841,8 +19434,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19874,9 +19466,7 @@ static void CorkscrewRCTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19903,9 +19493,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19923,8 +19511,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19943,8 +19530,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19981,8 +19567,8 @@ static void CorkscrewRCTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -20000,8 +19586,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -20020,8 +19605,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -20058,8 +19642,8 @@ static void CorkscrewRCTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -20077,8 +19661,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -20097,8 +19680,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -20130,9 +19712,7 @@ static void CorkscrewRCTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -20158,9 +19738,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 136); @@ -20177,8 +19755,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -20196,8 +19773,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -20233,8 +19809,8 @@ static void CorkscrewRCTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -20251,8 +19827,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -20270,8 +19845,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -20307,8 +19881,8 @@ static void CorkscrewRCTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -20325,8 +19899,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -20344,8 +19917,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -20376,9 +19948,7 @@ static void CorkscrewRCTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32); @@ -20409,9 +19979,7 @@ static void CorkscrewRCTrackLeftEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -20428,8 +19996,7 @@ static void CorkscrewRCTrackLeftEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -20447,8 +20014,7 @@ static void CorkscrewRCTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -20489,8 +20055,8 @@ static void CorkscrewRCTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -20523,8 +20089,8 @@ static void CorkscrewRCTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -20534,8 +20100,8 @@ static void CorkscrewRCTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -20597,9 +20163,7 @@ static void CorkscrewRCTrackRightEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -20617,8 +20181,7 @@ static void CorkscrewRCTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -20635,8 +20198,7 @@ static void CorkscrewRCTrackRightEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -20677,8 +20239,8 @@ static void CorkscrewRCTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -20711,8 +20273,8 @@ static void CorkscrewRCTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -20722,8 +20284,8 @@ static void CorkscrewRCTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) diff --git a/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp b/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp index b3e52dcda1..1dc685c945 100644 --- a/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/FlyingRollerCoaster.cpp @@ -32,11 +32,11 @@ static void FlyingRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { 17154, 17150, SPR_STATION_BASE_A_SW_NE }, - { 17155, 17151, SPR_STATION_BASE_A_NW_SE }, - { 17154, 17150, SPR_STATION_BASE_A_SW_NE }, - { 17155, 17151, SPR_STATION_BASE_A_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { 17154, 17150 }, + { 17155, 17151 }, + { 17154, 17150 }, + { 17155, 17151 }, }; if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -51,11 +51,15 @@ static void FlyingRCTrackStation( session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][2]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); + if (TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::a, 0, 9, 11)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); @@ -95,7 +99,7 @@ static void FlyingRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -126,7 +130,7 @@ static void FlyingRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -161,7 +165,7 @@ static void FlyingRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -290,8 +294,8 @@ static void FlyingRCTrackHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -432,8 +436,8 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -466,8 +470,8 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -500,8 +504,7 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -534,8 +537,8 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -580,8 +583,8 @@ static void FlyingRCTrackLeftFlyingLargeHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -683,8 +686,8 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -717,8 +720,8 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -750,9 +753,7 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -785,8 +786,8 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -831,8 +832,8 @@ static void FlyingRCTrackRightFlyingLargeHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); diff --git a/src/openrct2/paint/track/coaster/FlyingRollerCoasterInverted.cpp b/src/openrct2/paint/track/coaster/FlyingRollerCoasterInverted.cpp index 1804385bda..68f2b52fb9 100644 --- a/src/openrct2/paint/track/coaster/FlyingRollerCoasterInverted.cpp +++ b/src/openrct2/paint/track/coaster/FlyingRollerCoasterInverted.cpp @@ -86,24 +86,24 @@ static void InvertedFlyingRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { SPR_STATION_BASE_C_SW_NE, 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 27132, SPR_STATION_INVERTED_BAR_C_NW_SE }, - { SPR_STATION_BASE_C_SW_NE, 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 27132, SPR_STATION_INVERTED_BAR_C_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, + { 27132, SPR_STATION_INVERTED_BAR_C_NW_SE }, + { 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, + { 27132, SPR_STATION_INVERTED_BAR_C_NW_SE }, }; + const bool stationDrawn = TrackPaintUtilDrawStationInverted( + session, ride, direction, height, trackElement, STATION_VARIANT_1); PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height + 24 }, + session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); - PaintAddImageAsChildRotated( - session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 1 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); - + if (stationDrawn) + { + PaintAddImageAsChildRotated( + session, direction, session.SupportColours.WithIndex(imageIds[direction][1]), { 0, 6, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -560,8 +560,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -604,8 +604,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -637,9 +637,7 @@ static void InvertedFlyingRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -675,8 +673,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -710,8 +708,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -773,8 +771,8 @@ static void InvertedFlyingRCTrackFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -820,8 +818,8 @@ static void InvertedFlyingRCTrackFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -867,8 +865,8 @@ static void InvertedFlyingRCTrackLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -914,8 +912,8 @@ static void InvertedFlyingRCTrackRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -964,8 +962,8 @@ static void InvertedFlyingRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1006,8 +1004,8 @@ static void InvertedFlyingRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1038,9 +1036,7 @@ static void InvertedFlyingRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1074,8 +1070,8 @@ static void InvertedFlyingRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1109,8 +1105,8 @@ static void InvertedFlyingRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1173,8 +1169,8 @@ static void InvertedFlyingRCTrackLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1227,8 +1223,8 @@ static void InvertedFlyingRCTrackRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1281,8 +1277,8 @@ static void InvertedFlyingRCTrack25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1335,8 +1331,8 @@ static void InvertedFlyingRCTrack25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1425,8 +1421,8 @@ static void InvertedFlyingRCTrackLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1479,8 +1475,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1519,8 +1515,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1548,9 +1544,7 @@ static void InvertedFlyingRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1582,8 +1576,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1613,8 +1607,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1666,8 +1660,8 @@ static void InvertedFlyingRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1706,8 +1700,8 @@ static void InvertedFlyingRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1735,8 +1729,7 @@ static void InvertedFlyingRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1768,8 +1761,8 @@ static void InvertedFlyingRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1799,8 +1792,8 @@ static void InvertedFlyingRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1875,9 +1868,7 @@ static void InvertedFlyingRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1918,8 +1909,8 @@ static void InvertedFlyingRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -1967,8 +1958,8 @@ static void InvertedFlyingRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -2015,9 +2006,7 @@ static void InvertedFlyingRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2072,9 +2061,7 @@ static void InvertedFlyingRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2115,8 +2102,8 @@ static void InvertedFlyingRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -2164,8 +2151,8 @@ static void InvertedFlyingRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -2212,9 +2199,7 @@ static void InvertedFlyingRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2270,8 +2255,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2313,9 +2298,7 @@ static void InvertedFlyingRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2349,8 +2332,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2415,8 +2398,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2458,9 +2441,7 @@ static void InvertedFlyingRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2494,8 +2475,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2557,8 +2538,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2601,8 +2582,8 @@ static void InvertedFlyingRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2654,8 +2635,8 @@ static void InvertedFlyingRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2698,8 +2679,8 @@ static void InvertedFlyingRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2938,8 +2919,8 @@ static void InvertedFlyingRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2982,8 +2963,8 @@ static void InvertedFlyingRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3015,9 +2996,7 @@ static void InvertedFlyingRCTrackLeftQuarterBankedHelixLargeUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3053,8 +3032,8 @@ static void InvertedFlyingRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3088,8 +3067,8 @@ static void InvertedFlyingRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3145,8 +3124,8 @@ static void InvertedFlyingRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3189,8 +3168,8 @@ static void InvertedFlyingRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3222,8 +3201,7 @@ static void InvertedFlyingRCTrackRightQuarterBankedHelixLargeUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3259,8 +3237,8 @@ static void InvertedFlyingRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3294,8 +3272,8 @@ static void InvertedFlyingRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3351,8 +3329,8 @@ static void InvertedFlyingRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3395,8 +3373,8 @@ static void InvertedFlyingRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3428,9 +3406,7 @@ static void InvertedFlyingRCTrackLeftQuarterBankedHelixLargeDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3466,8 +3442,8 @@ static void InvertedFlyingRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3501,8 +3477,8 @@ static void InvertedFlyingRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3558,8 +3534,8 @@ static void InvertedFlyingRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3602,8 +3578,8 @@ static void InvertedFlyingRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3635,8 +3611,7 @@ static void InvertedFlyingRCTrackRightQuarterBankedHelixLargeDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3672,8 +3647,8 @@ static void InvertedFlyingRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3707,8 +3682,8 @@ static void InvertedFlyingRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3944,8 +3919,8 @@ static void InvertedFlyingRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3978,8 +3953,8 @@ static void InvertedFlyingRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3988,9 +3963,7 @@ static void InvertedFlyingRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4024,8 +3997,8 @@ static void InvertedFlyingRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -4108,8 +4081,8 @@ static void InvertedFlyingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4142,8 +4115,8 @@ static void InvertedFlyingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4153,8 +4126,7 @@ static void InvertedFlyingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4188,8 +4160,8 @@ static void InvertedFlyingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -4256,8 +4228,7 @@ static void InvertedFlyingRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4297,8 +4268,8 @@ static void InvertedFlyingRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4331,8 +4302,8 @@ static void InvertedFlyingRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4341,9 +4312,7 @@ static void InvertedFlyingRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4377,8 +4346,8 @@ static void InvertedFlyingRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -4425,9 +4394,7 @@ static void InvertedFlyingRCTrackRightEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4467,8 +4434,8 @@ static void InvertedFlyingRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4501,8 +4468,8 @@ static void InvertedFlyingRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4512,8 +4479,7 @@ static void InvertedFlyingRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4547,8 +4513,8 @@ static void InvertedFlyingRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -4613,9 +4579,7 @@ static void InvertedFlyingRCTrackDiagFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4646,8 +4610,7 @@ static void InvertedFlyingRCTrackDiagFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4679,8 +4642,7 @@ static void InvertedFlyingRCTrackDiagFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4712,9 +4674,7 @@ static void InvertedFlyingRCTrackDiagFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -4759,9 +4719,7 @@ static void InvertedFlyingRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4792,8 +4750,7 @@ static void InvertedFlyingRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4825,8 +4782,7 @@ static void InvertedFlyingRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4858,9 +4814,7 @@ static void InvertedFlyingRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -4890,9 +4844,7 @@ static void InvertedFlyingRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -4909,8 +4861,7 @@ static void InvertedFlyingRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -4928,8 +4879,7 @@ static void InvertedFlyingRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -4947,9 +4897,7 @@ static void InvertedFlyingRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5014,9 +4962,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5047,8 +4993,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5080,8 +5025,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5113,9 +5057,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -5145,9 +5087,7 @@ static void InvertedFlyingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5164,8 +5104,7 @@ static void InvertedFlyingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5183,8 +5122,7 @@ static void InvertedFlyingRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5202,9 +5140,7 @@ static void InvertedFlyingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5255,9 +5191,7 @@ static void InvertedFlyingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5274,8 +5208,7 @@ static void InvertedFlyingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5293,8 +5226,7 @@ static void InvertedFlyingRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5312,9 +5244,7 @@ static void InvertedFlyingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5379,9 +5309,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5412,8 +5340,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5445,8 +5372,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5478,9 +5404,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -5510,9 +5434,7 @@ static void InvertedFlyingRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5529,8 +5451,7 @@ static void InvertedFlyingRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5548,8 +5469,7 @@ static void InvertedFlyingRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5567,9 +5487,7 @@ static void InvertedFlyingRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -5599,9 +5517,7 @@ static void InvertedFlyingRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5618,8 +5534,7 @@ static void InvertedFlyingRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5637,8 +5552,7 @@ static void InvertedFlyingRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5656,9 +5570,7 @@ static void InvertedFlyingRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5709,9 +5621,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -5727,8 +5637,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -5745,8 +5654,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -5763,9 +5671,7 @@ static void InvertedFlyingRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -5795,9 +5701,7 @@ static void InvertedFlyingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5814,8 +5718,7 @@ static void InvertedFlyingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5833,8 +5736,7 @@ static void InvertedFlyingRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5852,9 +5754,7 @@ static void InvertedFlyingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5905,9 +5805,7 @@ static void InvertedFlyingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5924,8 +5822,7 @@ static void InvertedFlyingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5943,8 +5840,7 @@ static void InvertedFlyingRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5962,9 +5858,7 @@ static void InvertedFlyingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6015,9 +5909,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6034,8 +5926,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6053,8 +5944,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6072,9 +5962,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6104,9 +5992,7 @@ static void InvertedFlyingRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6123,8 +6009,7 @@ static void InvertedFlyingRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6142,8 +6027,7 @@ static void InvertedFlyingRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6162,8 +6046,8 @@ static void InvertedFlyingRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6194,9 +6078,7 @@ static void InvertedFlyingRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6213,8 +6095,7 @@ static void InvertedFlyingRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6232,8 +6113,7 @@ static void InvertedFlyingRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6252,8 +6132,8 @@ static void InvertedFlyingRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6284,9 +6164,7 @@ static void InvertedFlyingRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6303,8 +6181,7 @@ static void InvertedFlyingRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6322,8 +6199,7 @@ static void InvertedFlyingRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6342,8 +6218,8 @@ static void InvertedFlyingRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6374,9 +6250,7 @@ static void InvertedFlyingRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6393,8 +6267,7 @@ static void InvertedFlyingRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6412,8 +6285,7 @@ static void InvertedFlyingRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6432,8 +6304,8 @@ static void InvertedFlyingRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6464,9 +6336,7 @@ static void InvertedFlyingRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6483,8 +6353,7 @@ static void InvertedFlyingRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6502,8 +6371,7 @@ static void InvertedFlyingRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6521,9 +6389,7 @@ static void InvertedFlyingRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6553,9 +6419,7 @@ static void InvertedFlyingRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6572,8 +6436,7 @@ static void InvertedFlyingRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6591,8 +6454,7 @@ static void InvertedFlyingRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6610,9 +6472,7 @@ static void InvertedFlyingRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6642,9 +6502,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6661,8 +6519,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6680,8 +6537,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6699,9 +6555,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6731,9 +6585,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6750,8 +6602,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6769,8 +6620,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6788,9 +6638,7 @@ static void InvertedFlyingRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6820,9 +6668,7 @@ static void InvertedFlyingRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -6838,8 +6684,7 @@ static void InvertedFlyingRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -6856,8 +6701,7 @@ static void InvertedFlyingRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -6874,9 +6718,7 @@ static void InvertedFlyingRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6906,9 +6748,7 @@ static void InvertedFlyingRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -6924,8 +6764,7 @@ static void InvertedFlyingRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -6942,8 +6781,7 @@ static void InvertedFlyingRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -6960,9 +6798,7 @@ static void InvertedFlyingRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -6992,9 +6828,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7011,8 +6845,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7030,8 +6863,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7049,9 +6881,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -7081,9 +6911,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7100,8 +6928,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7119,8 +6946,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7138,9 +6964,7 @@ static void InvertedFlyingRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -7170,9 +6994,7 @@ static void InvertedFlyingRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7189,8 +7011,7 @@ static void InvertedFlyingRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7208,8 +7029,7 @@ static void InvertedFlyingRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7228,8 +7048,8 @@ static void InvertedFlyingRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -7260,9 +7080,7 @@ static void InvertedFlyingRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7279,8 +7097,7 @@ static void InvertedFlyingRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7298,8 +7115,7 @@ static void InvertedFlyingRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7318,8 +7134,8 @@ static void InvertedFlyingRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -7395,8 +7211,8 @@ static void InvertedFlyingRCTrackLeftBankedQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7439,8 +7255,8 @@ static void InvertedFlyingRCTrackLeftBankedQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7492,8 +7308,8 @@ static void InvertedFlyingRCTrackRightBankedQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7536,8 +7352,8 @@ static void InvertedFlyingRCTrackRightBankedQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7609,8 +7425,8 @@ static void InvertedFlyingRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7649,8 +7465,8 @@ static void InvertedFlyingRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7678,9 +7494,7 @@ static void InvertedFlyingRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -7712,8 +7526,8 @@ static void InvertedFlyingRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7743,8 +7557,8 @@ static void InvertedFlyingRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7796,8 +7610,8 @@ static void InvertedFlyingRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7836,8 +7650,8 @@ static void InvertedFlyingRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7865,8 +7679,7 @@ static void InvertedFlyingRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -7898,8 +7711,8 @@ static void InvertedFlyingRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7929,8 +7742,8 @@ static void InvertedFlyingRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -8751,8 +8564,8 @@ static void InvertedFlyingRCTrackLeftFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -8789,8 +8602,8 @@ static void InvertedFlyingRCTrackLeftFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8834,8 +8647,8 @@ static void InvertedFlyingRCTrackLeftFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8875,8 +8688,8 @@ static void InvertedFlyingRCTrackRightFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -8912,8 +8725,8 @@ static void InvertedFlyingRCTrackRightFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8957,8 +8770,8 @@ static void InvertedFlyingRCTrackRightFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9027,8 +8840,8 @@ static void FlyingRCTrackFlyerHalfLoopDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); diff --git a/src/openrct2/paint/track/coaster/HeartlineTwisterCoaster.cpp b/src/openrct2/paint/track/coaster/HeartlineTwisterCoaster.cpp index 8e89807c41..0371fa71b6 100644 --- a/src/openrct2/paint/track/coaster/HeartlineTwisterCoaster.cpp +++ b/src/openrct2/paint/track/coaster/HeartlineTwisterCoaster.cpp @@ -42,7 +42,7 @@ static void HeartlineTwisterRCTrackFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21356), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -50,7 +50,7 @@ static void HeartlineTwisterRCTrackFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21357), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -58,7 +58,7 @@ static void HeartlineTwisterRCTrackFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21360), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -66,7 +66,7 @@ static void HeartlineTwisterRCTrackFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21361), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } } @@ -81,7 +81,7 @@ static void HeartlineTwisterRCTrackFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21296), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: case 3: @@ -90,7 +90,7 @@ static void HeartlineTwisterRCTrackFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21297), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } } @@ -107,21 +107,27 @@ static void HeartlineTwisterRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { 19732, SPR_STATION_BASE_B_SW_NE }, - { 19733, SPR_STATION_BASE_B_NW_SE }, - { 19732, SPR_STATION_BASE_B_SW_NE }, - { 19733, SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { 19732, 19734 }, + { 19733, 19735 }, + { 19732, 19734 }, + { 19733, 19735 }, }; - PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, 0)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); + } + else + { + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + DrawSupportForSequenceA( + session, supportType.wooden, trackSequence, direction, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -142,7 +148,7 @@ static void HeartlineTwisterRCTrack25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21382), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 50 } }); + { { 0, 27, height }, { 32, 1, 40 } }); break; case 1: PaintAddImageAsParentRotated( @@ -150,7 +156,7 @@ static void HeartlineTwisterRCTrack25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21383), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 50 } }); + { { 0, 27, height }, { 32, 1, 40 } }); break; case 2: PaintAddImageAsParentRotated( @@ -158,7 +164,7 @@ static void HeartlineTwisterRCTrack25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21384), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 50 } }); + { { 0, 27, height }, { 32, 1, 40 } }); break; case 3: PaintAddImageAsParentRotated( @@ -166,7 +172,7 @@ static void HeartlineTwisterRCTrack25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21385), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 50 } }); + { { 0, 27, height }, { 32, 1, 40 } }); break; } } @@ -180,7 +186,7 @@ static void HeartlineTwisterRCTrack25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21326), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 50 } }); + { { 0, 27, height }, { 32, 1, 40 } }); break; case 1: PaintAddImageAsParentRotated( @@ -188,7 +194,7 @@ static void HeartlineTwisterRCTrack25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21327), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 50 } }); + { { 0, 27, height }, { 32, 1, 40 } }); break; case 2: PaintAddImageAsParentRotated( @@ -196,7 +202,7 @@ static void HeartlineTwisterRCTrack25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21328), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 50 } }); + { { 0, 27, height }, { 32, 1, 40 } }); break; case 3: PaintAddImageAsParentRotated( @@ -204,7 +210,7 @@ static void HeartlineTwisterRCTrack25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21329), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 50 } }); + { { 0, 27, height }, { 32, 1, 40 } }); break; } } @@ -239,7 +245,7 @@ static void HeartlineTwisterRCTrack60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21406), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 98 } }); + { { 0, 27, height }, { 32, 1, 88 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -247,7 +253,7 @@ static void HeartlineTwisterRCTrack60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21407), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 98 } }); + { { 0, 27, height }, { 32, 1, 88 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -255,7 +261,7 @@ static void HeartlineTwisterRCTrack60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21408), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 98 } }); + { { 0, 27, height }, { 32, 1, 88 } }); break; case 3: PaintAddImageAsParentRotated( @@ -263,7 +269,7 @@ static void HeartlineTwisterRCTrack60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21409), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 98 } }); + { { 0, 27, height }, { 32, 1, 88 } }); break; } } @@ -277,7 +283,7 @@ static void HeartlineTwisterRCTrack60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21350), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 98 } }); + { { 0, 27, height }, { 32, 1, 88 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -285,7 +291,7 @@ static void HeartlineTwisterRCTrack60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21351), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 98 } }); + { { 0, 27, height }, { 32, 1, 88 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -293,7 +299,7 @@ static void HeartlineTwisterRCTrack60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21352), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 98 } }); + { { 0, 27, height }, { 32, 1, 88 } }); break; case 3: PaintAddImageAsParentRotated( @@ -301,7 +307,7 @@ static void HeartlineTwisterRCTrack60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21353), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 98 } }); + { { 0, 27, height }, { 32, 1, 88 } }); break; } } @@ -336,7 +342,7 @@ static void HeartlineTwisterRCTrackFlatTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21366), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 42 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 1: PaintAddImageAsParentRotated( @@ -344,7 +350,7 @@ static void HeartlineTwisterRCTrackFlatTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21367), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 42 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 2: PaintAddImageAsParentRotated( @@ -352,7 +358,7 @@ static void HeartlineTwisterRCTrackFlatTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21368), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 42 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 3: PaintAddImageAsParentRotated( @@ -360,7 +366,7 @@ static void HeartlineTwisterRCTrackFlatTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21369), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 42 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; } } @@ -374,7 +380,7 @@ static void HeartlineTwisterRCTrackFlatTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21310), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 42 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 1: PaintAddImageAsParentRotated( @@ -382,7 +388,7 @@ static void HeartlineTwisterRCTrackFlatTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21311), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 42 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 2: PaintAddImageAsParentRotated( @@ -390,7 +396,7 @@ static void HeartlineTwisterRCTrackFlatTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21312), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 42 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 3: PaintAddImageAsParentRotated( @@ -398,7 +404,7 @@ static void HeartlineTwisterRCTrackFlatTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21313), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 42 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; } } @@ -433,7 +439,7 @@ static void HeartlineTwisterRCTrack25DegUpTo60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21390), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -441,7 +447,7 @@ static void HeartlineTwisterRCTrack25DegUpTo60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21391), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -449,7 +455,7 @@ static void HeartlineTwisterRCTrack25DegUpTo60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21392), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 3: PaintAddImageAsParentRotated( @@ -457,7 +463,7 @@ static void HeartlineTwisterRCTrack25DegUpTo60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21393), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; } } @@ -471,7 +477,7 @@ static void HeartlineTwisterRCTrack25DegUpTo60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21334), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -479,7 +485,7 @@ static void HeartlineTwisterRCTrack25DegUpTo60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21335), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -487,7 +493,7 @@ static void HeartlineTwisterRCTrack25DegUpTo60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21336), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 3: PaintAddImageAsParentRotated( @@ -495,7 +501,7 @@ static void HeartlineTwisterRCTrack25DegUpTo60DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21337), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; } } @@ -530,7 +536,7 @@ static void HeartlineTwisterRCTrack60DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21398), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -538,7 +544,7 @@ static void HeartlineTwisterRCTrack60DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21399), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -546,7 +552,7 @@ static void HeartlineTwisterRCTrack60DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21400), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 3: PaintAddImageAsParentRotated( @@ -554,7 +560,7 @@ static void HeartlineTwisterRCTrack60DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21401), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; } } @@ -568,7 +574,7 @@ static void HeartlineTwisterRCTrack60DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21342), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 1: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -576,7 +582,7 @@ static void HeartlineTwisterRCTrack60DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21343), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 2: session.WoodenSupportsPrependTo = PaintAddImageAsParentRotated( @@ -584,7 +590,7 @@ static void HeartlineTwisterRCTrack60DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21344), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; case 3: PaintAddImageAsParentRotated( @@ -592,7 +598,7 @@ static void HeartlineTwisterRCTrack60DegUpTo25DegUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21345), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 66 } }); + { { 0, 27, height }, { 32, 1, 56 } }); break; } } @@ -627,7 +633,7 @@ static void HeartlineTwisterRCTrack25DegUpToFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21374), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 34 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 1: PaintAddImageAsParentRotated( @@ -635,7 +641,7 @@ static void HeartlineTwisterRCTrack25DegUpToFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21375), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 34 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 2: PaintAddImageAsParentRotated( @@ -643,7 +649,7 @@ static void HeartlineTwisterRCTrack25DegUpToFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21376), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 34 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 3: PaintAddImageAsParentRotated( @@ -651,7 +657,7 @@ static void HeartlineTwisterRCTrack25DegUpToFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21377), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 34 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; } } @@ -665,7 +671,7 @@ static void HeartlineTwisterRCTrack25DegUpToFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21318), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 34 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 1: PaintAddImageAsParentRotated( @@ -673,7 +679,7 @@ static void HeartlineTwisterRCTrack25DegUpToFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21319), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 34 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 2: PaintAddImageAsParentRotated( @@ -681,7 +687,7 @@ static void HeartlineTwisterRCTrack25DegUpToFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21320), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 34 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; case 3: PaintAddImageAsParentRotated( @@ -689,7 +695,7 @@ static void HeartlineTwisterRCTrack25DegUpToFlat( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21321), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 34 } }); + { { 0, 27, height }, { 32, 1, 32 } }); break; } } @@ -893,7 +899,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21302), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -901,7 +907,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21303), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -909,7 +915,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21304), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -917,7 +923,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21305), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } @@ -936,7 +942,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21320), { 0, 0, height - 8 }, - { { 0, 27, height - 8 }, { 32, 1, 34 } }); + { { 0, 27, height - 8 }, { 32, 1, 32 } }); break; case 1: PaintAddImageAsParentRotated( @@ -944,7 +950,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21321), { 0, 0, height - 8 }, - { { 0, 27, height - 8 }, { 32, 1, 34 } }); + { { 0, 27, height - 8 }, { 32, 1, 32 } }); break; case 2: PaintAddImageAsParentRotated( @@ -952,7 +958,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21318), { 0, 0, height - 8 }, - { { 0, 27, height - 8 }, { 32, 1, 34 } }); + { { 0, 27, height - 8 }, { 32, 1, 32 } }); break; case 3: PaintAddImageAsParentRotated( @@ -960,7 +966,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferUp( { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21319), { 0, 0, height - 8 }, - { { 0, 27, height - 8 }, { 32, 1, 34 } }); + { { 0, 27, height - 8 }, { 32, 1, 32 } }); break; } if (direction == 0 || direction == 3) @@ -993,7 +999,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21320), { 0, 0, height - 8 }, - { { 0, 27, height - 8 }, { 32, 1, 34 } }); + { { 0, 27, height - 8 }, { 32, 1, 32 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1001,7 +1007,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21321), { 0, 0, height - 8 }, - { { 0, 27, height - 8 }, { 32, 1, 34 } }); + { { 0, 27, height - 8 }, { 32, 1, 32 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1009,7 +1015,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21318), { 0, 0, height - 8 }, - { { 0, 27, height - 8 }, { 32, 1, 34 } }); + { { 0, 27, height - 8 }, { 32, 1, 32 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1017,7 +1023,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( { { 0, 6, height - 7 }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21319), { 0, 0, height - 8 }, - { { 0, 27, height - 8 }, { 32, 1, 34 } }); + { { 0, 27, height - 8 }, { 32, 1, 32 } }); break; } if (direction == 0 || direction == 3) @@ -1107,7 +1113,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21302), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1115,7 +1121,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21303), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1123,7 +1129,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21304), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1131,7 +1137,7 @@ static void HeartlineTwisterRCTrackHeartlineTransferDown( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21305), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } @@ -1211,7 +1217,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21422), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1219,7 +1225,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21425), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1227,7 +1233,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21428), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1235,7 +1241,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21431), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1248,7 +1254,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21423), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1256,7 +1262,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21426), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1264,7 +1270,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21429), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1272,7 +1278,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21432), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1285,7 +1291,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21424), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1293,7 +1299,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21427), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1301,7 +1307,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21430), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1309,7 +1315,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21433), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1322,7 +1328,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21430), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1330,7 +1336,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21433), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1338,7 +1344,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21424), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1346,7 +1352,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21427), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1359,7 +1365,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21429), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1367,7 +1373,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21432), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1375,7 +1381,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21423), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1383,7 +1389,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21426), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1396,7 +1402,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21428), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1404,7 +1410,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21431), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1412,7 +1418,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21422), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1420,7 +1426,7 @@ static void HeartlineTwisterRCTrackLeftHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21425), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1450,7 +1456,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21446), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1458,7 +1464,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21449), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1466,7 +1472,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21452), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1474,7 +1480,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21455), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1487,7 +1493,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21447), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1495,7 +1501,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21450), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1503,7 +1509,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21453), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1511,7 +1517,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21456), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1524,7 +1530,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21448), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1532,7 +1538,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21451), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1540,7 +1546,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21454), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1548,7 +1554,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21457), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1561,7 +1567,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21454), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1569,7 +1575,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21457), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1577,7 +1583,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21448), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1585,7 +1591,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21451), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1598,7 +1604,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21453), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1606,7 +1612,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21456), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1614,7 +1620,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21447), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1622,7 +1628,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21450), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; @@ -1635,7 +1641,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21452), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1643,7 +1649,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21455), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 2: PaintAddImageAsParentRotated( @@ -1651,7 +1657,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21446), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; case 3: PaintAddImageAsParentRotated( @@ -1659,7 +1665,7 @@ static void HeartlineTwisterRCTrackRightHeartlineRoll( { { 0, 6, height }, { 32, 20, 2 } }); PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(21449), { 0, 0, height }, - { { 0, 27, height }, { 32, 1, 26 } }); + { { 0, 27, height }, { 32, 1, 24 } }); break; } break; diff --git a/src/openrct2/paint/track/coaster/HybridCoaster.cpp b/src/openrct2/paint/track/coaster/HybridCoaster.cpp index 28f4bccb70..c08d4f5b32 100644 --- a/src/openrct2/paint/track/coaster/HybridCoaster.cpp +++ b/src/openrct2/paint/track/coaster/HybridCoaster.cpp @@ -60,11 +60,11 @@ namespace OpenRCT2::HybridRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { (SPR_G2_HYBRID_TRACK_BRAKE + 0), (SPR_G2_HYBRID_TRACK_BLOCK_BRAKE + 0), SPR_STATION_BASE_A_SW_NE }, - { (SPR_G2_HYBRID_TRACK_BRAKE + 1), (SPR_G2_HYBRID_TRACK_BLOCK_BRAKE + 1), SPR_STATION_BASE_A_NW_SE }, - { (SPR_G2_HYBRID_TRACK_BRAKE + 0), (SPR_G2_HYBRID_TRACK_BLOCK_BRAKE + 0), SPR_STATION_BASE_A_SW_NE }, - { (SPR_G2_HYBRID_TRACK_BRAKE + 1), (SPR_G2_HYBRID_TRACK_BLOCK_BRAKE + 1), SPR_STATION_BASE_A_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { (SPR_G2_HYBRID_TRACK_BRAKE + 0), (SPR_G2_HYBRID_TRACK_BLOCK_BRAKE + 0) }, + { (SPR_G2_HYBRID_TRACK_BRAKE + 1), (SPR_G2_HYBRID_TRACK_BLOCK_BRAKE + 1) }, + { (SPR_G2_HYBRID_TRACK_BRAKE + 0), (SPR_G2_HYBRID_TRACK_BLOCK_BRAKE + 0) }, + { (SPR_G2_HYBRID_TRACK_BRAKE + 1), (SPR_G2_HYBRID_TRACK_BLOCK_BRAKE + 1) }, }; if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -83,7 +83,7 @@ namespace OpenRCT2::HybridRC WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 10, trackElement); + TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 10, trackElement, StationBaseType::none, 0); TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); @@ -711,9 +711,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -822,8 +820,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - (direction + 1) & 3), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), (direction + 1) & 3), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -863,8 +860,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), (direction + 1) & 3), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -905,9 +902,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), (direction + 1) & 3), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -916,8 +912,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - (direction + 1) & 3), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), (direction + 1) & 3), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -957,8 +952,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), (direction + 1) & 3), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1392,8 +1387,7 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1440,8 +1434,7 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1542,8 +1535,7 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4487,9 +4479,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4610,8 +4600,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - (direction + 1) & 3), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), (direction + 1) & 3), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -4651,8 +4640,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), (direction + 1) & 3), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4696,9 +4685,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), (direction + 1) & 3), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4707,8 +4695,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - (direction + 1) & 3), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), (direction + 1) & 3), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -4748,8 +4735,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), (direction + 1) & 3), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5269,9 +5256,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5395,8 +5380,7 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5512,8 +5496,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -5553,8 +5536,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5595,9 +5578,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -5606,8 +5588,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -5647,8 +5628,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5748,8 +5729,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -5789,8 +5769,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5831,9 +5811,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -5842,8 +5821,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -5883,8 +5861,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6992,9 +6970,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7128,8 +7104,7 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7267,8 +7242,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -7316,8 +7290,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7366,9 +7340,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7377,8 +7350,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -7426,8 +7398,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7547,8 +7519,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -7596,8 +7567,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7646,9 +7617,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7657,8 +7627,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -7706,8 +7675,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7865,8 +7834,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7907,8 +7876,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8041,8 +8010,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8083,8 +8052,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8244,9 +8213,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8409,8 +8376,7 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8572,8 +8538,7 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8735,9 +8700,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8871,8 +8834,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -8912,8 +8874,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8957,9 +8919,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide, PaintSegment::topCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, + PaintSegment::top, PaintSegment::bottom, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8968,8 +8929,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -9009,8 +8969,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9119,8 +9079,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -9160,8 +9119,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9205,9 +9164,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::leftCorner, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::left, PaintSegment::right, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9216,8 +9174,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -9257,8 +9214,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9366,8 +9323,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -9407,8 +9363,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9452,9 +9408,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::leftCorner, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::left, PaintSegment::right, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9463,8 +9418,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), - direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -9504,8 +9458,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9614,8 +9568,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -9655,8 +9608,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9700,9 +9653,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide, PaintSegment::topCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, + PaintSegment::top, PaintSegment::bottom, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9711,8 +9663,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -9752,8 +9703,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10217,8 +10168,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); WoodenASupportsPaintSetupRotated( @@ -10276,8 +10227,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -10367,8 +10318,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10424,8 +10375,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -10574,8 +10525,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); WoodenASupportsPaintSetupRotated( @@ -10633,8 +10584,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -10770,8 +10721,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10827,8 +10778,8 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -11441,9 +11392,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11574,8 +11523,7 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11701,9 +11649,7 @@ namespace OpenRCT2::HybridRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11834,8 +11780,7 @@ namespace OpenRCT2::HybridRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); diff --git a/src/openrct2/paint/track/coaster/InvertedHairpinCoaster.cpp b/src/openrct2/paint/track/coaster/InvertedHairpinCoaster.cpp index 320d03a034..2e20752cc2 100644 --- a/src/openrct2/paint/track/coaster/InvertedHairpinCoaster.cpp +++ b/src/openrct2/paint/track/coaster/InvertedHairpinCoaster.cpp @@ -93,24 +93,24 @@ static void InvertedHairpinRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { SPR_STATION_BASE_C_SW_NE, 17028, SPR_STATION_INVERTED_BAR_0_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 17029, SPR_STATION_INVERTED_BAR_0_NW_SE }, - { SPR_STATION_BASE_C_SW_NE, 17028, SPR_STATION_INVERTED_BAR_0_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 17029, SPR_STATION_INVERTED_BAR_0_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { 17028, SPR_STATION_INVERTED_BAR_0_SW_NE }, + { 17029, SPR_STATION_INVERTED_BAR_0_NW_SE }, + { 17028, SPR_STATION_INVERTED_BAR_0_SW_NE }, + { 17029, SPR_STATION_INVERTED_BAR_0_NW_SE }, }; - + const bool stationDrawn = TrackPaintUtilDrawStationInverted( + session, ride, direction, height, trackElement, STATION_VARIANT_1); PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height + 24 }, + session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); - PaintAddImageAsChildRotated( - session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 1 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); + if (stationDrawn) + { + PaintAddImageAsChildRotated( + session, direction, session.SupportColours.WithIndex(imageIds[direction][1]), { 0, 6, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -128,22 +128,22 @@ static void InvertedHairpinRCTrack25DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17070), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17071), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17072), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17073), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } @@ -154,22 +154,22 @@ static void InvertedHairpinRCTrack25DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17042), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17043), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17044), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17045), { 0, 0, height + 24 }, - { { 0, 6, height + 40 }, { 32, 20, 3 } }); + { { 0, 6, height + 37 }, { 32, 20, 3 } }); break; } } @@ -221,7 +221,7 @@ static void InvertedHairpinRCTrack60DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17086), { 0, 0, height + 24 }, - { { 0, 6, height + 88 }, { 32, 20, 3 } }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -236,7 +236,7 @@ static void InvertedHairpinRCTrack60DegUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17089), { 0, 0, height + 24 }, - { { 0, 6, height + 88 }, { 32, 20, 3 } }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; } } @@ -247,7 +247,7 @@ static void InvertedHairpinRCTrack60DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17058), { 0, 0, height + 24 }, - { { 0, 6, height + 88 }, { 32, 20, 3 } }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -262,7 +262,7 @@ static void InvertedHairpinRCTrack60DegUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17061), { 0, 0, height + 24 }, - { { 0, 6, height + 88 }, { 32, 20, 3 } }); + { { 0, 6, height + 85 }, { 32, 20, 3 } }); break; } } @@ -290,22 +290,22 @@ static void InvertedHairpinRCTrackFlatTo25DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17062), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17063), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17064), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17065), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } } @@ -316,22 +316,22 @@ static void InvertedHairpinRCTrackFlatTo25DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17034), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17035), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17036), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17037), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } } @@ -383,7 +383,7 @@ static void InvertedHairpinRCTrack25DegUpTo60DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17074), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); + { { 0, 6, height + 53 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -404,7 +404,7 @@ static void InvertedHairpinRCTrack25DegUpTo60DegUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17077), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); + { { 0, 6, height + 53 }, { 32, 20, 3 } }); break; } } @@ -415,7 +415,7 @@ static void InvertedHairpinRCTrack25DegUpTo60DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17046), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); + { { 0, 6, height + 53 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -436,7 +436,7 @@ static void InvertedHairpinRCTrack25DegUpTo60DegUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17049), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); + { { 0, 6, height + 53 }, { 32, 20, 3 } }); break; } } @@ -464,7 +464,7 @@ static void InvertedHairpinRCTrack60DegUpTo25DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17080), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); + { { 0, 6, height + 53 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -485,7 +485,7 @@ static void InvertedHairpinRCTrack60DegUpTo25DegUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17083), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); + { { 0, 6, height + 53 }, { 32, 20, 3 } }); break; } } @@ -496,7 +496,7 @@ static void InvertedHairpinRCTrack60DegUpTo25DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17052), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); + { { 0, 6, height + 53 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -517,7 +517,7 @@ static void InvertedHairpinRCTrack60DegUpTo25DegUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17055), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 32, 20, 3 } }); + { { 0, 6, height + 53 }, { 32, 20, 3 } }); break; } } @@ -569,22 +569,22 @@ static void InvertedHairpinRCTrack25DegUpToFlat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17066), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17067), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17068), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17069), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } } @@ -595,22 +595,22 @@ static void InvertedHairpinRCTrack25DegUpToFlat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17038), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17039), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17040), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17041), { 0, 0, height + 24 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); + { { 0, 6, height + 29 }, { 32, 20, 3 } }); break; } } @@ -713,22 +713,22 @@ static void InvertedHairpinRCTrackLeftQuarterTurn3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17123), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); + { { 0, 6, height + 21 }, { 32, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17126), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); + { { 0, 6, height + 21 }, { 32, 20, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17129), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); + { { 0, 6, height + 21 }, { 32, 20, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17120), { 0, 0, height + 24 }, - { { 0, 6, height + 22 }, { 32, 20, 3 } }); + { { 0, 6, height + 21 }, { 32, 20, 3 } }); break; } @@ -736,8 +736,8 @@ static void InvertedHairpinRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -758,30 +758,28 @@ static void InvertedHairpinRCTrackLeftQuarterTurn3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17122), { 0, 0, height + 24 }, - { { 16, 0, height + 22 }, { 16, 16, 3 } }); + { { 16, 0, height + 21 }, { 16, 16, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17125), { 0, 0, height + 24 }, - { { 0, 0, height + 22 }, { 16, 16, 3 } }); + { { 0, 0, height + 21 }, { 16, 16, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17128), { 0, 0, height + 24 }, - { { 0, 16, height + 22 }, { 16, 16, 3 } }); + { { 0, 16, height + 21 }, { 16, 16, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17119), { 0, 0, height + 24 }, - { { 16, 16, height + 22 }, { 16, 16, 3 } }); + { { 16, 16, height + 21 }, { 16, 16, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -792,22 +790,22 @@ static void InvertedHairpinRCTrackLeftQuarterTurn3( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17121), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); + { { 6, 0, height + 21 }, { 20, 32, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17124), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); + { { 6, 0, height + 21 }, { 20, 32, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17127), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); + { { 6, 0, height + 21 }, { 20, 32, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17118), { 0, 0, height + 24 }, - { { 6, 0, height + 22 }, { 20, 32, 3 } }); + { { 6, 0, height + 21 }, { 20, 32, 3 } }); break; } @@ -815,8 +813,8 @@ static void InvertedHairpinRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -878,8 +876,8 @@ static void InvertedHairpinRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -922,8 +920,8 @@ static void InvertedHairpinRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -975,8 +973,8 @@ static void InvertedHairpinRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1019,8 +1017,8 @@ static void InvertedHairpinRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1070,31 +1068,29 @@ static void InvertedHairpinRCTrackLeftQuarterTurn1( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17114), { 0, 0, height + 24 }, - { { 6, 2, height + 24 }, { 26, 24, 3 } }); + { { 6, 2, height + 21 }, { 26, 24, 3 } }); break; case 1: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17115), { 0, 0, height + 24 }, - { { 0, 0, height + 24 }, { 26, 26, 3 } }); + { { 0, 0, height + 21 }, { 26, 26, 3 } }); break; case 2: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17116), { 0, 0, height + 24 }, - { { 2, 6, height + 24 }, { 24, 26, 3 } }); + { { 2, 6, height + 21 }, { 24, 26, 3 } }); break; case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17117), { 0, 0, height + 24 }, - { { 6, 6, height + 24 }, { 24, 24, 3 } }); + { { 6, 6, height + 21 }, { 24, 24, 3 } }); break; } PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), - direction), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( session, supportType.metal, MetalSupportPlace::Centre, 0, height + kSupportHeight, session.SupportColours); @@ -1136,7 +1132,7 @@ static void InvertedHairpinRCTrackFlatTo60DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17102), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 30, 20, 3 } }); + { { 0, 6, height + 45 }, { 30, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1157,7 +1153,7 @@ static void InvertedHairpinRCTrackFlatTo60DegUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17105), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 30, 20, 3 } }); + { { 0, 6, height + 45 }, { 30, 20, 3 } }); break; } } @@ -1168,7 +1164,7 @@ static void InvertedHairpinRCTrackFlatTo60DegUp( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17090), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 30, 20, 3 } }); + { { 0, 6, height + 45 }, { 30, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1189,7 +1185,7 @@ static void InvertedHairpinRCTrackFlatTo60DegUp( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17093), { 0, 0, height + 24 }, - { { 0, 6, height + 56 }, { 30, 20, 3 } }); + { { 0, 6, height + 45 }, { 30, 20, 3 } }); break; } } @@ -1217,7 +1213,7 @@ static void InvertedHairpinRCTrack60DegUpToFlat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17108), { 0, 0, height + 24 }, - { { 0, 6, height + 48 }, { 30, 20, 3 } }); + { { 0, 6, height + 45 }, { 30, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1238,7 +1234,7 @@ static void InvertedHairpinRCTrack60DegUpToFlat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17111), { 0, 0, height + 24 }, - { { 0, 6, height + 48 }, { 30, 20, 3 } }); + { { 0, 6, height + 45 }, { 30, 20, 3 } }); break; } } @@ -1249,7 +1245,7 @@ static void InvertedHairpinRCTrack60DegUpToFlat( case 0: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17096), { 0, 0, height + 24 }, - { { 0, 6, height + 48 }, { 30, 20, 3 } }); + { { 0, 6, height + 45 }, { 30, 20, 3 } }); break; case 1: PaintAddImageAsParentRotated( @@ -1270,7 +1266,7 @@ static void InvertedHairpinRCTrack60DegUpToFlat( case 3: PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(17099), { 0, 0, height + 24 }, - { { 0, 6, height + 48 }, { 30, 20, 3 } }); + { { 0, 6, height + 45 }, { 30, 20, 3 } }); break; } } diff --git a/src/openrct2/paint/track/coaster/InvertedImpulseCoaster.cpp b/src/openrct2/paint/track/coaster/InvertedImpulseCoaster.cpp index 3c2da1b06e..e6a3d5a2c9 100644 --- a/src/openrct2/paint/track/coaster/InvertedImpulseCoaster.cpp +++ b/src/openrct2/paint/track/coaster/InvertedImpulseCoaster.cpp @@ -62,24 +62,24 @@ static void InvertedImpulseRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { SPR_STATION_BASE_C_SW_NE, 19662, SPR_STATION_INVERTED_BAR_B_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 19663, SPR_STATION_INVERTED_BAR_B_NW_SE }, - { SPR_STATION_BASE_C_SW_NE, 19662, SPR_STATION_INVERTED_BAR_B_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 19663, SPR_STATION_INVERTED_BAR_B_NW_SE }, + static constexpr uint32_t imageIds[4][2] = { + { 19662, SPR_STATION_INVERTED_BAR_B_SW_NE }, + { 19663, SPR_STATION_INVERTED_BAR_B_NW_SE }, + { 19662, SPR_STATION_INVERTED_BAR_B_SW_NE }, + { 19663, SPR_STATION_INVERTED_BAR_B_NW_SE }, }; - + const bool stationDrawn = TrackPaintUtilDrawStationInverted( + session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height + 29 }, + session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); - PaintAddImageAsChildRotated( - session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, - { { 0, 6, height + 29 }, { 32, 20, 3 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); + if (stationDrawn) + { + PaintAddImageAsChildRotated( + session, direction, session.SupportColours.WithIndex(imageIds[direction][1]), { 0, 6, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } TrackPaintUtilDrawStationTunnelTall(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); diff --git a/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp b/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp index ebabb4a17b..65907fe855 100644 --- a/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/InvertedRollerCoaster.cpp @@ -96,24 +96,24 @@ static void InvertedRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { SPR_STATION_BASE_C_SW_NE, 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 27132, SPR_STATION_INVERTED_BAR_C_NW_SE }, - { SPR_STATION_BASE_C_SW_NE, 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 27132, SPR_STATION_INVERTED_BAR_C_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, + { 27132, SPR_STATION_INVERTED_BAR_C_NW_SE }, + { 27131, SPR_STATION_INVERTED_BAR_C_SW_NE }, + { 27132, SPR_STATION_INVERTED_BAR_C_NW_SE }, }; - + const bool stationDrawn = TrackPaintUtilDrawStationInverted( + session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height + 29 }, + session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); - PaintAddImageAsChildRotated( - session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, - { { 0, 6, height + 29 }, { 32, 20, 3 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); + if (stationDrawn) + { + PaintAddImageAsChildRotated( + session, direction, session.SupportColours.WithIndex(imageIds[direction][1]), { 0, 6, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } TrackPaintUtilDrawStationTunnelTall(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -638,8 +638,8 @@ static void InvertedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -680,8 +680,8 @@ static void InvertedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -712,9 +712,7 @@ static void InvertedRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -748,8 +746,8 @@ static void InvertedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -783,8 +781,8 @@ static void InvertedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -846,8 +844,8 @@ static void InvertedRCTrackFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -893,8 +891,8 @@ static void InvertedRCTrackFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -940,8 +938,8 @@ static void InvertedRCTrackLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -987,8 +985,8 @@ static void InvertedRCTrackRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1037,8 +1035,8 @@ static void InvertedRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1079,8 +1077,8 @@ static void InvertedRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1111,9 +1109,7 @@ static void InvertedRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1147,8 +1143,8 @@ static void InvertedRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1182,8 +1178,8 @@ static void InvertedRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1245,8 +1241,8 @@ static void InvertedRCTrackLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1316,8 +1312,8 @@ static void InvertedRCTrackRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1387,8 +1383,8 @@ static void InvertedRCTrack25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1458,8 +1454,8 @@ static void InvertedRCTrack25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1561,8 +1557,8 @@ static void InvertedRCTrackLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1615,8 +1611,8 @@ static void InvertedRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1655,8 +1651,8 @@ static void InvertedRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -1684,9 +1680,7 @@ static void InvertedRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -1718,8 +1712,8 @@ static void InvertedRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -1749,8 +1743,8 @@ static void InvertedRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1802,8 +1796,8 @@ static void InvertedRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1842,8 +1836,8 @@ static void InvertedRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -1871,8 +1865,7 @@ static void InvertedRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -1904,8 +1897,8 @@ static void InvertedRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -1935,8 +1928,8 @@ static void InvertedRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2011,9 +2004,7 @@ static void InvertedRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2051,8 +2042,8 @@ static void InvertedRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2086,8 +2077,8 @@ static void InvertedRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2122,9 +2113,7 @@ static void InvertedRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2178,9 +2167,7 @@ static void InvertedRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2218,8 +2205,8 @@ static void InvertedRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2253,8 +2240,8 @@ static void InvertedRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2289,9 +2276,7 @@ static void InvertedRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2346,9 +2331,8 @@ static void InvertedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -2431,9 +2415,7 @@ static void InvertedRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2466,8 +2448,8 @@ static void InvertedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2506,8 +2488,8 @@ static void InvertedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2539,9 +2521,7 @@ static void InvertedRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2602,9 +2582,8 @@ static void InvertedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -2677,9 +2656,8 @@ static void InvertedRCTrackRightVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -2763,8 +2741,7 @@ static void InvertedRCTrackRightVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2797,8 +2774,8 @@ static void InvertedRCTrackRightVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2837,8 +2814,8 @@ static void InvertedRCTrackRightVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2870,8 +2847,7 @@ static void InvertedRCTrackRightVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2932,9 +2908,8 @@ static void InvertedRCTrackRightVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3007,8 +2982,8 @@ static void InvertedRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3049,9 +3024,7 @@ static void InvertedRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3085,8 +3058,8 @@ static void InvertedRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3151,8 +3124,8 @@ static void InvertedRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3194,9 +3167,7 @@ static void InvertedRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3230,8 +3201,8 @@ static void InvertedRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3292,8 +3263,8 @@ static void InvertedRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3336,8 +3307,8 @@ static void InvertedRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3389,8 +3360,8 @@ static void InvertedRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3433,8 +3404,8 @@ static void InvertedRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3506,8 +3477,8 @@ static void InvertedRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3543,8 +3514,8 @@ static void InvertedRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3583,8 +3554,8 @@ static void InvertedRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3624,8 +3595,8 @@ static void InvertedRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3661,8 +3632,8 @@ static void InvertedRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3701,8 +3672,8 @@ static void InvertedRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3746,8 +3717,8 @@ static void InvertedRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3776,8 +3747,8 @@ static void InvertedRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3807,8 +3778,8 @@ static void InvertedRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3864,8 +3835,8 @@ static void InvertedRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3894,8 +3865,8 @@ static void InvertedRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3925,8 +3896,8 @@ static void InvertedRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4061,8 +4032,8 @@ static void InvertedRCTrackHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -4146,8 +4117,8 @@ static void InvertedRCTrackLeftCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4225,8 +4196,8 @@ static void InvertedRCTrackLeftCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4270,8 +4241,8 @@ static void InvertedRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4349,8 +4320,8 @@ static void InvertedRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4552,8 +4523,8 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4596,8 +4567,8 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4629,9 +4600,7 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4667,8 +4636,8 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4702,8 +4671,8 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4759,8 +4728,8 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4803,8 +4772,8 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4836,8 +4805,7 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4873,8 +4841,8 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4908,8 +4876,8 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4965,8 +4933,8 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -5009,8 +4977,8 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5042,9 +5010,7 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5080,8 +5046,8 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5115,8 +5081,8 @@ static void InvertedRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -5172,8 +5138,8 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -5216,8 +5182,8 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5249,8 +5215,7 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5286,8 +5251,8 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5321,8 +5286,8 @@ static void InvertedRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -5590,8 +5555,8 @@ static void InvertedRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5624,8 +5589,8 @@ static void InvertedRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5634,9 +5599,7 @@ static void InvertedRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5670,8 +5633,8 @@ static void InvertedRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -5774,8 +5737,8 @@ static void InvertedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5808,8 +5771,8 @@ static void InvertedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5819,8 +5782,7 @@ static void InvertedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5854,8 +5816,8 @@ static void InvertedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -5941,8 +5903,7 @@ static void InvertedRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -5982,8 +5943,8 @@ static void InvertedRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6016,8 +5977,8 @@ static void InvertedRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6026,9 +5987,7 @@ static void InvertedRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6062,8 +6021,8 @@ static void InvertedRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -6130,9 +6089,7 @@ static void InvertedRCTrackRightEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -6172,8 +6129,8 @@ static void InvertedRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6206,8 +6163,8 @@ static void InvertedRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6217,8 +6174,7 @@ static void InvertedRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6252,8 +6208,8 @@ static void InvertedRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -6370,9 +6326,7 @@ static void InvertedRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6403,8 +6357,7 @@ static void InvertedRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6436,8 +6389,7 @@ static void InvertedRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6469,9 +6421,7 @@ static void InvertedRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6518,9 +6468,7 @@ static void InvertedRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -6537,8 +6485,7 @@ static void InvertedRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -6556,8 +6503,7 @@ static void InvertedRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -6575,9 +6521,7 @@ static void InvertedRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6642,9 +6586,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -6675,8 +6617,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -6708,8 +6649,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -6741,9 +6681,7 @@ static void InvertedRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6790,9 +6728,7 @@ static void InvertedRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -6809,8 +6745,7 @@ static void InvertedRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -6828,8 +6763,7 @@ static void InvertedRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -6847,9 +6781,7 @@ static void InvertedRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6900,9 +6832,7 @@ static void InvertedRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -6919,8 +6849,7 @@ static void InvertedRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -6938,8 +6867,7 @@ static void InvertedRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -6957,9 +6885,7 @@ static void InvertedRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7024,9 +6950,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7057,8 +6981,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7090,8 +7013,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7123,9 +7045,7 @@ static void InvertedRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7186,9 +7106,7 @@ static void InvertedRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7219,8 +7137,7 @@ static void InvertedRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7252,8 +7169,7 @@ static void InvertedRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7285,9 +7201,7 @@ static void InvertedRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7334,9 +7248,7 @@ static void InvertedRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -7353,8 +7265,7 @@ static void InvertedRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -7372,8 +7283,7 @@ static void InvertedRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -7391,9 +7301,7 @@ static void InvertedRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7458,9 +7366,7 @@ static void InvertedRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7490,8 +7396,7 @@ static void InvertedRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -7522,8 +7427,7 @@ static void InvertedRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7554,9 +7458,7 @@ static void InvertedRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7603,9 +7505,7 @@ static void InvertedRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7622,8 +7522,7 @@ static void InvertedRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7641,8 +7540,7 @@ static void InvertedRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7660,9 +7558,7 @@ static void InvertedRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7713,9 +7609,7 @@ static void InvertedRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7732,8 +7626,7 @@ static void InvertedRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7751,8 +7644,7 @@ static void InvertedRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -7770,9 +7662,7 @@ static void InvertedRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7837,9 +7727,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7870,8 +7758,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7903,8 +7790,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7936,9 +7822,7 @@ static void InvertedRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7985,9 +7869,7 @@ static void InvertedRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8004,8 +7886,7 @@ static void InvertedRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8023,8 +7904,7 @@ static void InvertedRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8043,8 +7923,8 @@ static void InvertedRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8095,9 +7975,7 @@ static void InvertedRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8114,8 +7992,7 @@ static void InvertedRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8133,8 +8010,7 @@ static void InvertedRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8153,8 +8029,8 @@ static void InvertedRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8205,9 +8081,7 @@ static void InvertedRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8224,8 +8098,7 @@ static void InvertedRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8243,8 +8116,7 @@ static void InvertedRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8263,8 +8135,8 @@ static void InvertedRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8315,9 +8187,7 @@ static void InvertedRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8334,8 +8204,7 @@ static void InvertedRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8353,8 +8222,7 @@ static void InvertedRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8373,8 +8241,8 @@ static void InvertedRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8425,9 +8293,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8444,8 +8310,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8463,8 +8328,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8482,9 +8346,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8531,9 +8393,7 @@ static void InvertedRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8550,8 +8410,7 @@ static void InvertedRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8569,8 +8428,7 @@ static void InvertedRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8588,9 +8446,7 @@ static void InvertedRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8637,9 +8493,7 @@ static void InvertedRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8656,8 +8510,7 @@ static void InvertedRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8675,8 +8528,7 @@ static void InvertedRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8694,9 +8546,7 @@ static void InvertedRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8743,9 +8593,7 @@ static void InvertedRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8762,8 +8610,7 @@ static void InvertedRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8781,8 +8628,7 @@ static void InvertedRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8800,9 +8646,7 @@ static void InvertedRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8849,9 +8693,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8867,8 +8709,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -8885,8 +8726,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8903,9 +8743,7 @@ static void InvertedRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8952,9 +8790,7 @@ static void InvertedRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8970,8 +8806,7 @@ static void InvertedRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -8988,8 +8823,7 @@ static void InvertedRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9006,9 +8840,7 @@ static void InvertedRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9055,9 +8887,7 @@ static void InvertedRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9074,8 +8904,7 @@ static void InvertedRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9093,8 +8922,7 @@ static void InvertedRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9112,9 +8940,7 @@ static void InvertedRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9161,9 +8987,7 @@ static void InvertedRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9180,8 +9004,7 @@ static void InvertedRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9199,8 +9022,7 @@ static void InvertedRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9218,9 +9040,7 @@ static void InvertedRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9267,9 +9087,7 @@ static void InvertedRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9286,8 +9104,7 @@ static void InvertedRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9305,8 +9122,7 @@ static void InvertedRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9325,8 +9141,8 @@ static void InvertedRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9377,9 +9193,7 @@ static void InvertedRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9396,8 +9210,7 @@ static void InvertedRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9415,8 +9228,7 @@ static void InvertedRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9435,8 +9247,8 @@ static void InvertedRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9563,8 +9375,8 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -9597,8 +9409,8 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -9631,8 +9443,7 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -9665,8 +9476,8 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -9711,8 +9522,8 @@ static void InvertedRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -9815,8 +9626,8 @@ static void InvertedRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -9849,8 +9660,8 @@ static void InvertedRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -9882,9 +9693,7 @@ static void InvertedRCTrackRightLargeHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -9917,8 +9726,8 @@ static void InvertedRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -9963,8 +9772,8 @@ static void InvertedRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -10052,8 +9861,8 @@ static void InvertedRCTrackLeftBankedQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -10096,8 +9905,8 @@ static void InvertedRCTrackLeftBankedQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -10149,8 +9958,8 @@ static void InvertedRCTrackRightBankedQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -10193,8 +10002,8 @@ static void InvertedRCTrackRightBankedQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -10266,8 +10075,8 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -10306,8 +10115,8 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -10335,9 +10144,7 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -10369,8 +10176,8 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -10400,8 +10207,8 @@ static void InvertedRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -10453,8 +10260,8 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -10493,8 +10300,8 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -10522,8 +10329,7 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -10555,8 +10361,8 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -10586,8 +10392,8 @@ static void InvertedRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( diff --git a/src/openrct2/paint/track/coaster/JuniorRollerCoaster.cpp b/src/openrct2/paint/track/coaster/JuniorRollerCoaster.cpp index fb9660209d..99f55906a9 100644 --- a/src/openrct2/paint/track/coaster/JuniorRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/JuniorRollerCoaster.cpp @@ -1876,7 +1876,7 @@ static void JuniorRCPaintTrackFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -1888,18 +1888,10 @@ static void JuniorRCPaintStation( { ImageId imageId; - bool isBraked = trackElement.IsBrakeClosed(); - auto stationObj = ride.GetStationObject(); + const bool isBraked = trackElement.IsBrakeClosed(); if (direction == 0 || direction == 2) { - if (stationObj != nullptr && !(stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) - { - // height -= 2 (height - 2) - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); - } - // height += 2 (height) if (trackElement.GetTrackType() == TrackElemType::EndStation && TSubType == JuniorRCSubType::Junior) { @@ -1909,17 +1901,10 @@ static void JuniorRCPaintStation( { imageId = session.TrackColours.WithIndex(junior_rc_track_pieces_station[false][direction]); } - PaintAddImageAsChild(session, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 1 } }); + PaintAddImageAsParent(session, imageId, { 0, 6, height }, { { 0, 6, height + 1 }, { 32, 20, 1 } }); } else if (direction == 1 || direction == 3) { - if (stationObj != nullptr && !(stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) - { - // height -= 2 (height - 2) - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); - } - // height += 2 (height) if (trackElement.GetTrackType() == TrackElemType::EndStation && TSubType == JuniorRCSubType::Junior) { @@ -1929,13 +1914,19 @@ static void JuniorRCPaintStation( { imageId = session.TrackColours.WithIndex(junior_rc_track_pieces_station[false][direction]); } - PaintAddImageAsChild(session, imageId, { 6, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); + PaintAddImageAsParent(session, imageId, { 6, 0, height }, { { 0, 6, height + 1 }, { 20, 32, 1 } }); } - - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); TrackPaintUtilDrawStationTunnel(session, direction, height); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1964,7 +1955,7 @@ static void JuniorRCPaintTrack25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); } @@ -1997,7 +1988,7 @@ static void JuniorRCPaintTrackFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); } @@ -2042,7 +2033,7 @@ static void JuniorRCPaintTrack25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); } @@ -2103,9 +2094,7 @@ static void JuniorRCRightQuarterTurn5TilesPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right), direction), 0xFFFF, 0); break; @@ -2114,8 +2103,8 @@ static void JuniorRCRightQuarterTurn5TilesPaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -2123,8 +2112,7 @@ static void JuniorRCRightQuarterTurn5TilesPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre), direction), 0xFFFF, 0); break; @@ -2133,8 +2121,8 @@ static void JuniorRCRightQuarterTurn5TilesPaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -2142,9 +2130,7 @@ static void JuniorRCRightQuarterTurn5TilesPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left), direction), 0xFFFF, 0); break; @@ -2213,7 +2199,7 @@ static void JuniorRCFlatToLeftBankPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -2264,7 +2250,7 @@ static void JuniorRCFlatToRightBankPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -2411,9 +2397,7 @@ static void JuniorRCBankedRightQuarterTurn5TilesPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right), direction), 0xFFFF, 0); break; @@ -2422,8 +2406,8 @@ static void JuniorRCBankedRightQuarterTurn5TilesPaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -2431,8 +2415,7 @@ static void JuniorRCBankedRightQuarterTurn5TilesPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre), direction), 0xFFFF, 0); break; @@ -2441,8 +2424,8 @@ static void JuniorRCBankedRightQuarterTurn5TilesPaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -2450,9 +2433,7 @@ static void JuniorRCBankedRightQuarterTurn5TilesPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left), direction), 0xFFFF, 0); break; @@ -2529,7 +2510,7 @@ static void JuniorRCLeftBankTo25DegUpPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); } @@ -2592,7 +2573,7 @@ static void JuniorRCRightBankTo25DegUpPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); } @@ -2656,7 +2637,7 @@ static void JuniorRC25DegUpToLeftBankPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); } @@ -2720,7 +2701,7 @@ static void JuniorRC25DegUpToRightBankPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); } @@ -2811,7 +2792,7 @@ static void JuniorRCLeftBankPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -2874,9 +2855,7 @@ static void JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::topCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::top), direction), 0xFFFF, 0); break; @@ -2885,8 +2864,8 @@ static void JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topCorner, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::top, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -2894,9 +2873,7 @@ static void JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::rightCorner, PaintSegment::topRightSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::bottomRight, PaintSegment::right, PaintSegment::topRight, PaintSegment::centre), direction), 0xFFFF, 0); break; @@ -2905,8 +2882,8 @@ static void JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -2914,9 +2891,7 @@ static void JuniorRCPaintTrackLeftQuarterTurn5Tiles25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomCorner), + EnumsToFlags(PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottom), direction), 0xFFFF, 0); break; @@ -2979,9 +2954,7 @@ static void JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right), direction), 0xFFFF, 0); break; @@ -2990,8 +2963,8 @@ static void JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -2999,8 +2972,7 @@ static void JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre), direction), 0xFFFF, 0); break; @@ -3009,8 +2981,8 @@ static void JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -3018,9 +2990,7 @@ static void JuniorRCPaintTrackRightQuarterTurn5Tiles25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left), direction), 0xFFFF, 0); break; @@ -3126,21 +3096,21 @@ static void JuniorRCSBendLeftPaintSetup( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::top); break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, (direction & 1)), 0xFFFF, 0); @@ -3220,21 +3190,21 @@ static void JuniorRCSBendRightPaintSetup( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, (direction & 1)), 0xFFFF, 0); @@ -3270,15 +3240,15 @@ static void JuniorRCRightQuarterTurn3TilesPaintSetup( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::leftCorner); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -3389,15 +3359,15 @@ static void JuniorRCRightQuarterTurn3TilesBankPaintSetup( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::leftCorner); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -3474,11 +3444,11 @@ static void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegUp( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::leftCorner); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -3558,11 +3528,11 @@ static void JuniorRCPaintTrackRightQuarterTurn3Tiles25DegDown( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::leftCorner); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -3664,17 +3634,17 @@ static void JuniorRCRightHalfBankedHelixUpSmallPaintSetup( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner, - PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right, + PaintSegment::bottomRight); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::leftCorner); + PaintSegment::bottomLeft, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -3735,17 +3705,17 @@ static void JuniorRCRightHalfBankedHelixDownSmallPaintSetup( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner, - PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right, + PaintSegment::bottomRight); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::leftCorner); + PaintSegment::bottomLeft, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -3840,8 +3810,8 @@ static void JuniorRCRightHalfBankedHelixUpLargePaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::rightCorner), + PaintSegment::bottomLeft, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::right), direction), 0xFFFF, 0); break; @@ -3850,8 +3820,8 @@ static void JuniorRCRightHalfBankedHelixUpLargePaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -3859,8 +3829,7 @@ static void JuniorRCRightHalfBankedHelixUpLargePaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre), direction), 0xFFFF, 0); break; @@ -3869,8 +3838,8 @@ static void JuniorRCRightHalfBankedHelixUpLargePaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -3879,8 +3848,8 @@ static void JuniorRCRightHalfBankedHelixUpLargePaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::leftCorner), + PaintSegment::bottomLeft, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::left), direction), 0xFFFF, 0); break; @@ -3945,8 +3914,8 @@ static void JuniorRCRightHalfBankedHelixDownLargePaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::rightCorner), + PaintSegment::bottomLeft, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::right), direction), 0xFFFF, 0); break; @@ -3955,8 +3924,8 @@ static void JuniorRCRightHalfBankedHelixDownLargePaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -3964,8 +3933,7 @@ static void JuniorRCRightHalfBankedHelixDownLargePaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre), direction), 0xFFFF, 0); break; @@ -3974,8 +3942,8 @@ static void JuniorRCRightHalfBankedHelixDownLargePaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -3984,8 +3952,8 @@ static void JuniorRCRightHalfBankedHelixDownLargePaintSetup( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::leftCorner), + PaintSegment::bottomLeft, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::left), direction), 0xFFFF, 0); break; @@ -4058,7 +4026,7 @@ static void JuniorRCBrakePaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -4097,7 +4065,7 @@ static void JuniorRCBlockBrakePaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -4138,26 +4106,26 @@ static void JuniorRCLeftEighthToDiagPaintSetup( switch (trackSequence) { case 0: - blockedSegments = EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide); + blockedSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight); break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide, - PaintSegment::rightCorner); + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, PaintSegment::bottomRight, + PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::leftCorner, PaintSegment::topLeftSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::left, PaintSegment::topLeft); break; case 4: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::topLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::topLeft, + PaintSegment::bottom, PaintSegment::bottomRight); break; } @@ -4201,26 +4169,25 @@ static void JuniorRCRightEighthToDiagPaintSetup( switch (trackSequence) { case 0: - blockedSegments = EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide); + blockedSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight); break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, PaintSegment::topLeftSide, - PaintSegment::topCorner); + PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, PaintSegment::topLeft, PaintSegment::top); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight); break; case 4: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::bottomRight); break; } @@ -4362,26 +4329,26 @@ static void JuniorRCLeftEighthToDiagBankPaintSetup( switch (trackSequence) { case 0: - blockedSegments = EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide); + blockedSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight); break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide, - PaintSegment::rightCorner); + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, PaintSegment::bottomRight, + PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::leftCorner, PaintSegment::topLeftSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::left, PaintSegment::topLeft); break; case 4: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::topLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::topLeft, + PaintSegment::bottom, PaintSegment::bottomRight); break; } @@ -4505,26 +4472,25 @@ static void JuniorRCRightEighthToDiagBankPaintSetup( switch (trackSequence) { case 0: - blockedSegments = EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide); + blockedSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight); break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, PaintSegment::topLeftSide, - PaintSegment::topCorner); + PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, PaintSegment::topLeft, PaintSegment::top); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight); break; case 4: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::bottomRight); break; } @@ -5251,7 +5217,7 @@ static void JuniorRCPaintTrack60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); } @@ -5337,7 +5303,7 @@ static void JuniorRCPaintTrack25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); } @@ -5400,7 +5366,7 @@ static void JuniorRCPaintTrack60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); } @@ -5650,7 +5616,7 @@ static void JuniorRCFlatTo60DegUpPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); } @@ -5711,7 +5677,7 @@ static void JuniorRC60DegUpToFlatPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); } @@ -5782,7 +5748,7 @@ static void JuniorRCBoosterPaintSetup( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } diff --git a/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp b/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp index 9b2bec1040..732167cb2b 100644 --- a/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp +++ b/src/openrct2/paint/track/coaster/LatticeTriangleTrack.cpp @@ -176,11 +176,11 @@ static void LatticeTriangleTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][2] = { - { 18084, SPR_STATION_BASE_A_SW_NE }, - { 18085, SPR_STATION_BASE_A_NW_SE }, - { 18084, SPR_STATION_BASE_A_SW_NE }, - { 18085, SPR_STATION_BASE_A_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + 18084, + 18085, + 18084, + 18085, }; if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -193,14 +193,18 @@ static void LatticeTriangleTrackStation( else { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); + if (TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::a, 0, 9, 11)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -869,9 +873,7 @@ static void LatticeTriangleTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -907,8 +909,8 @@ static void LatticeTriangleTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -940,9 +942,7 @@ static void LatticeTriangleTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -978,8 +978,8 @@ static void LatticeTriangleTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1021,9 +1021,7 @@ static void LatticeTriangleTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1254,9 +1252,7 @@ static void LatticeTriangleTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1292,8 +1288,8 @@ static void LatticeTriangleTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1325,9 +1321,7 @@ static void LatticeTriangleTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1363,8 +1357,8 @@ static void LatticeTriangleTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1409,9 +1403,7 @@ static void LatticeTriangleTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1747,9 +1739,7 @@ static void LatticeTriangleTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1783,8 +1773,8 @@ static void LatticeTriangleTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1815,9 +1805,7 @@ static void LatticeTriangleTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1851,8 +1839,8 @@ static void LatticeTriangleTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1894,9 +1882,7 @@ static void LatticeTriangleTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1943,9 +1929,7 @@ static void LatticeTriangleTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1979,8 +1963,8 @@ static void LatticeTriangleTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2011,8 +1995,7 @@ static void LatticeTriangleTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2046,8 +2029,8 @@ static void LatticeTriangleTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2089,9 +2072,7 @@ static void LatticeTriangleTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2158,9 +2139,7 @@ static void LatticeTriangleTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2192,8 +2171,8 @@ static void LatticeTriangleTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2225,8 +2204,8 @@ static void LatticeTriangleTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2268,9 +2247,7 @@ static void LatticeTriangleTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2317,9 +2294,7 @@ static void LatticeTriangleTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2351,8 +2326,8 @@ static void LatticeTriangleTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2384,8 +2359,8 @@ static void LatticeTriangleTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2427,9 +2402,7 @@ static void LatticeTriangleTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2476,9 +2449,7 @@ static void LatticeTriangleTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2513,9 +2484,7 @@ static void LatticeTriangleTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2557,9 +2526,7 @@ static void LatticeTriangleTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2618,9 +2585,7 @@ static void LatticeTriangleTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2655,9 +2620,7 @@ static void LatticeTriangleTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2702,9 +2665,7 @@ static void LatticeTriangleTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2757,9 +2718,7 @@ static void LatticeTriangleTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2803,9 +2762,7 @@ static void LatticeTriangleTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2848,9 +2805,7 @@ static void LatticeTriangleTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2901,9 +2856,7 @@ static void LatticeTriangleTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2974,8 +2927,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3010,9 +2963,7 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3058,8 +3009,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3105,8 +3056,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3142,8 +3093,7 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3184,8 +3134,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3236,8 +3186,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3273,8 +3223,7 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3320,8 +3269,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3367,8 +3316,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3403,9 +3352,7 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3446,8 +3393,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3528,8 +3475,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3565,8 +3512,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3598,9 +3545,7 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3636,8 +3581,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3683,8 +3628,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3730,8 +3675,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3767,8 +3712,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3800,8 +3745,7 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3837,8 +3781,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3879,8 +3823,8 @@ static void LatticeTriangleTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3931,8 +3875,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3968,8 +3912,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4001,8 +3945,7 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4038,8 +3981,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4092,8 +4035,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4139,8 +4082,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4176,8 +4119,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4209,9 +4152,7 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4247,8 +4188,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4296,8 +4237,8 @@ static void LatticeTriangleTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5330,8 +5271,8 @@ static void LatticeTriangleTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5364,8 +5305,8 @@ static void LatticeTriangleTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5374,9 +5315,7 @@ static void LatticeTriangleTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5417,8 +5356,8 @@ static void LatticeTriangleTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5494,8 +5433,8 @@ static void LatticeTriangleTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5528,8 +5467,8 @@ static void LatticeTriangleTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5539,8 +5478,7 @@ static void LatticeTriangleTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5581,8 +5519,8 @@ static void LatticeTriangleTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5676,8 +5614,8 @@ static void LatticeTriangleTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5710,8 +5648,8 @@ static void LatticeTriangleTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5720,9 +5658,7 @@ static void LatticeTriangleTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5763,8 +5699,8 @@ static void LatticeTriangleTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5840,8 +5776,8 @@ static void LatticeTriangleTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5874,8 +5810,8 @@ static void LatticeTriangleTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5885,8 +5821,7 @@ static void LatticeTriangleTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5927,8 +5862,8 @@ static void LatticeTriangleTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6003,9 +5938,7 @@ static void LatticeTriangleTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6036,8 +5969,7 @@ static void LatticeTriangleTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6069,8 +6001,7 @@ static void LatticeTriangleTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6129,9 +6060,7 @@ static void LatticeTriangleTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6158,9 +6087,7 @@ static void LatticeTriangleTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6177,8 +6104,7 @@ static void LatticeTriangleTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6196,8 +6122,7 @@ static void LatticeTriangleTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6228,9 +6153,7 @@ static void LatticeTriangleTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6271,9 +6194,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6304,8 +6225,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6337,8 +6257,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6397,9 +6316,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6426,9 +6343,7 @@ static void LatticeTriangleTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6445,8 +6360,7 @@ static void LatticeTriangleTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6464,8 +6378,7 @@ static void LatticeTriangleTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6496,9 +6409,7 @@ static void LatticeTriangleTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6525,9 +6436,7 @@ static void LatticeTriangleTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6544,8 +6453,7 @@ static void LatticeTriangleTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6563,8 +6471,7 @@ static void LatticeTriangleTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6595,9 +6502,7 @@ static void LatticeTriangleTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6638,9 +6543,7 @@ static void LatticeTriangleTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6671,8 +6574,7 @@ static void LatticeTriangleTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6704,8 +6606,7 @@ static void LatticeTriangleTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6764,9 +6665,7 @@ static void LatticeTriangleTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6807,9 +6706,7 @@ static void LatticeTriangleTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6840,8 +6737,7 @@ static void LatticeTriangleTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6873,8 +6769,7 @@ static void LatticeTriangleTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6933,9 +6828,7 @@ static void LatticeTriangleTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6962,9 +6855,7 @@ static void LatticeTriangleTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6981,8 +6872,7 @@ static void LatticeTriangleTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7000,8 +6890,7 @@ static void LatticeTriangleTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7032,9 +6921,7 @@ static void LatticeTriangleTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7075,9 +6962,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7107,8 +6992,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -7139,8 +7023,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7198,9 +7081,7 @@ static void LatticeTriangleTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -7228,9 +7109,7 @@ static void LatticeTriangleTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7247,8 +7126,7 @@ static void LatticeTriangleTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7266,8 +7144,7 @@ static void LatticeTriangleTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7298,9 +7175,7 @@ static void LatticeTriangleTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7327,9 +7202,7 @@ static void LatticeTriangleTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7346,8 +7219,7 @@ static void LatticeTriangleTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7365,8 +7237,7 @@ static void LatticeTriangleTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7397,9 +7268,7 @@ static void LatticeTriangleTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7440,9 +7309,7 @@ static void LatticeTriangleTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7473,8 +7340,7 @@ static void LatticeTriangleTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7506,8 +7372,7 @@ static void LatticeTriangleTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7566,9 +7431,7 @@ static void LatticeTriangleTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7595,9 +7458,7 @@ static void LatticeTriangleTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7617,8 +7478,7 @@ static void LatticeTriangleTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7636,8 +7496,7 @@ static void LatticeTriangleTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7668,9 +7527,7 @@ static void LatticeTriangleTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7697,9 +7554,7 @@ static void LatticeTriangleTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7716,8 +7571,7 @@ static void LatticeTriangleTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7738,8 +7592,7 @@ static void LatticeTriangleTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7770,9 +7623,7 @@ static void LatticeTriangleTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7799,9 +7650,7 @@ static void LatticeTriangleTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7821,8 +7670,7 @@ static void LatticeTriangleTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7840,8 +7688,7 @@ static void LatticeTriangleTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7872,9 +7719,7 @@ static void LatticeTriangleTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7901,9 +7746,7 @@ static void LatticeTriangleTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7920,8 +7763,7 @@ static void LatticeTriangleTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7942,8 +7784,7 @@ static void LatticeTriangleTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7974,9 +7815,7 @@ static void LatticeTriangleTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8003,9 +7842,7 @@ static void LatticeTriangleTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8025,8 +7862,7 @@ static void LatticeTriangleTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8044,8 +7880,7 @@ static void LatticeTriangleTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8076,9 +7911,7 @@ static void LatticeTriangleTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8105,9 +7938,7 @@ static void LatticeTriangleTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8124,8 +7955,7 @@ static void LatticeTriangleTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8146,8 +7976,7 @@ static void LatticeTriangleTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8178,9 +8007,7 @@ static void LatticeTriangleTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8207,9 +8034,7 @@ static void LatticeTriangleTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8229,8 +8054,7 @@ static void LatticeTriangleTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8248,8 +8072,7 @@ static void LatticeTriangleTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8280,9 +8103,7 @@ static void LatticeTriangleTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8309,9 +8130,7 @@ static void LatticeTriangleTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8328,8 +8147,7 @@ static void LatticeTriangleTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8350,8 +8168,7 @@ static void LatticeTriangleTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8382,9 +8199,7 @@ static void LatticeTriangleTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8411,9 +8226,7 @@ static void LatticeTriangleTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8432,8 +8245,7 @@ static void LatticeTriangleTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -8450,8 +8262,7 @@ static void LatticeTriangleTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8481,9 +8292,7 @@ static void LatticeTriangleTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -8511,9 +8320,7 @@ static void LatticeTriangleTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8529,8 +8336,7 @@ static void LatticeTriangleTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -8550,8 +8356,7 @@ static void LatticeTriangleTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8581,9 +8386,7 @@ static void LatticeTriangleTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -8611,9 +8414,7 @@ static void LatticeTriangleTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8633,8 +8434,7 @@ static void LatticeTriangleTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8652,8 +8452,7 @@ static void LatticeTriangleTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8684,9 +8483,7 @@ static void LatticeTriangleTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8713,9 +8510,7 @@ static void LatticeTriangleTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8732,8 +8527,7 @@ static void LatticeTriangleTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8754,8 +8548,7 @@ static void LatticeTriangleTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8786,9 +8579,7 @@ static void LatticeTriangleTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8815,9 +8606,7 @@ static void LatticeTriangleTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8834,8 +8623,7 @@ static void LatticeTriangleTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8853,8 +8641,7 @@ static void LatticeTriangleTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8885,9 +8672,7 @@ static void LatticeTriangleTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8914,9 +8699,7 @@ static void LatticeTriangleTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8933,8 +8716,7 @@ static void LatticeTriangleTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8952,8 +8734,7 @@ static void LatticeTriangleTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8984,9 +8765,7 @@ static void LatticeTriangleTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9052,9 +8831,7 @@ static void LatticeTriangleTrackLeftBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9100,9 +8877,7 @@ static void LatticeTriangleTrackLeftBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9146,9 +8921,7 @@ static void LatticeTriangleTrackRightBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9201,9 +8974,7 @@ static void LatticeTriangleTrackRightBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9270,9 +9041,7 @@ static void LatticeTriangleTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9307,8 +9076,8 @@ static void LatticeTriangleTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9339,9 +9108,7 @@ static void LatticeTriangleTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9377,8 +9144,8 @@ static void LatticeTriangleTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9420,9 +9187,7 @@ static void LatticeTriangleTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9469,9 +9234,7 @@ static void LatticeTriangleTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9506,8 +9269,8 @@ static void LatticeTriangleTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9538,8 +9301,7 @@ static void LatticeTriangleTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9575,8 +9337,8 @@ static void LatticeTriangleTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9618,9 +9380,7 @@ static void LatticeTriangleTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10712,8 +10472,8 @@ static void LatticeTriangleTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10758,8 +10518,8 @@ static void LatticeTriangleTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10813,8 +10573,8 @@ static void LatticeTriangleTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10880,8 +10640,8 @@ static void LatticeTriangleTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10926,8 +10686,8 @@ static void LatticeTriangleTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10981,8 +10741,8 @@ static void LatticeTriangleTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11108,8 +10868,8 @@ static void LatticeTriangleTrackHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -11202,8 +10962,8 @@ static void LatticeTriangleTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -11244,8 +11004,8 @@ static void LatticeTriangleTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11277,9 +11037,7 @@ static void LatticeTriangleTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -11312,8 +11070,8 @@ static void LatticeTriangleTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11352,8 +11110,8 @@ static void LatticeTriangleTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11385,9 +11143,7 @@ static void LatticeTriangleTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -11428,8 +11184,8 @@ static void LatticeTriangleTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11479,8 +11235,8 @@ static void LatticeTriangleTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -11790,8 +11546,8 @@ static void LatticeTriangleTrackLeftCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11852,8 +11608,8 @@ static void LatticeTriangleTrackLeftCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -11919,8 +11675,8 @@ static void LatticeTriangleTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11981,8 +11737,8 @@ static void LatticeTriangleTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -12060,8 +11816,8 @@ static void LatticeTriangleTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -12104,8 +11860,8 @@ static void LatticeTriangleTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12139,9 +11895,7 @@ static void LatticeTriangleTrackLeftLargeCorkscrewUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12154,8 +11908,8 @@ static void LatticeTriangleTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -12225,8 +11979,8 @@ static void LatticeTriangleTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -12288,8 +12042,8 @@ static void LatticeTriangleTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::rightCorner, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::right, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -12334,8 +12088,8 @@ static void LatticeTriangleTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomRightSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12372,8 +12126,7 @@ static void LatticeTriangleTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12386,8 +12139,8 @@ static void LatticeTriangleTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -12460,8 +12213,8 @@ static void LatticeTriangleTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -12572,8 +12325,8 @@ static void LatticeTriangleTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12617,9 +12370,7 @@ static void LatticeTriangleTrackLeftMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12656,8 +12407,7 @@ static void LatticeTriangleTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12695,8 +12445,8 @@ static void LatticeTriangleTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); @@ -12787,8 +12537,8 @@ static void LatticeTriangleTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12833,8 +12583,7 @@ static void LatticeTriangleTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12871,9 +12620,7 @@ static void LatticeTriangleTrackRightMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12911,8 +12658,8 @@ static void LatticeTriangleTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); if (direction == 0 || direction == 3) @@ -13019,8 +12766,8 @@ static void LatticeTriangleTrackLeftZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -13068,8 +12815,8 @@ static void LatticeTriangleTrackLeftZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -13159,8 +12906,8 @@ static void LatticeTriangleTrackRightZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -13208,8 +12955,8 @@ static void LatticeTriangleTrackRightZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -13354,8 +13101,8 @@ static void LatticeTriangleTrackLeftLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13365,8 +13112,8 @@ static void LatticeTriangleTrackLeftLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -13542,8 +13289,8 @@ static void LatticeTriangleTrackRightLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13553,8 +13300,8 @@ static void LatticeTriangleTrackRightLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -13659,7 +13406,7 @@ static void LatticeTriangleTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -13690,7 +13437,7 @@ static void LatticeTriangleTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -13725,7 +13472,7 @@ static void LatticeTriangleTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -13786,9 +13533,7 @@ static void LatticeTriangleTrackLeftBankToLeftQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13841,9 +13586,7 @@ static void LatticeTriangleTrackLeftBankToLeftQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13897,9 +13640,7 @@ static void LatticeTriangleTrackRightBankToRightQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13952,9 +13693,7 @@ static void LatticeTriangleTrackRightBankToRightQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14005,9 +13744,7 @@ static void LatticeTriangleTrackLeftQuarterTurn3Tile25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14063,9 +13800,7 @@ static void LatticeTriangleTrackLeftQuarterTurn3Tile25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14116,9 +13851,7 @@ static void LatticeTriangleTrackRightQuarterTurn3Tile25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14174,9 +13907,7 @@ static void LatticeTriangleTrackRightQuarterTurn3Tile25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14293,8 +14024,8 @@ static void LatticeTriangleTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -14338,8 +14069,8 @@ static void LatticeTriangleTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -14375,8 +14106,7 @@ static void LatticeTriangleTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -14412,8 +14142,8 @@ static void LatticeTriangleTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -14453,8 +14183,8 @@ static void LatticeTriangleTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -14577,8 +14307,8 @@ static void LatticeTriangleTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -14623,8 +14353,8 @@ static void LatticeTriangleTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -14660,9 +14390,7 @@ static void LatticeTriangleTrackRightLargeHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -14699,8 +14427,8 @@ static void LatticeTriangleTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -14741,8 +14469,8 @@ static void LatticeTriangleTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -14889,9 +14617,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14909,8 +14635,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14929,8 +14654,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14962,9 +14686,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14991,9 +14713,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15011,8 +14731,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15031,8 +14750,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15064,9 +14782,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15093,9 +14809,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15113,8 +14827,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15133,8 +14846,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15166,9 +14878,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15195,9 +14905,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -15215,8 +14923,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -15235,8 +14942,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -15268,9 +14974,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -15353,8 +15057,8 @@ static void LatticeTriangleTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15391,8 +15095,8 @@ static void LatticeTriangleTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15401,9 +15105,7 @@ static void LatticeTriangleTrackLeftEighthToDiagUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15448,8 +15150,8 @@ static void LatticeTriangleTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15532,8 +15234,8 @@ static void LatticeTriangleTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15570,8 +15272,8 @@ static void LatticeTriangleTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15581,8 +15283,7 @@ static void LatticeTriangleTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15627,8 +15328,8 @@ static void LatticeTriangleTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15682,8 +15383,8 @@ static void LatticeTriangleTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15720,8 +15421,8 @@ static void LatticeTriangleTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15730,8 +15431,7 @@ static void LatticeTriangleTrackLeftEighthToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15768,8 +15468,8 @@ static void LatticeTriangleTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15862,8 +15562,8 @@ static void LatticeTriangleTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15900,8 +15600,8 @@ static void LatticeTriangleTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15911,8 +15611,7 @@ static void LatticeTriangleTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15949,8 +15648,8 @@ static void LatticeTriangleTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15991,7 +15690,7 @@ static void LatticeTriangleTrackRightEighthToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -16055,9 +15754,7 @@ static void LatticeTriangleTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16079,8 +15776,7 @@ static void LatticeTriangleTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16099,8 +15795,7 @@ static void LatticeTriangleTrackDiagUp25ToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16132,9 +15827,7 @@ static void LatticeTriangleTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16161,9 +15854,7 @@ static void LatticeTriangleTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16181,8 +15872,7 @@ static void LatticeTriangleTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16205,8 +15895,7 @@ static void LatticeTriangleTrackDiagUp25ToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16238,9 +15927,7 @@ static void LatticeTriangleTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16267,9 +15954,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16291,8 +15976,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16311,8 +15995,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16344,9 +16027,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16373,9 +16054,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16393,8 +16072,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16417,8 +16095,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16450,9 +16127,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16511,9 +16186,7 @@ static void LatticeTriangleTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16531,8 +16204,7 @@ static void LatticeTriangleTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16551,8 +16223,7 @@ static void LatticeTriangleTrackDiagLeftBankedFlatToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16584,9 +16255,7 @@ static void LatticeTriangleTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16613,9 +16282,7 @@ static void LatticeTriangleTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16633,8 +16300,7 @@ static void LatticeTriangleTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16653,8 +16319,7 @@ static void LatticeTriangleTrackDiagRightBankedFlatToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16686,9 +16351,7 @@ static void LatticeTriangleTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16715,9 +16378,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16735,8 +16396,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16755,8 +16415,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToLeftBankedFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16788,9 +16447,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16817,9 +16474,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16837,8 +16492,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16857,8 +16511,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToRightBankedFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16890,9 +16543,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16951,9 +16602,7 @@ static void LatticeTriangleTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16971,8 +16620,7 @@ static void LatticeTriangleTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16991,8 +16639,7 @@ static void LatticeTriangleTrackDiagUp25LeftBanked( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17024,9 +16671,7 @@ static void LatticeTriangleTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17053,9 +16698,7 @@ static void LatticeTriangleTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17073,8 +16716,7 @@ static void LatticeTriangleTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17093,8 +16735,7 @@ static void LatticeTriangleTrackDiagUp25RightBanked( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17126,9 +16767,7 @@ static void LatticeTriangleTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17171,9 +16810,7 @@ static void LatticeTriangleTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17195,8 +16832,7 @@ static void LatticeTriangleTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17215,8 +16851,7 @@ static void LatticeTriangleTrackDiagFlatToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17248,9 +16883,7 @@ static void LatticeTriangleTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17277,9 +16910,7 @@ static void LatticeTriangleTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17297,8 +16928,7 @@ static void LatticeTriangleTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17321,8 +16951,7 @@ static void LatticeTriangleTrackDiagFlatToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17354,9 +16983,7 @@ static void LatticeTriangleTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17383,9 +17010,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17407,8 +17032,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17427,8 +17051,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17460,9 +17083,7 @@ static void LatticeTriangleTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17489,9 +17110,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17509,8 +17128,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17533,8 +17151,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17566,9 +17183,7 @@ static void LatticeTriangleTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17690,8 +17305,8 @@ static void LatticeTriangleTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17728,8 +17343,8 @@ static void LatticeTriangleTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17738,9 +17353,7 @@ static void LatticeTriangleTrackLeftEighthBankToDiagUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17785,8 +17398,8 @@ static void LatticeTriangleTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17876,8 +17489,8 @@ static void LatticeTriangleTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17914,8 +17527,8 @@ static void LatticeTriangleTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17925,8 +17538,7 @@ static void LatticeTriangleTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17971,8 +17583,8 @@ static void LatticeTriangleTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18026,8 +17638,8 @@ static void LatticeTriangleTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18064,8 +17676,8 @@ static void LatticeTriangleTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18074,8 +17686,7 @@ static void LatticeTriangleTrackLeftEighthBankToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18112,8 +17723,8 @@ static void LatticeTriangleTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18211,8 +17822,8 @@ static void LatticeTriangleTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18249,8 +17860,8 @@ static void LatticeTriangleTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18260,8 +17871,7 @@ static void LatticeTriangleTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18298,8 +17908,8 @@ static void LatticeTriangleTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18347,7 +17957,7 @@ static void LatticeTriangleTrackRightEighthBankToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -18453,9 +18063,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32); @@ -18473,8 +18081,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18493,8 +18100,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18531,8 +18137,8 @@ static void LatticeTriangleTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -18550,8 +18156,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18570,8 +18175,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18608,8 +18212,8 @@ static void LatticeTriangleTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -18627,8 +18231,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -18647,8 +18250,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -18680,9 +18282,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 136); @@ -18709,9 +18309,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -18729,8 +18327,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -18749,8 +18346,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -18787,8 +18383,8 @@ static void LatticeTriangleTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -18806,8 +18402,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -18826,8 +18421,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -18864,8 +18458,8 @@ static void LatticeTriangleTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -18883,8 +18477,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -18903,8 +18496,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -18936,9 +18528,7 @@ static void LatticeTriangleTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -18965,9 +18555,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -18985,8 +18573,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19005,8 +18592,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19043,8 +18629,8 @@ static void LatticeTriangleTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19062,8 +18648,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19082,8 +18667,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19120,8 +18704,8 @@ static void LatticeTriangleTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -19139,8 +18723,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -19159,8 +18742,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -19192,9 +18774,7 @@ static void LatticeTriangleTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19221,9 +18801,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 136); @@ -19241,8 +18819,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19261,8 +18838,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19299,8 +18875,8 @@ static void LatticeTriangleTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19318,8 +18894,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -19338,8 +18913,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -19376,8 +18950,8 @@ static void LatticeTriangleTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19395,8 +18969,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -19415,8 +18988,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -19448,9 +19020,7 @@ static void LatticeTriangleTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32); @@ -19481,9 +19051,7 @@ static void LatticeTriangleTrackLeftEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19500,8 +19068,7 @@ static void LatticeTriangleTrackLeftEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19519,8 +19086,7 @@ static void LatticeTriangleTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19561,8 +19127,8 @@ static void LatticeTriangleTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -19595,8 +19161,8 @@ static void LatticeTriangleTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -19606,8 +19172,8 @@ static void LatticeTriangleTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -19669,9 +19235,7 @@ static void LatticeTriangleTrackRightEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19689,8 +19253,7 @@ static void LatticeTriangleTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19707,8 +19270,7 @@ static void LatticeTriangleTrackRightEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19749,8 +19311,8 @@ static void LatticeTriangleTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -19783,8 +19345,8 @@ static void LatticeTriangleTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -19794,8 +19356,8 @@ static void LatticeTriangleTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) diff --git a/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp b/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp index 85b2d50775..3f2d00e7f7 100644 --- a/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp +++ b/src/openrct2/paint/track/coaster/LatticeTriangleTrackAlt.cpp @@ -44,31 +44,27 @@ static void LatticeTriangleTrackAltStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (ride.mode == RideMode::PoweredLaunch || ride.mode == RideMode::PoweredLaunchBlockSectioned - || ride.mode == RideMode::PoweredLaunchPasstrough) + if (ride.mode == RideMode::poweredLaunch || ride.mode == RideMode::poweredLaunchBlockSectioned + || ride.mode == RideMode::poweredLaunchPasstrough) { - static constexpr uint32_t imageIds[4][2] = { - { SPR_G2_LATTICE_TRIANGLE_TRACK_BOOSTER_ALT_NE_SW, SPR_STATION_BASE_A_SW_NE }, - { SPR_G2_LATTICE_TRIANGLE_TRACK_BOOSTER_ALT_NW_SE, SPR_STATION_BASE_A_NW_SE }, - { SPR_G2_LATTICE_TRIANGLE_TRACK_BOOSTER_ALT_SW_NE, SPR_STATION_BASE_A_SW_NE }, - { SPR_G2_LATTICE_TRIANGLE_TRACK_BOOSTER_ALT_SE_NW, SPR_STATION_BASE_A_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + SPR_G2_LATTICE_TRIANGLE_TRACK_BOOSTER_ALT_NE_SW, + SPR_G2_LATTICE_TRIANGLE_TRACK_BOOSTER_ALT_NW_SE, + SPR_G2_LATTICE_TRIANGLE_TRACK_BOOSTER_ALT_SW_NE, + SPR_G2_LATTICE_TRIANGLE_TRACK_BOOSTER_ALT_SE_NW, }; PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), - { 0, 0, height }, { 32, 32, 1 }); } else { - static constexpr uint32_t imageIds[4][2] = { - { SPR_G2_LATTICE_TRIANGLE_TRACK_DRIVE_TYRE_NE_SW, SPR_STATION_BASE_A_SW_NE }, - { SPR_G2_LATTICE_TRIANGLE_TRACK_DRIVE_TYRE_NW_SE, SPR_STATION_BASE_A_NW_SE }, - { SPR_G2_LATTICE_TRIANGLE_TRACK_DRIVE_TYRE_SW_NE, SPR_STATION_BASE_A_SW_NE }, - { SPR_G2_LATTICE_TRIANGLE_TRACK_DRIVE_TYRE_SE_NW, SPR_STATION_BASE_A_NW_SE }, + static constexpr uint32_t imageIds[4] = { + SPR_G2_LATTICE_TRIANGLE_TRACK_DRIVE_TYRE_NE_SW, + SPR_G2_LATTICE_TRIANGLE_TRACK_DRIVE_TYRE_NW_SE, + SPR_G2_LATTICE_TRIANGLE_TRACK_DRIVE_TYRE_SW_NE, + SPR_G2_LATTICE_TRIANGLE_TRACK_DRIVE_TYRE_SE_NW, }; if (trackElement.GetTrackType() == TrackElemType::EndStation) { @@ -80,16 +76,19 @@ static void LatticeTriangleTrackAltStation( else { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } - - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), - { 0, 0, height }, { 32, 32, 1 }); } - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); + if (TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::a, 0, 9, 11)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); diff --git a/src/openrct2/paint/track/coaster/LayDownRollerCoasterInverted.cpp b/src/openrct2/paint/track/coaster/LayDownRollerCoasterInverted.cpp index 2295353f52..510ff2a776 100644 --- a/src/openrct2/paint/track/coaster/LayDownRollerCoasterInverted.cpp +++ b/src/openrct2/paint/track/coaster/LayDownRollerCoasterInverted.cpp @@ -112,24 +112,24 @@ static void LayDownRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, - { SPR_STATION_BASE_C_SW_NE, 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, + { 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, + { 26557, SPR_STATION_INVERTED_BAR_A_SW_NE }, + { 26558, SPR_STATION_INVERTED_BAR_A_NW_SE }, }; - + const bool stationDrawn = TrackPaintUtilDrawStationInverted( + session, ride, direction, height, trackElement, STATION_VARIANT_1); PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height + 24 }, + session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height + 24 }, { { 0, 6, height + 24 }, { 32, 20, 3 } }); - PaintAddImageAsChildRotated( - session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, - { { 0, 6, height + 24 }, { 32, 20, 1 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); + if (stationDrawn) + { + PaintAddImageAsChildRotated( + session, direction, session.SupportColours.WithIndex(imageIds[direction][1]), { 0, 6, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } TrackPaintUtilDrawStationTunnelTall(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -654,8 +654,8 @@ static void LayDownRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -698,8 +698,8 @@ static void LayDownRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -731,9 +731,7 @@ static void LayDownRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -769,8 +767,8 @@ static void LayDownRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -804,8 +802,8 @@ static void LayDownRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -867,8 +865,8 @@ static void LayDownRCTrackFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -914,8 +912,8 @@ static void LayDownRCTrackFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -961,8 +959,8 @@ static void LayDownRCTrackLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1008,8 +1006,8 @@ static void LayDownRCTrackRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1058,8 +1056,8 @@ static void LayDownRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1100,8 +1098,8 @@ static void LayDownRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1132,9 +1130,7 @@ static void LayDownRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1168,8 +1164,8 @@ static void LayDownRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1203,8 +1199,8 @@ static void LayDownRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1266,8 +1262,8 @@ static void LayDownRCTrackLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1337,8 +1333,8 @@ static void LayDownRCTrackRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1408,8 +1404,8 @@ static void LayDownRCTrack25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1479,8 +1475,8 @@ static void LayDownRCTrack25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1582,8 +1578,8 @@ static void LayDownRCTrackLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1636,8 +1632,8 @@ static void LayDownRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1676,8 +1672,8 @@ static void LayDownRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1705,9 +1701,7 @@ static void LayDownRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1739,8 +1733,8 @@ static void LayDownRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1770,8 +1764,8 @@ static void LayDownRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1823,8 +1817,8 @@ static void LayDownRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1863,8 +1857,8 @@ static void LayDownRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1892,8 +1886,7 @@ static void LayDownRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1925,8 +1918,8 @@ static void LayDownRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1956,8 +1949,8 @@ static void LayDownRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2031,9 +2024,7 @@ static void LayDownRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2073,8 +2064,8 @@ static void LayDownRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2110,8 +2101,8 @@ static void LayDownRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2146,9 +2137,7 @@ static void LayDownRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2202,9 +2191,7 @@ static void LayDownRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2244,8 +2231,8 @@ static void LayDownRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2281,8 +2268,8 @@ static void LayDownRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2317,9 +2304,7 @@ static void LayDownRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + kSupportHeight, 0, 0); @@ -2374,8 +2359,8 @@ static void LayDownRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2417,9 +2402,7 @@ static void LayDownRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2453,8 +2436,8 @@ static void LayDownRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2519,8 +2502,8 @@ static void LayDownRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2562,9 +2545,7 @@ static void LayDownRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2598,8 +2579,8 @@ static void LayDownRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2660,8 +2641,8 @@ static void LayDownRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2704,8 +2685,8 @@ static void LayDownRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2757,8 +2738,8 @@ static void LayDownRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2801,8 +2782,8 @@ static void LayDownRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3088,8 +3069,8 @@ static void LayDownRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3122,8 +3103,8 @@ static void LayDownRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3132,9 +3113,7 @@ static void LayDownRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3168,8 +3147,8 @@ static void LayDownRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3272,8 +3251,8 @@ static void LayDownRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3306,8 +3285,8 @@ static void LayDownRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3317,8 +3296,7 @@ static void LayDownRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3352,8 +3330,8 @@ static void LayDownRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3439,8 +3417,7 @@ static void LayDownRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3480,8 +3457,8 @@ static void LayDownRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3514,8 +3491,8 @@ static void LayDownRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3524,9 +3501,7 @@ static void LayDownRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3560,8 +3535,8 @@ static void LayDownRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3628,9 +3603,7 @@ static void LayDownRCTrackRightEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3670,8 +3643,8 @@ static void LayDownRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3704,8 +3677,8 @@ static void LayDownRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3715,8 +3688,7 @@ static void LayDownRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3750,8 +3722,8 @@ static void LayDownRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3901,9 +3873,7 @@ static void LayDownRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3934,8 +3904,7 @@ static void LayDownRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3967,8 +3936,7 @@ static void LayDownRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4000,9 +3968,7 @@ static void LayDownRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4049,9 +4015,7 @@ static void LayDownRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -4068,8 +4032,7 @@ static void LayDownRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -4087,8 +4050,7 @@ static void LayDownRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -4106,9 +4068,7 @@ static void LayDownRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4173,9 +4133,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4206,8 +4164,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4239,8 +4196,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4272,9 +4228,7 @@ static void LayDownRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4321,9 +4275,7 @@ static void LayDownRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4340,8 +4292,7 @@ static void LayDownRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4359,8 +4310,7 @@ static void LayDownRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4378,9 +4328,7 @@ static void LayDownRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4431,9 +4379,7 @@ static void LayDownRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4450,8 +4396,7 @@ static void LayDownRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4469,8 +4414,7 @@ static void LayDownRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4488,9 +4432,7 @@ static void LayDownRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4555,9 +4497,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4588,8 +4528,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4621,8 +4560,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4654,9 +4592,7 @@ static void LayDownRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4703,9 +4639,7 @@ static void LayDownRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4722,8 +4656,7 @@ static void LayDownRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4741,8 +4674,7 @@ static void LayDownRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4760,9 +4692,7 @@ static void LayDownRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4809,9 +4739,7 @@ static void LayDownRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -4828,8 +4756,7 @@ static void LayDownRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -4847,8 +4774,7 @@ static void LayDownRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -4866,9 +4792,7 @@ static void LayDownRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4919,9 +4843,7 @@ static void LayDownRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -4937,8 +4859,7 @@ static void LayDownRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -4955,8 +4876,7 @@ static void LayDownRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -4973,9 +4893,7 @@ static void LayDownRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5022,9 +4940,7 @@ static void LayDownRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5041,8 +4957,7 @@ static void LayDownRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5060,8 +4975,7 @@ static void LayDownRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5079,9 +4993,7 @@ static void LayDownRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5132,9 +5044,7 @@ static void LayDownRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5151,8 +5061,7 @@ static void LayDownRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5170,8 +5079,7 @@ static void LayDownRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5189,9 +5097,7 @@ static void LayDownRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5242,9 +5148,7 @@ static void LayDownRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5261,8 +5165,7 @@ static void LayDownRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5280,8 +5183,7 @@ static void LayDownRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5299,9 +5201,7 @@ static void LayDownRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5348,9 +5248,7 @@ static void LayDownRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5367,8 +5265,7 @@ static void LayDownRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5386,8 +5283,7 @@ static void LayDownRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5406,8 +5302,8 @@ static void LayDownRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5458,9 +5354,7 @@ static void LayDownRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5477,8 +5371,7 @@ static void LayDownRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5496,8 +5389,7 @@ static void LayDownRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5516,8 +5408,8 @@ static void LayDownRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5568,9 +5460,7 @@ static void LayDownRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5587,8 +5477,7 @@ static void LayDownRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5606,8 +5495,7 @@ static void LayDownRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5626,8 +5514,8 @@ static void LayDownRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5678,9 +5566,7 @@ static void LayDownRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5697,8 +5583,7 @@ static void LayDownRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5716,8 +5601,7 @@ static void LayDownRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5736,8 +5620,8 @@ static void LayDownRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5788,9 +5672,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5807,8 +5689,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5826,8 +5707,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5845,9 +5725,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -5894,9 +5772,7 @@ static void LayDownRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5913,8 +5789,7 @@ static void LayDownRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5932,8 +5807,7 @@ static void LayDownRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5951,9 +5825,7 @@ static void LayDownRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6000,9 +5872,7 @@ static void LayDownRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6019,8 +5889,7 @@ static void LayDownRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6038,8 +5907,7 @@ static void LayDownRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6057,9 +5925,7 @@ static void LayDownRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6106,9 +5972,7 @@ static void LayDownRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6125,8 +5989,7 @@ static void LayDownRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6144,8 +6007,7 @@ static void LayDownRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6163,9 +6025,7 @@ static void LayDownRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6212,9 +6072,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -6230,8 +6088,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -6248,8 +6105,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -6266,9 +6122,7 @@ static void LayDownRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6315,9 +6169,7 @@ static void LayDownRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -6333,8 +6185,7 @@ static void LayDownRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -6351,8 +6202,7 @@ static void LayDownRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -6369,9 +6219,7 @@ static void LayDownRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6418,9 +6266,7 @@ static void LayDownRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6437,8 +6283,7 @@ static void LayDownRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6456,8 +6301,7 @@ static void LayDownRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6475,9 +6319,7 @@ static void LayDownRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6524,9 +6366,7 @@ static void LayDownRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6543,8 +6383,7 @@ static void LayDownRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6562,8 +6401,7 @@ static void LayDownRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6581,9 +6419,7 @@ static void LayDownRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6630,9 +6466,7 @@ static void LayDownRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6649,8 +6483,7 @@ static void LayDownRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6668,8 +6501,7 @@ static void LayDownRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6688,8 +6520,8 @@ static void LayDownRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6740,9 +6572,7 @@ static void LayDownRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6759,8 +6589,7 @@ static void LayDownRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6778,8 +6607,7 @@ static void LayDownRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6798,8 +6626,8 @@ static void LayDownRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -6864,8 +6692,8 @@ static void LayDownRCTrackLeftFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -6902,8 +6730,8 @@ static void LayDownRCTrackLeftFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6942,8 +6770,8 @@ static void LayDownRCTrackLeftFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6983,8 +6811,8 @@ static void LayDownRCTrackRightFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7020,8 +6848,8 @@ static void LayDownRCTrackRightFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7060,8 +6888,8 @@ static void LayDownRCTrackRightFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7130,8 +6958,8 @@ static void LayDownRCTrackFlyerHalfLoopDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -7238,8 +7066,8 @@ static void LayDownRCTrackLeftFlyerCorkscrewDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7316,8 +7144,8 @@ static void LayDownRCTrackLeftFlyerCorkscrewDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7402,8 +7230,8 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7446,8 +7274,8 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7479,9 +7307,7 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7517,8 +7343,8 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7552,8 +7378,8 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7608,8 +7434,8 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7652,8 +7478,8 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7685,8 +7511,7 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7722,8 +7547,8 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7757,8 +7582,8 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7813,8 +7638,8 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7857,8 +7682,8 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7890,9 +7715,7 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7928,8 +7751,8 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7963,8 +7786,8 @@ static void LayDownRCTrackLeftQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -8019,8 +7842,8 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -8063,8 +7886,8 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8096,8 +7919,7 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8133,8 +7955,8 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8168,8 +7990,8 @@ static void LayDownRCTrackRightQuarterBankedHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -8303,8 +8125,8 @@ static void LayDownRCTrackHalfLoopInvertedUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); diff --git a/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp b/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp index aef3c070f8..927827198d 100644 --- a/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/LimLaunchedRollerCoaster.cpp @@ -43,11 +43,11 @@ static void LimLaunchedRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][2] = { - { 15018, SPR_STATION_BASE_B_SW_NE }, - { 15019, SPR_STATION_BASE_B_NW_SE }, - { 15018, SPR_STATION_BASE_B_SW_NE }, - { 15019, SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + 15018, + 15019, + 15018, + 15019, }; if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -60,14 +60,18 @@ static void LimLaunchedRCTrackStation( else { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, 0)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -116,8 +120,8 @@ static void LimLaunchedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -146,8 +150,8 @@ static void LimLaunchedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -179,9 +183,7 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -210,8 +212,8 @@ static void LimLaunchedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -246,8 +248,8 @@ static void LimLaunchedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -279,9 +281,7 @@ static void LimLaunchedRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -310,8 +310,8 @@ static void LimLaunchedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -357,8 +357,8 @@ static void LimLaunchedRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -635,8 +635,8 @@ static void LimLaunchedRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -681,8 +681,8 @@ static void LimLaunchedRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -736,8 +736,8 @@ static void LimLaunchedRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height); @@ -797,8 +797,8 @@ static void LimLaunchedRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -843,8 +843,8 @@ static void LimLaunchedRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -898,8 +898,8 @@ static void LimLaunchedRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height); @@ -958,8 +958,8 @@ static void LimLaunchedRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height); @@ -1004,8 +1004,8 @@ static void LimLaunchedRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1060,8 +1060,8 @@ static void LimLaunchedRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1120,8 +1120,8 @@ static void LimLaunchedRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1166,8 +1166,8 @@ static void LimLaunchedRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1222,8 +1222,8 @@ static void LimLaunchedRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1327,8 +1327,8 @@ static void LimLaunchedRCTrackLeftCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1388,8 +1388,8 @@ static void LimLaunchedRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1450,8 +1450,8 @@ static void LimLaunchedRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1738,7 +1738,7 @@ static void LimLaunchedRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -1769,7 +1769,7 @@ static void LimLaunchedRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -1804,7 +1804,7 @@ static void LimLaunchedRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -2008,8 +2008,8 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2054,8 +2054,8 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2109,8 +2109,8 @@ static void LimLaunchedRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2176,8 +2176,8 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2222,8 +2222,8 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2277,8 +2277,8 @@ static void LimLaunchedRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2404,8 +2404,8 @@ static void LimLaunchedRCTrackHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2816,8 +2816,8 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -2858,8 +2858,8 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2891,9 +2891,7 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2906,8 +2904,8 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -2973,8 +2971,8 @@ static void LimLaunchedRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3032,8 +3030,8 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::rightCorner, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::right, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -3074,8 +3072,8 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomRightSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3108,8 +3106,7 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3122,8 +3119,8 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3188,8 +3185,8 @@ static void LimLaunchedRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3292,8 +3289,8 @@ static void LimLaunchedRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3333,9 +3330,7 @@ static void LimLaunchedRCTrackLeftMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -3368,8 +3363,7 @@ static void LimLaunchedRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -3403,8 +3397,8 @@ static void LimLaunchedRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); @@ -3487,8 +3481,8 @@ static void LimLaunchedRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3529,8 +3523,7 @@ static void LimLaunchedRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -3563,9 +3556,7 @@ static void LimLaunchedRCTrackRightMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -3599,8 +3590,8 @@ static void LimLaunchedRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); if (direction == 0 || direction == 3) @@ -3707,8 +3698,8 @@ static void LimLaunchedRCTrackLeftZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3756,8 +3747,8 @@ static void LimLaunchedRCTrackLeftZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3847,8 +3838,8 @@ static void LimLaunchedRCTrackRightZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3896,8 +3887,8 @@ static void LimLaunchedRCTrackRightZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4026,8 +4017,8 @@ static void LimLaunchedRCTrackLeftLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4037,8 +4028,8 @@ static void LimLaunchedRCTrackLeftLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -4194,8 +4185,8 @@ static void LimLaunchedRCTrackRightLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4205,8 +4196,8 @@ static void LimLaunchedRCTrackRightLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -4314,9 +4305,7 @@ static void LimLaunchedRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4365,9 +4354,7 @@ static void LimLaunchedRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4416,9 +4403,7 @@ static void LimLaunchedRCTrackRightBankToRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4467,9 +4452,7 @@ static void LimLaunchedRCTrackRightBankToRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4516,9 +4499,7 @@ static void LimLaunchedRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4569,9 +4550,7 @@ static void LimLaunchedRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4618,9 +4597,7 @@ static void LimLaunchedRCTrackRightQuarterTurn325DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4671,9 +4648,7 @@ static void LimLaunchedRCTrackRightQuarterTurn325DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4784,8 +4759,8 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -4826,8 +4801,8 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -4860,8 +4835,7 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -4894,8 +4868,8 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -4932,8 +4906,8 @@ static void LimLaunchedRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -5044,8 +5018,8 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -5086,8 +5060,8 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -5119,9 +5093,7 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -5154,8 +5126,8 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -5192,8 +5164,8 @@ static void LimLaunchedRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -5344,9 +5316,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -5363,8 +5333,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -5382,8 +5351,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -5414,9 +5382,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -5442,9 +5408,7 @@ static void LimLaunchedRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5461,8 +5425,7 @@ static void LimLaunchedRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5480,8 +5443,7 @@ static void LimLaunchedRCTrackDiag60DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5512,9 +5474,7 @@ static void LimLaunchedRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5540,9 +5500,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5559,8 +5517,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5578,8 +5535,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5610,9 +5566,7 @@ static void LimLaunchedRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5638,9 +5592,7 @@ static void LimLaunchedRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -5657,8 +5609,7 @@ static void LimLaunchedRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -5676,8 +5627,7 @@ static void LimLaunchedRCTrackDiag60DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -5708,9 +5658,7 @@ static void LimLaunchedRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); diff --git a/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp b/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp index a595601c8e..7096afe8fe 100644 --- a/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/LoopingRollerCoaster.cpp @@ -104,28 +104,32 @@ static void LoopingRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIdsFrictionWheels[4][2] = { - { SPR_LOOPING_RC_BOOSTER_NE_SW, SPR_STATION_BASE_B_SW_NE }, - { SPR_LOOPING_RC_BOOSTER_NW_SE, SPR_STATION_BASE_B_NW_SE }, - { SPR_LOOPING_RC_BOOSTER_NE_SW, SPR_STATION_BASE_B_SW_NE }, - { SPR_LOOPING_RC_BOOSTER_NW_SE, SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIdsFrictionWheels[4] = { + SPR_LOOPING_RC_BOOSTER_NE_SW, + SPR_LOOPING_RC_BOOSTER_NW_SE, + SPR_LOOPING_RC_BOOSTER_NE_SW, + SPR_LOOPING_RC_BOOSTER_NW_SE, }; - static constexpr uint32_t imageIdsShuttleLaunch[4][2] = { - { SPR_LOOPING_RC_FLAT_CHAINED_SW_NE, SPR_STATION_BASE_B_SW_NE }, - { SPR_LOOPING_RC_FLAT_CHAINED_NW_SE, SPR_STATION_BASE_B_NW_SE }, - { SPR_LOOPING_RC_FLAT_CHAINED_SW_NE, SPR_STATION_BASE_B_SW_NE }, - { SPR_LOOPING_RC_FLAT_CHAINED_NW_SE, SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIdsShuttleLaunch[4] = { + SPR_LOOPING_RC_FLAT_CHAINED_SW_NE, + SPR_LOOPING_RC_FLAT_CHAINED_NW_SE, + SPR_LOOPING_RC_FLAT_CHAINED_SW_NE, + SPR_LOOPING_RC_FLAT_CHAINED_NW_SE, }; const auto& imageIds = IsCsgLoaded() ? imageIdsFrictionWheels : imageIdsShuttleLaunch; PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, 0)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -704,9 +708,7 @@ static void LoopingRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -742,8 +744,8 @@ static void LoopingRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -775,9 +777,7 @@ static void LoopingRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -813,8 +813,8 @@ static void LoopingRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -856,9 +856,7 @@ static void LoopingRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1089,9 +1087,7 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1127,8 +1123,8 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1160,9 +1156,7 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1198,8 +1192,8 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1244,9 +1238,7 @@ static void LoopingRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1579,9 +1571,7 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1615,8 +1605,8 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1647,9 +1637,7 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1683,8 +1671,8 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1726,9 +1714,7 @@ static void LoopingRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1775,9 +1761,7 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1811,8 +1795,8 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1843,8 +1827,7 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1878,8 +1861,8 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1921,9 +1904,7 @@ static void LoopingRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1989,9 +1970,7 @@ static void LoopingRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2023,8 +2002,8 @@ static void LoopingRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2056,8 +2035,8 @@ static void LoopingRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2099,9 +2078,7 @@ static void LoopingRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2148,9 +2125,7 @@ static void LoopingRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2182,8 +2157,8 @@ static void LoopingRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2215,8 +2190,8 @@ static void LoopingRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2258,9 +2233,7 @@ static void LoopingRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2303,8 +2276,8 @@ static void LoopingRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2333,8 +2306,8 @@ static void LoopingRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2390,9 +2363,7 @@ static void LoopingRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2421,8 +2392,8 @@ static void LoopingRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2457,8 +2428,8 @@ static void LoopingRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2514,9 +2485,7 @@ static void LoopingRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2545,8 +2514,8 @@ static void LoopingRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2584,8 +2553,8 @@ static void LoopingRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2895,9 +2864,7 @@ static void LoopingRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2932,9 +2899,7 @@ static void LoopingRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2976,9 +2941,7 @@ static void LoopingRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3037,9 +3000,7 @@ static void LoopingRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3074,9 +3035,7 @@ static void LoopingRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3121,9 +3080,7 @@ static void LoopingRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3175,9 +3132,7 @@ static void LoopingRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3221,9 +3176,7 @@ static void LoopingRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3266,9 +3219,7 @@ static void LoopingRCTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3319,9 +3270,7 @@ static void LoopingRCTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3391,8 +3340,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3427,9 +3376,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3475,8 +3422,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3522,8 +3469,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3559,8 +3506,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3601,8 +3547,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3653,8 +3599,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3690,8 +3636,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3737,8 +3682,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3784,8 +3729,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3820,9 +3765,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3863,8 +3806,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3945,8 +3888,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3982,8 +3925,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4015,9 +3958,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4053,8 +3994,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4100,8 +4041,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4147,8 +4088,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4184,8 +4125,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4217,8 +4158,7 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4254,8 +4194,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4296,8 +4236,8 @@ static void LoopingRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4348,8 +4288,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4385,8 +4325,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4418,8 +4358,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4455,8 +4394,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4502,8 +4441,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4549,8 +4488,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4586,8 +4525,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4619,9 +4558,7 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4657,8 +4594,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4699,8 +4636,8 @@ static void LoopingRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5087,8 +5024,8 @@ static void LoopingRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5121,8 +5058,8 @@ static void LoopingRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5131,9 +5068,7 @@ static void LoopingRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5174,8 +5109,8 @@ static void LoopingRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5251,8 +5186,8 @@ static void LoopingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5285,8 +5220,8 @@ static void LoopingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5296,8 +5231,7 @@ static void LoopingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5338,8 +5272,8 @@ static void LoopingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5433,8 +5367,8 @@ static void LoopingRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5467,8 +5401,8 @@ static void LoopingRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5477,9 +5411,7 @@ static void LoopingRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5520,8 +5452,8 @@ static void LoopingRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5597,8 +5529,8 @@ static void LoopingRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5631,8 +5563,8 @@ static void LoopingRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5642,8 +5574,7 @@ static void LoopingRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5684,8 +5615,8 @@ static void LoopingRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5788,9 +5719,7 @@ static void LoopingRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5821,8 +5750,7 @@ static void LoopingRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5854,8 +5782,7 @@ static void LoopingRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5914,9 +5841,7 @@ static void LoopingRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5957,9 +5882,7 @@ static void LoopingRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5990,8 +5913,7 @@ static void LoopingRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6023,8 +5945,7 @@ static void LoopingRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6083,9 +6004,7 @@ static void LoopingRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6126,9 +6045,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6159,8 +6076,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6192,8 +6108,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6252,9 +6167,7 @@ static void LoopingRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6295,9 +6208,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6328,8 +6239,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6361,8 +6271,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6421,9 +6330,7 @@ static void LoopingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6464,9 +6371,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6497,8 +6402,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6530,8 +6434,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6590,9 +6493,7 @@ static void LoopingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6633,9 +6534,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6666,8 +6565,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6699,8 +6597,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6759,9 +6656,7 @@ static void LoopingRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6802,9 +6697,7 @@ static void LoopingRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6835,8 +6728,7 @@ static void LoopingRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6868,8 +6760,7 @@ static void LoopingRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6928,9 +6819,7 @@ static void LoopingRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6971,9 +6860,7 @@ static void LoopingRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7004,8 +6891,7 @@ static void LoopingRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7037,8 +6923,7 @@ static void LoopingRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7097,9 +6982,7 @@ static void LoopingRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7140,9 +7023,7 @@ static void LoopingRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7172,8 +7053,7 @@ static void LoopingRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -7204,8 +7084,7 @@ static void LoopingRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7263,9 +7142,7 @@ static void LoopingRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -7307,9 +7184,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7340,8 +7215,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7373,8 +7247,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7433,9 +7306,7 @@ static void LoopingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7476,9 +7347,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7509,8 +7378,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7542,8 +7410,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7602,9 +7469,7 @@ static void LoopingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7645,9 +7510,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7678,8 +7541,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7711,8 +7573,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7771,9 +7632,7 @@ static void LoopingRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7800,9 +7659,7 @@ static void LoopingRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7822,8 +7679,7 @@ static void LoopingRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7841,8 +7697,7 @@ static void LoopingRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7873,9 +7728,7 @@ static void LoopingRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7902,9 +7755,7 @@ static void LoopingRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7921,8 +7772,7 @@ static void LoopingRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7943,8 +7793,7 @@ static void LoopingRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7975,9 +7824,7 @@ static void LoopingRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8004,9 +7851,7 @@ static void LoopingRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8026,8 +7871,7 @@ static void LoopingRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8045,8 +7889,7 @@ static void LoopingRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8077,9 +7920,7 @@ static void LoopingRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8106,9 +7947,7 @@ static void LoopingRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8125,8 +7964,7 @@ static void LoopingRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8147,8 +7985,7 @@ static void LoopingRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8179,9 +8016,7 @@ static void LoopingRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8208,9 +8043,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8230,8 +8063,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8249,8 +8081,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8281,9 +8112,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8310,9 +8139,7 @@ static void LoopingRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8329,8 +8156,7 @@ static void LoopingRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8351,8 +8177,7 @@ static void LoopingRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8383,9 +8208,7 @@ static void LoopingRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8412,9 +8235,7 @@ static void LoopingRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8434,8 +8255,7 @@ static void LoopingRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8453,8 +8273,7 @@ static void LoopingRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8485,9 +8304,7 @@ static void LoopingRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8514,9 +8331,7 @@ static void LoopingRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8533,8 +8348,7 @@ static void LoopingRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8555,8 +8369,7 @@ static void LoopingRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8587,9 +8400,7 @@ static void LoopingRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8616,9 +8427,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8637,8 +8446,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -8655,8 +8463,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8686,9 +8493,7 @@ static void LoopingRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -8716,9 +8521,7 @@ static void LoopingRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8734,8 +8537,7 @@ static void LoopingRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -8755,8 +8557,7 @@ static void LoopingRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -8786,9 +8587,7 @@ static void LoopingRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -8816,9 +8615,7 @@ static void LoopingRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8838,8 +8635,7 @@ static void LoopingRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8857,8 +8653,7 @@ static void LoopingRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8889,9 +8684,7 @@ static void LoopingRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8918,9 +8711,7 @@ static void LoopingRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8937,8 +8728,7 @@ static void LoopingRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8959,8 +8749,7 @@ static void LoopingRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8991,9 +8780,7 @@ static void LoopingRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9020,9 +8807,7 @@ static void LoopingRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9039,8 +8824,7 @@ static void LoopingRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9058,8 +8842,7 @@ static void LoopingRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9090,9 +8873,7 @@ static void LoopingRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9119,9 +8900,7 @@ static void LoopingRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9138,8 +8917,7 @@ static void LoopingRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9157,8 +8935,7 @@ static void LoopingRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9189,9 +8966,7 @@ static void LoopingRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9270,9 +9045,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9318,9 +9091,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9364,9 +9135,7 @@ static void LoopingRCTrackRightBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9419,9 +9188,7 @@ static void LoopingRCTrackRightBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9488,9 +9255,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9525,8 +9290,8 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9557,9 +9322,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9595,8 +9358,8 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9638,9 +9401,7 @@ static void LoopingRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9687,9 +9448,7 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9724,8 +9483,8 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9756,8 +9515,7 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9793,8 +9551,8 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9836,9 +9594,7 @@ static void LoopingRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); diff --git a/src/openrct2/paint/track/coaster/MineRide.cpp b/src/openrct2/paint/track/coaster/MineRide.cpp index 2bbdc728ce..55f7b0a159 100644 --- a/src/openrct2/paint/track/coaster/MineRide.cpp +++ b/src/openrct2/paint/track/coaster/MineRide.cpp @@ -51,21 +51,25 @@ static void MineRideTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { 19338, SPR_STATION_BASE_A_SW_NE }, - { 19339, SPR_STATION_BASE_A_NW_SE }, - { 19338, SPR_STATION_BASE_A_SW_NE }, - { 19339, SPR_STATION_BASE_A_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + 19338, + 19339, + 19338, + 19339, }; PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); + if (TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::a, 0, 9, 11)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 6, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -203,9 +207,7 @@ static void MineRideTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -241,8 +243,8 @@ static void MineRideTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -274,9 +276,7 @@ static void MineRideTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -312,8 +312,8 @@ static void MineRideTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -338,9 +338,7 @@ static void MineRideTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -586,9 +584,7 @@ static void MineRideTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -624,8 +620,8 @@ static void MineRideTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -657,9 +653,7 @@ static void MineRideTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -695,8 +689,8 @@ static void MineRideTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -745,9 +739,7 @@ static void MineRideTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1085,9 +1077,7 @@ static void MineRideTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1119,8 +1109,8 @@ static void MineRideTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1152,8 +1142,8 @@ static void MineRideTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1196,9 +1186,7 @@ static void MineRideTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1245,9 +1233,7 @@ static void MineRideTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1279,8 +1265,8 @@ static void MineRideTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1312,8 +1298,8 @@ static void MineRideTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1355,9 +1341,7 @@ static void MineRideTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1405,9 +1389,7 @@ static void MineRideTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1442,9 +1424,7 @@ static void MineRideTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1488,9 +1468,7 @@ static void MineRideTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1550,9 +1528,7 @@ static void MineRideTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1587,9 +1563,7 @@ static void MineRideTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1636,9 +1610,7 @@ static void MineRideTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1705,8 +1677,8 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1741,9 +1713,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1791,8 +1761,8 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1840,8 +1810,8 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1877,8 +1847,7 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1921,8 +1890,8 @@ static void MineRideTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1978,8 +1947,8 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2016,8 +1985,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2068,8 +2036,8 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2120,8 +2088,8 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2157,9 +2125,7 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2204,8 +2170,8 @@ static void MineRideTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2288,8 +2254,8 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2325,8 +2291,8 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2358,9 +2324,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2396,8 +2360,8 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2445,8 +2409,8 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2494,8 +2458,8 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2531,8 +2495,8 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2564,8 +2528,7 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2601,8 +2564,8 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2645,8 +2608,8 @@ static void MineRideTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2698,8 +2661,8 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2735,8 +2698,8 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2768,8 +2731,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2805,8 +2767,8 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2854,8 +2816,8 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2903,8 +2865,8 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2940,8 +2902,8 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2973,9 +2935,7 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3011,8 +2971,8 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3055,8 +3015,8 @@ static void MineRideTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3198,8 +3158,8 @@ static void MineRideTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3232,8 +3192,8 @@ static void MineRideTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3242,9 +3202,7 @@ static void MineRideTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3279,8 +3237,8 @@ static void MineRideTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3357,8 +3315,8 @@ static void MineRideTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3391,8 +3349,8 @@ static void MineRideTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3402,8 +3360,7 @@ static void MineRideTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3438,8 +3395,8 @@ static void MineRideTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3534,8 +3491,8 @@ static void MineRideTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3568,8 +3525,8 @@ static void MineRideTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3578,9 +3535,7 @@ static void MineRideTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3615,8 +3570,8 @@ static void MineRideTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3693,8 +3648,8 @@ static void MineRideTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3727,8 +3682,8 @@ static void MineRideTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3738,8 +3693,7 @@ static void MineRideTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3774,8 +3728,8 @@ static void MineRideTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3839,9 +3793,7 @@ static void MineRideTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3858,8 +3810,7 @@ static void MineRideTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3877,8 +3828,7 @@ static void MineRideTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3897,9 +3847,7 @@ static void MineRideTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3926,9 +3874,7 @@ static void MineRideTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3945,8 +3891,7 @@ static void MineRideTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3964,8 +3909,7 @@ static void MineRideTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3984,9 +3928,7 @@ static void MineRideTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4013,9 +3955,7 @@ static void MineRideTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4032,8 +3972,7 @@ static void MineRideTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4051,8 +3990,7 @@ static void MineRideTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4071,9 +4009,7 @@ static void MineRideTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4100,9 +4036,7 @@ static void MineRideTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4119,8 +4053,7 @@ static void MineRideTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4138,8 +4071,7 @@ static void MineRideTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4158,9 +4090,7 @@ static void MineRideTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4187,9 +4117,7 @@ static void MineRideTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -4205,8 +4133,7 @@ static void MineRideTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -4223,8 +4150,7 @@ static void MineRideTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -4242,9 +4168,7 @@ static void MineRideTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -4272,9 +4196,7 @@ static void MineRideTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4291,8 +4213,7 @@ static void MineRideTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4310,8 +4231,7 @@ static void MineRideTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4330,9 +4250,7 @@ static void MineRideTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4359,9 +4277,7 @@ static void MineRideTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4381,8 +4297,7 @@ static void MineRideTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4400,8 +4315,7 @@ static void MineRideTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4420,9 +4334,7 @@ static void MineRideTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4449,9 +4361,7 @@ static void MineRideTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4468,8 +4378,7 @@ static void MineRideTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4490,8 +4399,7 @@ static void MineRideTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4510,9 +4418,7 @@ static void MineRideTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4539,9 +4445,7 @@ static void MineRideTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4561,8 +4465,7 @@ static void MineRideTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4580,8 +4483,7 @@ static void MineRideTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4600,9 +4502,7 @@ static void MineRideTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4629,9 +4529,7 @@ static void MineRideTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4648,8 +4546,7 @@ static void MineRideTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4670,8 +4567,7 @@ static void MineRideTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4690,9 +4586,7 @@ static void MineRideTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4719,9 +4613,7 @@ static void MineRideTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4741,8 +4633,7 @@ static void MineRideTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4760,8 +4651,7 @@ static void MineRideTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4780,9 +4670,7 @@ static void MineRideTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4809,9 +4697,7 @@ static void MineRideTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4828,8 +4714,7 @@ static void MineRideTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4850,8 +4735,7 @@ static void MineRideTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4870,9 +4754,7 @@ static void MineRideTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4899,9 +4781,7 @@ static void MineRideTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4921,8 +4801,7 @@ static void MineRideTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4940,8 +4819,7 @@ static void MineRideTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4960,9 +4838,7 @@ static void MineRideTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4989,9 +4865,7 @@ static void MineRideTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5008,8 +4882,7 @@ static void MineRideTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5030,8 +4903,7 @@ static void MineRideTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5050,9 +4922,7 @@ static void MineRideTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5079,9 +4949,7 @@ static void MineRideTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -5100,8 +4968,7 @@ static void MineRideTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -5118,8 +4985,7 @@ static void MineRideTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -5137,9 +5003,7 @@ static void MineRideTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -5167,9 +5031,7 @@ static void MineRideTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -5185,8 +5047,7 @@ static void MineRideTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -5206,8 +5067,7 @@ static void MineRideTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -5225,9 +5085,7 @@ static void MineRideTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -5255,9 +5113,7 @@ static void MineRideTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5277,8 +5133,7 @@ static void MineRideTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5296,8 +5151,7 @@ static void MineRideTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5316,9 +5170,7 @@ static void MineRideTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5345,9 +5197,7 @@ static void MineRideTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5364,8 +5214,7 @@ static void MineRideTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5386,8 +5235,7 @@ static void MineRideTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5406,9 +5254,7 @@ static void MineRideTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5435,9 +5281,7 @@ static void MineRideTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5454,8 +5298,7 @@ static void MineRideTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5473,8 +5316,7 @@ static void MineRideTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5493,9 +5335,7 @@ static void MineRideTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5522,9 +5362,7 @@ static void MineRideTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5541,8 +5379,7 @@ static void MineRideTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5560,8 +5397,7 @@ static void MineRideTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5580,9 +5416,7 @@ static void MineRideTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); diff --git a/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp b/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp index b4b41ed01a..4819b64593 100644 --- a/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp +++ b/src/openrct2/paint/track/coaster/MineTrainCoaster.cpp @@ -132,31 +132,34 @@ static void MineTrainRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][2] = { - { 20064, SPR_STATION_BASE_B_SW_NE }, - { 20065, SPR_STATION_BASE_B_NW_SE }, - { 20064, SPR_STATION_BASE_B_SW_NE }, - { 20065, SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + 20064, + 20065, + 20064, + 20065, }; - - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), - { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); if (trackElement.GetTrackType() == TrackElemType::EndStation) { bool isClosed = trackElement.IsBrakeClosed(); - PaintAddImageAsChildRotated( + PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(kMineTrainBlockBrakeImages[direction][isClosed]), - { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); + { 0, 0, height }, { { 0, 6, height + 1 }, { 32, 20, 1 } }); } else { - PaintAddImageAsChildRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 0, height }, { 32, 20, 1 } }); + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, + { { 0, 6, height + 1 }, { 32, 20, 1 } }); + } + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + } + else + { + DrawSupportForSequenceA( + session, supportType.wooden, trackSequence, direction, height, session.SupportColours); } - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -617,8 +620,7 @@ static void MineTrainRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -650,8 +652,8 @@ static void MineTrainRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -685,9 +687,8 @@ static void MineTrainRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -696,8 +697,7 @@ static void MineTrainRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -729,8 +729,8 @@ static void MineTrainRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -995,8 +995,7 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; case 2: @@ -1028,8 +1027,8 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -1064,9 +1063,8 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1075,8 +1073,7 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; case 5: @@ -1108,8 +1105,8 @@ static void MineTrainRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1489,8 +1486,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -1524,8 +1520,8 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1560,9 +1556,8 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1571,8 +1566,7 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -1606,8 +1600,8 @@ static void MineTrainRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1710,7 +1704,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -1750,8 +1744,8 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1792,9 +1786,8 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1803,7 +1796,7 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -1843,8 +1836,8 @@ static void MineTrainRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2000,8 +1993,8 @@ static void MineTrainRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2040,8 +2033,8 @@ static void MineTrainRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2173,8 +2166,8 @@ static void MineTrainRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2213,8 +2206,8 @@ static void MineTrainRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2344,9 +2337,7 @@ static void MineTrainRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2489,9 +2480,7 @@ static void MineTrainRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2607,9 +2596,7 @@ static void MineTrainRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2710,8 +2697,7 @@ static void MineTrainRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2828,17 +2814,15 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2876,9 +2860,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2930,17 +2912,15 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2992,17 +2972,15 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3040,8 +3018,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3088,17 +3065,15 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::bottom, PaintSegment::topLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3155,17 +3130,15 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::bottom, PaintSegment::topLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3204,8 +3177,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3257,17 +3229,15 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3319,17 +3289,15 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3367,9 +3335,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3416,17 +3382,15 @@ static void MineTrainRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3513,17 +3477,15 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3532,8 +3494,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -3573,8 +3534,8 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3617,17 +3578,13 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::bottom, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3636,8 +3593,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -3680,8 +3636,8 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3733,17 +3689,15 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3795,17 +3749,15 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3814,7 +3766,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -3854,8 +3806,8 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3898,16 +3850,13 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3916,7 +3865,7 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -3959,8 +3908,8 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4007,17 +3956,15 @@ static void MineTrainRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::bottom, PaintSegment::topLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4074,17 +4021,15 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::bottom, PaintSegment::topLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4093,7 +4038,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -4133,8 +4078,8 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4174,16 +4119,13 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4192,7 +4134,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -4232,8 +4174,8 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4285,17 +4227,15 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4347,17 +4287,15 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4366,8 +4304,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -4407,8 +4344,8 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4448,17 +4385,13 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::bottom, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4467,8 +4400,7 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -4508,8 +4440,8 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4556,17 +4488,15 @@ static void MineTrainRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6935,9 +6865,7 @@ static void MineTrainRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6956,8 +6884,7 @@ static void MineTrainRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6977,8 +6904,7 @@ static void MineTrainRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6994,9 +6920,7 @@ static void MineTrainRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); diff --git a/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp b/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp index 660ea58946..1c1981a49e 100644 --- a/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/MiniRollerCoaster.cpp @@ -101,11 +101,11 @@ static void MiniRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][2] = { - { 18746, SPR_STATION_BASE_A_SW_NE }, - { 18747, SPR_STATION_BASE_A_NW_SE }, - { 18746, SPR_STATION_BASE_A_SW_NE }, - { 18747, SPR_STATION_BASE_A_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + 18746, + 18747, + 18746, + 18747, }; if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -118,14 +118,18 @@ static void MiniRCTrackStation( else { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); + if (TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::a, 0, 9, 11)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 6, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -588,9 +592,7 @@ static void MiniRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -626,8 +628,8 @@ static void MiniRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -659,9 +661,7 @@ static void MiniRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -697,8 +697,8 @@ static void MiniRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -742,9 +742,7 @@ static void MiniRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -981,9 +979,7 @@ static void MiniRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1019,8 +1015,8 @@ static void MiniRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1052,9 +1048,7 @@ static void MiniRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1090,8 +1084,8 @@ static void MiniRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1138,9 +1132,7 @@ static void MiniRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1479,9 +1471,7 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1515,8 +1505,8 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1547,9 +1537,7 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1583,8 +1571,8 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1628,9 +1616,7 @@ static void MiniRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1678,9 +1664,7 @@ static void MiniRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1714,8 +1698,8 @@ static void MiniRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1746,8 +1730,7 @@ static void MiniRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1781,8 +1764,8 @@ static void MiniRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1826,9 +1809,7 @@ static void MiniRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1893,9 +1874,7 @@ static void MiniRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1927,8 +1906,8 @@ static void MiniRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1960,8 +1939,8 @@ static void MiniRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2004,9 +1983,7 @@ static void MiniRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2053,9 +2030,7 @@ static void MiniRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2087,8 +2062,8 @@ static void MiniRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2120,8 +2095,8 @@ static void MiniRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2163,9 +2138,7 @@ static void MiniRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2213,9 +2186,7 @@ static void MiniRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2250,9 +2221,7 @@ static void MiniRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2296,9 +2265,7 @@ static void MiniRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2358,9 +2325,7 @@ static void MiniRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2395,9 +2360,7 @@ static void MiniRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2444,9 +2407,7 @@ static void MiniRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2499,9 +2460,7 @@ static void MiniRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2547,9 +2506,7 @@ static void MiniRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2593,9 +2550,7 @@ static void MiniRCTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2641,9 +2596,7 @@ static void MiniRCTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2713,8 +2666,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2749,9 +2702,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2799,8 +2750,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2848,8 +2799,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2885,8 +2836,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2929,8 +2879,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2982,8 +2932,8 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3019,8 +2969,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3070,8 +3019,8 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3122,8 +3071,8 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3159,9 +3108,7 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3206,8 +3153,8 @@ static void MiniRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3289,8 +3236,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3326,8 +3273,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3359,9 +3306,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3397,8 +3342,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3446,8 +3391,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3495,8 +3440,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3532,8 +3477,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3565,8 +3510,7 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3602,8 +3546,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3646,8 +3590,8 @@ static void MiniRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3699,8 +3643,8 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3736,8 +3680,8 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3769,8 +3713,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3806,8 +3749,8 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3855,8 +3798,8 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3904,8 +3847,8 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3941,8 +3884,8 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3974,9 +3917,7 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4012,8 +3953,8 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4056,8 +3997,8 @@ static void MiniRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4442,8 +4383,8 @@ static void MiniRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4476,8 +4417,8 @@ static void MiniRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4486,9 +4427,7 @@ static void MiniRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4523,8 +4462,8 @@ static void MiniRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4601,8 +4540,8 @@ static void MiniRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4635,8 +4574,8 @@ static void MiniRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4646,8 +4585,7 @@ static void MiniRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4682,8 +4620,8 @@ static void MiniRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4778,8 +4716,8 @@ static void MiniRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4812,8 +4750,8 @@ static void MiniRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4822,9 +4760,7 @@ static void MiniRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4859,8 +4795,8 @@ static void MiniRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4937,8 +4873,8 @@ static void MiniRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4971,8 +4907,8 @@ static void MiniRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4982,8 +4918,7 @@ static void MiniRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5018,8 +4953,8 @@ static void MiniRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5101,9 +5036,7 @@ static void MiniRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5134,8 +5067,7 @@ static void MiniRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5167,8 +5099,7 @@ static void MiniRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5201,9 +5132,7 @@ static void MiniRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5230,9 +5159,7 @@ static void MiniRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5249,8 +5176,7 @@ static void MiniRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5268,8 +5194,7 @@ static void MiniRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5289,9 +5214,7 @@ static void MiniRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5332,9 +5255,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5365,8 +5286,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5398,8 +5318,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5432,9 +5351,7 @@ static void MiniRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5461,9 +5378,7 @@ static void MiniRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5480,8 +5395,7 @@ static void MiniRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5499,8 +5413,7 @@ static void MiniRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5519,9 +5432,7 @@ static void MiniRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5548,9 +5459,7 @@ static void MiniRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5567,8 +5476,7 @@ static void MiniRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5586,8 +5494,7 @@ static void MiniRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5606,9 +5513,7 @@ static void MiniRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -5649,9 +5554,7 @@ static void MiniRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5682,8 +5585,7 @@ static void MiniRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5715,8 +5617,7 @@ static void MiniRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5749,9 +5650,7 @@ static void MiniRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5792,9 +5691,7 @@ static void MiniRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5825,8 +5722,7 @@ static void MiniRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5858,8 +5754,7 @@ static void MiniRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5892,9 +5787,7 @@ static void MiniRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5921,9 +5814,7 @@ static void MiniRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5940,8 +5831,7 @@ static void MiniRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5959,8 +5849,7 @@ static void MiniRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -5980,9 +5869,7 @@ static void MiniRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6023,9 +5910,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -6055,8 +5940,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -6087,8 +5971,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -6120,9 +6003,7 @@ static void MiniRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -6150,9 +6031,7 @@ static void MiniRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6169,8 +6048,7 @@ static void MiniRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6188,8 +6066,7 @@ static void MiniRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6208,9 +6085,7 @@ static void MiniRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6237,9 +6112,7 @@ static void MiniRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6256,8 +6129,7 @@ static void MiniRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6275,8 +6147,7 @@ static void MiniRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6295,9 +6166,7 @@ static void MiniRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6338,9 +6207,7 @@ static void MiniRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6371,8 +6238,7 @@ static void MiniRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6404,8 +6270,7 @@ static void MiniRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6438,9 +6303,7 @@ static void MiniRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6467,9 +6330,7 @@ static void MiniRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6489,8 +6350,7 @@ static void MiniRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6508,8 +6368,7 @@ static void MiniRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6528,9 +6387,7 @@ static void MiniRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6557,9 +6414,7 @@ static void MiniRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6576,8 +6431,7 @@ static void MiniRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6598,8 +6452,7 @@ static void MiniRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6618,9 +6471,7 @@ static void MiniRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6647,9 +6498,7 @@ static void MiniRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6669,8 +6518,7 @@ static void MiniRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6688,8 +6536,7 @@ static void MiniRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6708,9 +6555,7 @@ static void MiniRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6737,9 +6582,7 @@ static void MiniRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6756,8 +6599,7 @@ static void MiniRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6778,8 +6620,7 @@ static void MiniRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6798,9 +6639,7 @@ static void MiniRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6827,9 +6666,7 @@ static void MiniRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6849,8 +6686,7 @@ static void MiniRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6868,8 +6704,7 @@ static void MiniRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6888,9 +6723,7 @@ static void MiniRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6917,9 +6750,7 @@ static void MiniRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6936,8 +6767,7 @@ static void MiniRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6958,8 +6788,7 @@ static void MiniRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6978,9 +6807,7 @@ static void MiniRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7007,9 +6834,7 @@ static void MiniRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7029,8 +6854,7 @@ static void MiniRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7048,8 +6872,7 @@ static void MiniRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7068,9 +6891,7 @@ static void MiniRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7097,9 +6918,7 @@ static void MiniRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7116,8 +6935,7 @@ static void MiniRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7138,8 +6956,7 @@ static void MiniRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7158,9 +6975,7 @@ static void MiniRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7187,9 +7002,7 @@ static void MiniRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7208,8 +7021,7 @@ static void MiniRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -7226,8 +7038,7 @@ static void MiniRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7245,9 +7056,7 @@ static void MiniRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -7275,9 +7084,7 @@ static void MiniRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7293,8 +7100,7 @@ static void MiniRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -7314,8 +7120,7 @@ static void MiniRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7333,9 +7138,7 @@ static void MiniRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -7363,9 +7166,7 @@ static void MiniRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7385,8 +7186,7 @@ static void MiniRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7404,8 +7204,7 @@ static void MiniRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7424,9 +7223,7 @@ static void MiniRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7453,9 +7250,7 @@ static void MiniRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7472,8 +7267,7 @@ static void MiniRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7494,8 +7288,7 @@ static void MiniRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7514,9 +7307,7 @@ static void MiniRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7543,9 +7334,7 @@ static void MiniRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7562,8 +7351,7 @@ static void MiniRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7581,8 +7369,7 @@ static void MiniRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7601,9 +7388,7 @@ static void MiniRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7630,9 +7415,7 @@ static void MiniRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7649,8 +7432,7 @@ static void MiniRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7668,8 +7450,7 @@ static void MiniRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7688,9 +7469,7 @@ static void MiniRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7754,9 +7533,7 @@ static void MiniRCTrackLeftBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7804,9 +7581,7 @@ static void MiniRCTrackLeftBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7851,9 +7626,7 @@ static void MiniRCTrackRightBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7901,9 +7674,7 @@ static void MiniRCTrackRightBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7971,9 +7742,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8008,8 +7777,8 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8040,9 +7809,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8078,8 +7845,8 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8123,9 +7890,7 @@ static void MiniRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8173,9 +7938,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8210,8 +7973,8 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8242,8 +8005,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8279,8 +8041,8 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8324,9 +8086,7 @@ static void MiniRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9055,9 +8815,7 @@ static void MiniRCTrackLeftCurvedLiftHill( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9103,9 +8861,7 @@ static void MiniRCTrackLeftCurvedLiftHill( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9148,9 +8904,7 @@ static void MiniRCTrackRightCurvedLiftHill( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9196,9 +8950,7 @@ static void MiniRCTrackRightCurvedLiftHill( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); diff --git a/src/openrct2/paint/track/coaster/MiniSuspendedCoaster.cpp b/src/openrct2/paint/track/coaster/MiniSuspendedCoaster.cpp index fdc837cf7e..517646d48f 100644 --- a/src/openrct2/paint/track/coaster/MiniSuspendedCoaster.cpp +++ b/src/openrct2/paint/track/coaster/MiniSuspendedCoaster.cpp @@ -85,23 +85,24 @@ static void MiniSuspendedRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { SPR_STATION_BASE_C_SW_NE, 28433, SPR_STATION_INVERTED_BAR_E_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 28434, SPR_STATION_INVERTED_BAR_E_NW_SE }, - { SPR_STATION_BASE_C_SW_NE, 28433, SPR_STATION_INVERTED_BAR_E_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 28434, SPR_STATION_INVERTED_BAR_E_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { 28433, SPR_STATION_INVERTED_BAR_E_SW_NE }, + { 28434, SPR_STATION_INVERTED_BAR_E_NW_SE }, + { 28433, SPR_STATION_INVERTED_BAR_E_SW_NE }, + { 28434, SPR_STATION_INVERTED_BAR_E_NW_SE }, }; - + const bool stationDrawn = TrackPaintUtilDrawStationInverted( + session, ride, direction, height, trackElement, STATION_VARIANT_1); PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 6, height + 24 }, { 32, 20, 1 }); - PaintAddImageAsChildRotated( - session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 24 }, - { { 0, 2, height }, { 32, 20, 1 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); - TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_1); + session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 6, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + if (stationDrawn) + { + PaintAddImageAsChildRotated( + session, direction, session.SupportColours.WithIndex(imageIds[direction][1]), { 0, 6, height + 24 }, + { { 0, 6, height + 24 }, { 32, 20, 3 } }); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -391,8 +392,8 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -431,8 +432,8 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -460,9 +461,7 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -494,8 +493,8 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -525,8 +524,8 @@ static void MiniSuspendedRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -587,9 +586,7 @@ static void MiniSuspendedRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 30, 0, 0); @@ -625,8 +622,8 @@ static void MiniSuspendedRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 30, 0, 0); @@ -658,8 +655,8 @@ static void MiniSuspendedRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 30, 0, 0); @@ -690,9 +687,7 @@ static void MiniSuspendedRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -743,9 +738,7 @@ static void MiniSuspendedRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 30, 0, 0); @@ -781,8 +774,8 @@ static void MiniSuspendedRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 30, 0, 0); @@ -814,8 +807,8 @@ static void MiniSuspendedRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 30, 0, 0); @@ -846,9 +839,7 @@ static void MiniSuspendedRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 30, 0, 0); @@ -899,8 +890,8 @@ static void MiniSuspendedRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -938,9 +929,7 @@ static void MiniSuspendedRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -970,8 +959,8 @@ static void MiniSuspendedRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -1037,8 +1026,7 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -1078,8 +1066,8 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1112,8 +1100,8 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1122,9 +1110,7 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1158,8 +1144,8 @@ static void MiniSuspendedRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -1205,9 +1191,7 @@ static void MiniSuspendedRCTrackRightEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -1247,8 +1231,8 @@ static void MiniSuspendedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1281,8 +1265,8 @@ static void MiniSuspendedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1292,8 +1276,7 @@ static void MiniSuspendedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1327,8 +1310,8 @@ static void MiniSuspendedRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -1409,9 +1392,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1442,8 +1423,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1475,8 +1455,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1508,9 +1487,7 @@ static void MiniSuspendedRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -1554,9 +1531,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1587,8 +1562,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1620,8 +1594,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1653,9 +1626,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -1699,9 +1670,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1732,8 +1701,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1765,8 +1733,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1798,9 +1765,7 @@ static void MiniSuspendedRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalBSupportsPaintSetupRotated( @@ -1844,9 +1809,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1877,8 +1840,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1910,8 +1872,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1943,9 +1904,7 @@ static void MiniSuspendedRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -1989,9 +1948,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -2021,8 +1978,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -2053,8 +2009,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -2085,9 +2040,7 @@ static void MiniSuspendedRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( @@ -2131,9 +2084,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2164,8 +2115,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2197,8 +2147,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2230,9 +2179,7 @@ static void MiniSuspendedRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetupRotated( diff --git a/src/openrct2/paint/track/coaster/MultiDimensionRollerCoaster.cpp b/src/openrct2/paint/track/coaster/MultiDimensionRollerCoaster.cpp index 2995a256c0..91963aa646 100644 --- a/src/openrct2/paint/track/coaster/MultiDimensionRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/MultiDimensionRollerCoaster.cpp @@ -10,6 +10,7 @@ #include "../../../SpriteIds.h" #include "../../../drawing/Drawing.h" #include "../../../interface/Viewport.h" +#include "../../../object/StationObject.h" #include "../../../ride/RideData.h" #include "../../../ride/TrackData.h" #include "../../../ride/TrackPaint.h" @@ -180,11 +181,22 @@ static void MultiDimensionRCTrackStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[kNumOrthogonalDirections][3] = { - { 15810, MULTI_DIM_STATION_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_STATION_BLOCK_BRAKE_SW_NE_CLOSED }, - { 15811, MULTI_DIM_STATION_BLOCK_BRAKE_NW_SE_OPEN, MULTI_DIM_STATION_BLOCK_BRAKE_NW_SE_CLOSED }, - { 15810, MULTI_DIM_STATION_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_STATION_BLOCK_BRAKE_SW_NE_CLOSED }, - { 15811, MULTI_DIM_STATION_BLOCK_BRAKE_NW_SE_OPEN, MULTI_DIM_STATION_BLOCK_BRAKE_NW_SE_CLOSED }, + const auto* const stationObj = ride.getStationObject(); + const bool noPlatforms = stationObj != nullptr && stationObj->Flags & StationObjectFlags::noPlatforms; + + static constexpr uint32_t imageIds[2][kNumOrthogonalDirections][3] = { + { + { 15810, MULTI_DIM_STATION_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_STATION_BLOCK_BRAKE_SW_NE_CLOSED }, + { 15811, MULTI_DIM_STATION_BLOCK_BRAKE_NW_SE_OPEN, MULTI_DIM_STATION_BLOCK_BRAKE_NW_SE_CLOSED }, + { 15810, MULTI_DIM_STATION_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_STATION_BLOCK_BRAKE_SW_NE_CLOSED }, + { 15811, MULTI_DIM_STATION_BLOCK_BRAKE_NW_SE_OPEN, MULTI_DIM_STATION_BLOCK_BRAKE_NW_SE_CLOSED }, + }, + { + { 16218, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_SW_NE_CLOSED }, + { 16219, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_NW_SE_OPEN, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_NW_SE_CLOSED }, + { 16218, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_SW_NE_OPEN, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_SW_NE_CLOSED }, + { 16219, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_NW_SE_OPEN, MULTI_DIM_NON_INVERTED_BLOCK_BRAKE_NW_SE_CLOSED }, + } }; if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -192,40 +204,47 @@ static void MultiDimensionRCTrackStation( bool isClosed = trackElement.IsBrakeClosed(); uint8_t offset = isClosed ? 2 : 1; PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][offset]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[noPlatforms][direction][offset]), { 0, 0, height }, { { 0, 3, height + 3 }, { 32, 26, 1 } }); } else { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[noPlatforms][direction][0]), { 0, 0, height }, { { 0, 3, height + 3 }, { 32, 26, 1 } }); } - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - auto stationColour = GetStationColourScheme(session, trackElement); - const auto* stationObj = ride.GetStationObject(); - bool hasFence; - if (direction == 0 || direction == 2) + if (stationObj != nullptr && !(stationObj->Flags & StationObjectFlags::noPlatforms)) { - hasFence = TrackPaintUtilHasFence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation); - TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, height, stationColour); - } - else - { - hasFence = TrackPaintUtilHasFence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation); - TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, height, stationColour); - } + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - if (direction == 0 || direction == 2) - { - hasFence = TrackPaintUtilHasFence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); - TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, height, stationColour); + auto stationColour = GetStationColourScheme(session, trackElement); + bool hasFence; + if (direction == 0 || direction == 2) + { + hasFence = TrackPaintUtilHasFence(EDGE_NW, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, height, stationColour); + } + else + { + hasFence = TrackPaintUtilHasFence(EDGE_NE, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, height, stationColour); + } + + if (direction == 0 || direction == 2) + { + hasFence = TrackPaintUtilHasFence(EDGE_SE, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, height, stationColour); + } + else + { + hasFence = TrackPaintUtilHasFence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); + TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, height, stationColour); + } } - else + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) { - hasFence = TrackPaintUtilHasFence(EDGE_SW, session.MapPosition, trackElement, ride, session.CurrentRotation); - TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, height, stationColour); + MetalASupportsPaintSetup(session, supportType.metal, MetalSupportPlace::Centre, 0, height, session.SupportColours); } TrackPaintUtilDrawStationTunnel(session, direction, height); @@ -1083,8 +1102,8 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1117,8 +1136,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1154,8 +1172,8 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1199,8 +1217,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1240,8 +1257,8 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1284,8 +1301,8 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1318,8 +1335,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1355,8 +1371,8 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1390,8 +1406,8 @@ static void MultiDimensionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1495,8 +1511,8 @@ static void MultiDimensionRCTrackFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1584,8 +1600,8 @@ static void MultiDimensionRCTrackFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1673,8 +1689,8 @@ static void MultiDimensionRCTrackLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1762,8 +1778,8 @@ static void MultiDimensionRCTrackRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -1853,8 +1869,8 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1887,8 +1903,7 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1924,8 +1939,8 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1972,8 +1987,7 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2013,8 +2027,8 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2055,8 +2069,8 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2088,8 +2102,7 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2123,8 +2136,8 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2158,8 +2171,8 @@ static void MultiDimensionRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2271,8 +2284,8 @@ static void MultiDimensionRCTrackLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -2391,8 +2404,8 @@ static void MultiDimensionRCTrackRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -2511,8 +2524,8 @@ static void MultiDimensionRCTrack25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -2631,8 +2644,8 @@ static void MultiDimensionRCTrack25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -2774,8 +2787,8 @@ static void MultiDimensionRCTrackLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) @@ -2961,9 +2974,7 @@ static void MultiDimensionRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3004,8 +3015,8 @@ static void MultiDimensionRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -3052,8 +3063,8 @@ static void MultiDimensionRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3100,8 +3111,7 @@ static void MultiDimensionRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3287,8 +3297,7 @@ static void MultiDimensionRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 36, 0, 0); @@ -3328,8 +3337,8 @@ static void MultiDimensionRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 36, 0, 0); @@ -3365,8 +3374,8 @@ static void MultiDimensionRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 36, 0, 0); @@ -3402,8 +3411,7 @@ static void MultiDimensionRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 36, 0, 0); @@ -3495,9 +3503,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3541,8 +3547,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3582,8 +3587,8 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3625,9 +3630,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3661,8 +3664,8 @@ static void MultiDimensionRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3767,9 +3770,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3816,8 +3817,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3857,8 +3857,8 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3900,9 +3900,7 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3936,8 +3934,8 @@ static void MultiDimensionRCTrackLeftQuarterTurn3Bank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4040,9 +4038,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4088,8 +4084,8 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4165,8 +4161,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4282,8 +4277,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4369,8 +4363,8 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4405,9 +4399,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4553,8 +4545,8 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4586,9 +4578,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4624,8 +4614,8 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4671,8 +4661,8 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4748,8 +4738,8 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4781,8 +4771,7 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4818,8 +4807,8 @@ static void MultiDimensionRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4935,8 +4924,8 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4968,8 +4957,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5005,8 +4993,8 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5092,8 +5080,8 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5129,8 +5117,8 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5162,9 +5150,7 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5200,8 +5186,8 @@ static void MultiDimensionRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5876,8 +5862,8 @@ static void MultiDimensionRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5886,9 +5872,7 @@ static void MultiDimensionRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5998,8 +5982,8 @@ static void MultiDimensionRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6032,8 +6016,8 @@ static void MultiDimensionRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6042,9 +6026,7 @@ static void MultiDimensionRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6078,8 +6060,8 @@ static void MultiDimensionRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -6206,8 +6188,8 @@ static void MultiDimensionRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6217,8 +6199,7 @@ static void MultiDimensionRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6328,8 +6309,8 @@ static void MultiDimensionRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6362,8 +6343,8 @@ static void MultiDimensionRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6373,8 +6354,7 @@ static void MultiDimensionRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6408,8 +6388,8 @@ static void MultiDimensionRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -6555,8 +6535,8 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6565,9 +6545,7 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6642,8 +6620,7 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -6683,8 +6660,8 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6717,8 +6694,8 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6727,9 +6704,7 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6763,9 +6738,8 @@ static void MultiDimensionRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -6892,8 +6866,8 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6903,8 +6877,7 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6979,8 +6952,7 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -7020,8 +6992,8 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7054,8 +7026,8 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7065,8 +7037,7 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7100,8 +7071,8 @@ static void MultiDimensionRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -7187,8 +7158,7 @@ static void MultiDimensionRCTrackDiagFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7219,9 +7189,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7253,8 +7221,7 @@ static void MultiDimensionRCTrackDiagFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7313,9 +7280,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7353,8 +7318,7 @@ static void MultiDimensionRCTrackDiagFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7385,9 +7349,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7419,8 +7381,7 @@ static void MultiDimensionRCTrackDiagFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -7452,9 +7413,7 @@ static void MultiDimensionRCTrackDiagFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7594,8 +7553,7 @@ static void MultiDimensionRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7626,9 +7584,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7660,8 +7616,7 @@ static void MultiDimensionRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7720,9 +7675,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7760,8 +7713,7 @@ static void MultiDimensionRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7792,9 +7744,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7826,8 +7776,7 @@ static void MultiDimensionRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7859,9 +7808,7 @@ static void MultiDimensionRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -7913,8 +7860,7 @@ static void MultiDimensionRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7931,9 +7877,7 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7951,8 +7895,7 @@ static void MultiDimensionRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7983,9 +7926,7 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -8009,8 +7950,7 @@ static void MultiDimensionRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -8027,9 +7967,7 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -8047,8 +7985,7 @@ static void MultiDimensionRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -8066,9 +8003,7 @@ static void MultiDimensionRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8135,8 +8070,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8167,9 +8101,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8201,8 +8133,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8261,9 +8192,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8301,8 +8230,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8333,9 +8261,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8367,8 +8293,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8400,9 +8325,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8454,8 +8377,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8472,9 +8394,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8492,8 +8412,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8524,9 +8443,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8550,8 +8467,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8568,9 +8484,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8588,8 +8502,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8607,9 +8520,7 @@ static void MultiDimensionRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8662,8 +8573,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8680,9 +8590,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8700,8 +8608,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8732,9 +8639,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8758,8 +8663,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8776,9 +8680,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8796,8 +8698,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8815,9 +8716,7 @@ static void MultiDimensionRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -8884,8 +8783,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8916,9 +8814,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -8950,8 +8846,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9010,9 +8905,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9050,8 +8943,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9082,9 +8974,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9116,8 +9006,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9149,9 +9038,7 @@ static void MultiDimensionRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9217,8 +9104,7 @@ static void MultiDimensionRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9249,9 +9135,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9283,8 +9167,7 @@ static void MultiDimensionRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9343,9 +9226,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9369,8 +9250,7 @@ static void MultiDimensionRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9387,9 +9267,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9407,8 +9285,7 @@ static void MultiDimensionRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9426,9 +9303,7 @@ static void MultiDimensionRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9480,8 +9355,7 @@ static void MultiDimensionRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -9498,9 +9372,7 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -9518,8 +9390,7 @@ static void MultiDimensionRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -9550,9 +9421,7 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -9576,8 +9445,7 @@ static void MultiDimensionRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -9594,9 +9462,7 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -9614,8 +9480,7 @@ static void MultiDimensionRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -9633,9 +9498,7 @@ static void MultiDimensionRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9702,8 +9565,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9733,9 +9595,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -9766,8 +9626,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9825,9 +9684,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -9850,8 +9707,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9868,9 +9724,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9888,8 +9742,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9907,9 +9760,7 @@ static void MultiDimensionRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -9961,8 +9812,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9979,9 +9829,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -9999,8 +9847,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10031,9 +9878,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10057,8 +9902,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10075,9 +9919,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10095,8 +9937,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10114,9 +9955,7 @@ static void MultiDimensionRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -10169,8 +10008,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10187,9 +10025,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10207,8 +10043,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10239,9 +10074,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10265,8 +10098,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10283,9 +10115,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10303,8 +10133,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10322,9 +10151,7 @@ static void MultiDimensionRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -10390,8 +10217,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10422,9 +10248,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10456,8 +10280,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10516,9 +10339,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10542,8 +10363,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10560,9 +10380,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10580,8 +10398,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10599,9 +10416,7 @@ static void MultiDimensionRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -10653,8 +10468,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10674,9 +10488,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10694,8 +10506,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10726,9 +10537,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10752,8 +10561,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10770,9 +10578,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10790,8 +10596,7 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10810,8 +10615,8 @@ static void MultiDimensionRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -10863,8 +10668,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10881,9 +10685,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10904,8 +10706,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10936,9 +10737,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10962,8 +10761,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10980,9 +10778,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11000,8 +10796,7 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11020,8 +10815,8 @@ static void MultiDimensionRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -11073,8 +10868,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11094,9 +10888,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11114,8 +10906,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11146,9 +10937,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11172,8 +10961,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11190,9 +10978,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11210,8 +10996,7 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11230,8 +11015,8 @@ static void MultiDimensionRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -11283,8 +11068,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11301,9 +11085,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11324,8 +11106,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11356,9 +11137,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11382,8 +11161,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11400,9 +11178,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11420,8 +11196,7 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -11440,8 +11215,8 @@ static void MultiDimensionRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -11493,8 +11268,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11514,9 +11288,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11534,8 +11306,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11566,9 +11337,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11592,8 +11361,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11610,9 +11378,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11630,8 +11396,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11649,9 +11414,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -11703,8 +11466,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11721,9 +11483,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11744,8 +11504,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11776,9 +11535,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11802,8 +11559,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11820,9 +11576,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11840,8 +11594,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11859,9 +11612,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -11913,8 +11664,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -11934,9 +11684,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -11954,8 +11702,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -11986,9 +11733,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12012,8 +11757,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12030,9 +11774,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12050,8 +11792,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12069,9 +11810,7 @@ static void MultiDimensionRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -12123,8 +11862,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12141,9 +11879,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12164,8 +11900,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12196,9 +11931,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12222,8 +11955,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12240,9 +11972,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12260,8 +11990,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12279,9 +12008,7 @@ static void MultiDimensionRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -12333,8 +12060,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -12353,9 +12079,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -12372,8 +12096,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -12403,9 +12126,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -12428,8 +12149,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -12445,9 +12165,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -12464,8 +12182,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -12482,9 +12199,7 @@ static void MultiDimensionRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -12536,8 +12251,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -12553,9 +12267,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -12575,8 +12287,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -12606,9 +12317,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -12631,8 +12340,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -12648,9 +12356,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -12667,8 +12373,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -12685,9 +12390,7 @@ static void MultiDimensionRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -12739,8 +12442,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12760,9 +12462,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12780,8 +12480,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12812,9 +12511,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12838,8 +12535,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12856,9 +12552,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12876,8 +12570,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12895,9 +12588,7 @@ static void MultiDimensionRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -12949,8 +12640,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12967,9 +12657,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12990,8 +12678,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -13022,9 +12709,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -13048,8 +12733,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -13066,9 +12750,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -13086,8 +12768,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -13105,9 +12786,7 @@ static void MultiDimensionRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -13159,8 +12838,7 @@ static void MultiDimensionRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13177,9 +12855,7 @@ static void MultiDimensionRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13197,8 +12873,7 @@ static void MultiDimensionRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13229,9 +12904,7 @@ static void MultiDimensionRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13255,8 +12928,7 @@ static void MultiDimensionRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13273,9 +12945,7 @@ static void MultiDimensionRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13293,8 +12963,7 @@ static void MultiDimensionRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13313,8 +12982,8 @@ static void MultiDimensionRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -13366,8 +13035,7 @@ static void MultiDimensionRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13384,9 +13052,7 @@ static void MultiDimensionRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13404,8 +13070,7 @@ static void MultiDimensionRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13436,9 +13101,7 @@ static void MultiDimensionRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13462,8 +13125,7 @@ static void MultiDimensionRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13480,9 +13142,7 @@ static void MultiDimensionRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13500,8 +13160,7 @@ static void MultiDimensionRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13520,8 +13179,8 @@ static void MultiDimensionRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -13587,8 +13246,8 @@ static void MultiDimensionRCTrackLeftFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13618,8 +13277,8 @@ static void MultiDimensionRCTrackLeftFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13650,8 +13309,8 @@ static void MultiDimensionRCTrackLeftFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -13707,8 +13366,8 @@ static void MultiDimensionRCTrackRightFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13737,8 +13396,8 @@ static void MultiDimensionRCTrackRightFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13768,8 +13427,8 @@ static void MultiDimensionRCTrackRightFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -13822,8 +13481,8 @@ static void MultiDimensionRCTrackLeftFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -13860,8 +13519,8 @@ static void MultiDimensionRCTrackLeftFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13900,8 +13559,8 @@ static void MultiDimensionRCTrackLeftFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13941,8 +13600,8 @@ static void MultiDimensionRCTrackRightFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -13978,8 +13637,8 @@ static void MultiDimensionRCTrackRightFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -14018,8 +13677,8 @@ static void MultiDimensionRCTrackRightFlyerTwistDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -14067,8 +13726,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -14099,8 +13757,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); break; @@ -14131,8 +13788,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); break; @@ -14175,8 +13831,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -14207,8 +13862,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -14239,8 +13893,7 @@ static void MultiDimensionRCTrackMultidimInvertedFlatTo90DegQuarterLoopDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -14336,8 +13989,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -14368,8 +14020,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -14404,8 +14055,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -14442,8 +14092,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -14474,8 +14123,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -14510,8 +14158,7 @@ static void MultiDimensionRCTrackMultidim90DegUpToInvertedFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -14559,8 +14206,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -14591,8 +14237,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); break; @@ -14623,8 +14268,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); break; @@ -14667,8 +14311,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -14699,8 +14342,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -14731,8 +14373,7 @@ static void MultiDimensionRCTrackMultidimFlatTo90DegDownQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -14778,8 +14419,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -14810,8 +14450,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -14846,8 +14485,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -14884,8 +14522,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -14916,8 +14553,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -14952,8 +14588,7 @@ static void MultiDimensionRCTrackMultidimInverted90DegUpToFlatQuarterLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; diff --git a/src/openrct2/paint/track/coaster/ReverseFreefallCoaster.cpp b/src/openrct2/paint/track/coaster/ReverseFreefallCoaster.cpp index 40ccaa7d42..6db30c378d 100644 --- a/src/openrct2/paint/track/coaster/ReverseFreefallCoaster.cpp +++ b/src/openrct2/paint/track/coaster/ReverseFreefallCoaster.cpp @@ -235,29 +235,19 @@ static void PaintReverseFreefallRCStation( if (direction == 0 || direction == 2) { - // height -= 2 (height - 2) - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); - // height += 2 (height) - imageId = session.TrackColours.WithIndex(kPiecesStation[direction]); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 1 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height + 1 }, { 32, 20, 1 } }); } else if (direction == 1 || direction == 3) { - // height -= 2 (height - 2) - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); - // height += 2 (height) - imageId = session.TrackColours.WithIndex(kPiecesStation[direction]); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 1 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height + 1 }, { 20, 32, 1 } }); } DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); TrackPaintUtilDrawStationTunnel(session, direction, height); - TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 5, trackElement); + TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 5, trackElement, StationBaseType::b, -2); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -361,6 +351,7 @@ static void PaintReverseFreefallRCSlope( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + supportHeights[trackSequence]); + PaintUtilSetVerticalTunnel(session, height + 240); break; } } diff --git a/src/openrct2/paint/track/coaster/ReverserRollerCoaster.cpp b/src/openrct2/paint/track/coaster/ReverserRollerCoaster.cpp index 2ad13aeef2..4941e0fcd0 100644 --- a/src/openrct2/paint/track/coaster/ReverserRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/ReverserRollerCoaster.cpp @@ -80,22 +80,18 @@ static void ReverserRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { 21506, SPR_STATION_BASE_A_SW_NE }, - { 21507, SPR_STATION_BASE_A_NW_SE }, - { 21506, SPR_STATION_BASE_A_SW_NE }, - { 21507, SPR_STATION_BASE_A_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + 21506, + 21507, + 21506, + 21507, }; - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { { 0, 2, height }, { 32, 27, 2 } }); - PaintAddImageAsChildRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 2, height }, { 32, 27, 2 } }); + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, + { { 0, 2, height + 1 }, { 32, 27, 2 } }); DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::a, 0, 9, 11); TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -378,8 +374,7 @@ static void ReverserRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -409,8 +404,8 @@ static void ReverserRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -441,9 +436,8 @@ static void ReverserRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -452,8 +446,7 @@ static void ReverserRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -483,8 +476,8 @@ static void ReverserRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -605,8 +598,8 @@ static void ReverserRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -641,8 +634,8 @@ static void ReverserRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -758,8 +751,8 @@ static void ReverserRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -794,8 +787,8 @@ static void ReverserRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -911,9 +904,7 @@ static void ReverserRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); diff --git a/src/openrct2/paint/track/coaster/SideFrictionRollerCoaster.cpp b/src/openrct2/paint/track/coaster/SideFrictionRollerCoaster.cpp index 520119450a..ca7f4e324a 100644 --- a/src/openrct2/paint/track/coaster/SideFrictionRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/SideFrictionRollerCoaster.cpp @@ -153,19 +153,24 @@ static void SideFrictionRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4] = { - 21610, - 21611, - 21610, - 21611, + static constexpr ImageIndex imageIds[4][2] = { + { 21610, 21612 }, + { 21611, 21613 }, + { 21610, 21612 }, + { 21611, 21613 }, }; PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, { { 0, 2, height }, { 32, 27, 2 } }); DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); + if (!TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::none, 0, 9, 11)) + { + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height }, + { { 0, 2, height + 27 }, { 32, 27, 0 } }); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -532,8 +537,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -575,8 +579,8 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -619,9 +623,8 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -630,8 +633,7 @@ static void SideFrictionRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -673,8 +675,8 @@ static void SideFrictionRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -831,8 +833,8 @@ static void SideFrictionRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -879,8 +881,8 @@ static void SideFrictionRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1032,8 +1034,8 @@ static void SideFrictionRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1080,8 +1082,8 @@ static void SideFrictionRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1233,9 +1235,7 @@ static void SideFrictionRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); diff --git a/src/openrct2/paint/track/coaster/SingleRailRollerCoaster.cpp b/src/openrct2/paint/track/coaster/SingleRailRollerCoaster.cpp index 6e32dd8967..696deed824 100644 --- a/src/openrct2/paint/track/coaster/SingleRailRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/SingleRailRollerCoaster.cpp @@ -95,11 +95,23 @@ namespace OpenRCT2::SingleRailRC PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { (SPR_G2_SINGLE_RAIL_TRACK_BRAKE + 0), (SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE + 0), SPR_STATION_BASE_B_SW_NE }, - { (SPR_G2_SINGLE_RAIL_TRACK_BRAKE + 1), (SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE + 1), SPR_STATION_BASE_B_NW_SE }, - { (SPR_G2_SINGLE_RAIL_TRACK_BRAKE + 0), (SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE + 0), SPR_STATION_BASE_B_SW_NE }, - { (SPR_G2_SINGLE_RAIL_TRACK_BRAKE + 1), (SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE + 1), SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { + (SPR_G2_SINGLE_RAIL_TRACK_BRAKE + 0), + (SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE + 0), + }, + { + (SPR_G2_SINGLE_RAIL_TRACK_BRAKE + 1), + (SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE + 1), + }, + { + (SPR_G2_SINGLE_RAIL_TRACK_BRAKE + 0), + (SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE + 0), + }, + { + (SPR_G2_SINGLE_RAIL_TRACK_BRAKE + 1), + (SPR_G2_SINGLE_RAIL_TRACK_BLOCK_BRAKE + 1), + }, }; if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -114,11 +126,15 @@ namespace OpenRCT2::SingleRailRC session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][2]), - { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 4, 7); + if (TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::b, -2, 4, 7)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -890,9 +906,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -927,9 +941,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -973,8 +985,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1029,9 +1040,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1067,8 +1076,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1101,8 +1110,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1138,8 +1146,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1183,8 +1191,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1268,8 +1275,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1302,8 +1309,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1312,9 +1319,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1355,8 +1360,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1432,8 +1437,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1466,8 +1471,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1477,8 +1482,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1519,8 +1523,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1578,8 +1582,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1596,9 +1599,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1616,8 +1617,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1648,9 +1648,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1678,8 +1676,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1697,9 +1694,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1718,8 +1713,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1751,9 +1745,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1796,8 +1788,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1830,9 +1821,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1866,8 +1855,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1928,9 +1916,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1973,8 +1959,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2007,9 +1992,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2043,8 +2026,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2105,9 +2087,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2150,8 +2130,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2184,9 +2163,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2220,8 +2197,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2284,9 +2260,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2329,8 +2303,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2363,9 +2336,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2399,8 +2370,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2461,9 +2431,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2506,8 +2474,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -2539,9 +2506,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -2574,8 +2539,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -2635,9 +2599,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -2681,8 +2643,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2715,9 +2676,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2751,8 +2710,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2813,9 +2771,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2858,8 +2814,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -2892,9 +2847,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -2928,8 +2881,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -2992,9 +2944,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -3037,8 +2987,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3071,9 +3020,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3107,8 +3054,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3171,9 +3117,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3216,8 +3160,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3250,9 +3193,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3286,8 +3227,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3350,9 +3290,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3395,8 +3333,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -3429,9 +3366,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -3465,8 +3400,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -3529,9 +3463,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -3574,8 +3506,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3608,9 +3539,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3644,8 +3573,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3708,9 +3636,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3753,8 +3679,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3787,9 +3712,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3823,8 +3746,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3885,9 +3807,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4287,8 +4207,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4310,9 +4229,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4331,8 +4248,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4364,9 +4280,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4394,8 +4308,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4413,9 +4326,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4438,8 +4349,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4471,9 +4381,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4501,8 +4409,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4524,9 +4431,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4545,8 +4450,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4578,9 +4482,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4608,8 +4510,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4627,9 +4528,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4652,8 +4551,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4685,9 +4583,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4715,8 +4611,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4738,9 +4633,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4759,8 +4652,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4792,9 +4684,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4822,8 +4712,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4841,9 +4730,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4866,8 +4753,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4899,9 +4785,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4929,8 +4813,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4952,9 +4835,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4973,8 +4854,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5006,9 +4886,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5036,8 +4914,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5055,9 +4932,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5080,8 +4955,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5113,9 +4987,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5143,8 +5015,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -5165,9 +5036,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -5185,8 +5054,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -5217,9 +5085,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -5248,8 +5114,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -5266,9 +5131,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -5290,8 +5153,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -5322,9 +5184,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -5353,8 +5213,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5376,9 +5235,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5397,8 +5254,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5430,9 +5286,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5460,8 +5314,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5479,9 +5332,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5504,8 +5355,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5537,9 +5387,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -5567,8 +5415,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5586,9 +5433,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5607,8 +5452,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5640,9 +5484,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5670,8 +5512,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5689,9 +5530,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5710,8 +5549,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5743,9 +5581,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5800,9 +5636,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5841,9 +5675,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5895,8 +5727,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5959,9 +5790,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6001,8 +5830,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6039,8 +5868,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6080,8 +5908,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6133,8 +5961,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6226,8 +6053,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6264,8 +6091,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6274,9 +6101,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6321,8 +6146,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6406,8 +6231,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6444,8 +6269,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6455,8 +6280,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6501,8 +6325,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6569,9 +6393,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6625,8 +6447,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6678,8 +6499,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6739,8 +6559,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6807,9 +6626,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6849,8 +6666,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6887,8 +6704,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -6928,8 +6744,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6977,8 +6793,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7030,8 +6845,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7071,8 +6885,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7108,9 +6922,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7150,8 +6962,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7199,8 +7011,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8219,9 +8030,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8275,8 +8084,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8328,8 +8136,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8389,8 +8196,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8459,9 +8265,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8501,8 +8305,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8539,8 +8343,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8580,8 +8383,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8629,8 +8432,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8682,8 +8484,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8723,8 +8524,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8760,9 +8561,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8802,8 +8601,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8851,8 +8650,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8916,9 +8714,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8953,8 +8749,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8989,8 +8785,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9033,8 +8829,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9081,8 +8876,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9116,8 +8910,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9151,8 +8945,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9195,8 +8989,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9247,8 +9040,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9283,9 +9076,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9332,8 +9123,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9380,8 +9171,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9417,8 +9208,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9460,8 +9250,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9512,8 +9302,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9549,8 +9339,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9597,8 +9386,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9645,8 +9434,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9681,9 +9470,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9725,8 +9512,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9803,8 +9590,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9840,8 +9627,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9874,8 +9661,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9911,8 +9697,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9959,8 +9745,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10007,8 +9793,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10044,8 +9830,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10077,9 +9863,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10115,8 +9899,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10158,8 +9942,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10209,8 +9993,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10246,8 +10030,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10279,9 +10063,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10317,8 +10099,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10371,8 +10153,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10419,8 +10201,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10456,8 +10238,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10490,8 +10272,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10527,8 +10308,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10576,8 +10357,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10669,8 +10450,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10715,8 +10496,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10770,8 +10551,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10837,8 +10618,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -10883,8 +10664,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -10938,8 +10719,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11064,8 +10845,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -11565,8 +11346,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11627,8 +11408,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -11688,8 +11469,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11750,8 +11531,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -11827,8 +11608,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -11869,8 +11650,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -11902,9 +11683,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -11917,8 +11696,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -11987,8 +11766,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -12047,8 +11826,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::rightCorner, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::right, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -12089,8 +11868,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomRightSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -12123,8 +11902,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12137,8 +11915,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -12206,8 +11984,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -12313,8 +12091,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12356,9 +12134,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12393,8 +12169,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12430,8 +12205,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); @@ -12523,8 +12298,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12569,8 +12344,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12607,9 +12381,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12647,8 +12419,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); if (direction == 0 || direction == 3) @@ -12755,8 +12527,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12804,8 +12576,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -12895,8 +12667,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12944,8 +12716,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -13089,8 +12861,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13100,8 +12872,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -13281,8 +13053,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13292,8 +13064,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -13399,8 +13171,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -13431,8 +13202,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -13467,8 +13237,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -13529,9 +13298,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13585,8 +13352,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13642,8 +13408,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13697,8 +13462,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13749,9 +13513,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13809,8 +13571,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13862,8 +13623,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -13921,8 +13681,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14034,8 +13793,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -14077,8 +13836,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -14111,8 +13870,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -14145,8 +13903,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -14183,8 +13941,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -14296,8 +14054,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -14339,8 +14097,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -14372,9 +14130,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -14407,8 +14163,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -14445,8 +14201,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -14709,8 +14465,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14743,9 +14498,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14779,8 +14532,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14841,9 +14593,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -14886,8 +14636,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14920,9 +14669,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14956,8 +14703,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15020,9 +14766,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15065,8 +14809,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15099,9 +14842,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15135,8 +14876,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15199,9 +14939,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15244,8 +14982,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -15278,9 +15015,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -15314,8 +15049,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -15376,9 +15110,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -15386,9 +15118,9 @@ namespace OpenRCT2::SingleRailRC } } - // EnumsToFlags(PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - // PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - // PaintSegment::bottomRightSide); + // EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::bottom, + // PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, + // PaintSegment::bottomRight); // b4 // c8 cc // b8 c4 bc @@ -15480,8 +15212,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15518,8 +15250,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15528,9 +15260,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15575,8 +15305,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15660,8 +15390,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15698,8 +15428,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15709,8 +15439,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15755,8 +15484,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15810,8 +15539,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15848,8 +15577,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15858,9 +15587,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15897,8 +15624,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15992,8 +15719,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16030,8 +15757,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16041,8 +15768,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16079,8 +15805,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16122,8 +15848,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -16184,8 +15909,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16207,9 +15931,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16228,8 +15950,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16261,9 +15982,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16291,8 +16010,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16310,9 +16028,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16335,8 +16051,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16368,9 +16083,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16398,8 +16111,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16421,9 +16133,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16442,8 +16152,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16475,9 +16184,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16505,8 +16212,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16524,9 +16230,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16549,8 +16253,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16582,9 +16285,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16642,8 +16343,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16661,9 +16361,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16682,8 +16380,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16715,9 +16412,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16745,8 +16440,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16764,9 +16458,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16785,8 +16477,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16818,9 +16509,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16848,8 +16537,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16867,9 +16555,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16888,8 +16574,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16921,9 +16606,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16951,8 +16634,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16970,9 +16652,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16991,8 +16671,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17024,9 +16703,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17086,8 +16763,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17105,9 +16781,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17126,8 +16800,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17159,9 +16832,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17189,8 +16860,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17208,9 +16878,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17229,8 +16897,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17262,9 +16929,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17306,8 +16971,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17329,9 +16993,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17350,8 +17012,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17383,9 +17044,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17413,8 +17072,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17432,9 +17090,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17457,8 +17113,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17490,9 +17145,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17520,8 +17173,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17543,9 +17195,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17564,8 +17214,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17597,9 +17246,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17627,8 +17274,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17646,9 +17292,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17671,8 +17315,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17704,9 +17347,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17820,8 +17461,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17858,8 +17499,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17868,9 +17509,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17915,8 +17554,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18000,8 +17639,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18038,8 +17677,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18049,8 +17688,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18095,8 +17733,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18150,8 +17788,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18188,8 +17826,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18198,9 +17836,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18237,8 +17873,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18330,8 +17966,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18368,8 +18004,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18379,8 +18015,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18417,8 +18052,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18460,8 +18095,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -18551,8 +18185,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32); @@ -18570,9 +18203,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18591,8 +18222,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18629,9 +18259,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -18649,9 +18278,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18670,8 +18297,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18709,9 +18335,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -18729,9 +18354,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -18750,8 +18373,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -18784,9 +18406,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 136); @@ -18814,8 +18434,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -18833,9 +18452,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -18854,8 +18471,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -18893,9 +18509,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -18913,9 +18528,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -18934,8 +18547,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -18973,9 +18585,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -18993,9 +18604,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19014,8 +18623,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19047,9 +18655,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19077,8 +18683,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19096,9 +18701,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19117,8 +18720,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19156,9 +18758,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19176,9 +18777,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19197,8 +18796,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19236,9 +18834,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -19256,9 +18853,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -19277,8 +18872,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -19311,9 +18905,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19341,8 +18933,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 136); @@ -19360,9 +18951,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19381,8 +18970,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19420,9 +19008,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19440,9 +19027,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -19461,8 +19046,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -19500,9 +19084,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19520,9 +19103,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -19541,8 +19122,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -19574,9 +19154,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32); @@ -19608,8 +19186,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19626,9 +19203,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19646,8 +19221,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19688,8 +19262,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -19722,8 +19296,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -19733,8 +19307,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -19800,8 +19374,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19819,8 +19392,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19837,9 +19409,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19880,8 +19450,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -19914,8 +19484,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -19925,8 +19495,8 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre, PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -20003,8 +19573,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -20021,9 +19590,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -20041,8 +19608,7 @@ namespace OpenRCT2::SingleRailRC session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -20073,9 +19639,7 @@ namespace OpenRCT2::SingleRailRC PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); diff --git a/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp b/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp index d7913e253f..1a9747de15 100644 --- a/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/StandUpRollerCoaster.cpp @@ -121,11 +121,11 @@ static void StandUpRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][2] = { - { 25567, SPR_STATION_BASE_A_SW_NE }, - { 25568, SPR_STATION_BASE_A_NW_SE }, - { 25567, SPR_STATION_BASE_A_SW_NE }, - { 25568, SPR_STATION_BASE_A_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + 25567, + 25568, + 25567, + 25568, }; if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -138,14 +138,18 @@ static void StandUpRCTrackStation( else { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 6, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 6, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); + if (TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::a, 0, 9, 11)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -684,9 +688,7 @@ static void StandUpRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -718,8 +720,8 @@ static void StandUpRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -747,9 +749,7 @@ static void StandUpRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -781,8 +781,8 @@ static void StandUpRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -820,9 +820,7 @@ static void StandUpRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1084,9 +1082,7 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1122,8 +1118,8 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1155,9 +1151,7 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1193,8 +1187,8 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1246,9 +1240,7 @@ static void StandUpRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1641,9 +1633,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1700,8 +1690,8 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1754,9 +1744,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1813,8 +1801,8 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1880,9 +1868,7 @@ static void StandUpRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1953,9 +1939,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2012,8 +1996,8 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2066,8 +2050,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -2124,8 +2107,8 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2191,9 +2174,7 @@ static void StandUpRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2255,9 +2236,7 @@ static void StandUpRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2287,8 +2266,8 @@ static void StandUpRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2318,8 +2297,8 @@ static void StandUpRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2357,9 +2336,7 @@ static void StandUpRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2402,9 +2379,7 @@ static void StandUpRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2434,8 +2409,8 @@ static void StandUpRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2465,8 +2440,8 @@ static void StandUpRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2504,9 +2479,7 @@ static void StandUpRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2557,8 +2530,8 @@ static void StandUpRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2596,8 +2569,8 @@ static void StandUpRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2625,9 +2598,7 @@ static void StandUpRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2656,8 +2627,8 @@ static void StandUpRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2692,8 +2663,8 @@ static void StandUpRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2721,9 +2692,7 @@ static void StandUpRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2761,8 +2730,8 @@ static void StandUpRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2801,8 +2770,8 @@ static void StandUpRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -3086,9 +3055,7 @@ static void StandUpRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3119,9 +3086,7 @@ static void StandUpRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3166,9 +3131,7 @@ static void StandUpRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3234,9 +3197,7 @@ static void StandUpRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3271,9 +3232,7 @@ static void StandUpRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3325,9 +3284,7 @@ static void StandUpRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3419,9 +3376,7 @@ static void StandUpRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3505,9 +3460,7 @@ static void StandUpRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3590,9 +3543,7 @@ static void StandUpRCTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3676,9 +3627,7 @@ static void StandUpRCTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3800,8 +3749,8 @@ static void StandUpRCTrackHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -3939,8 +3888,8 @@ static void StandUpRCTrackLeftCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4000,8 +3949,8 @@ static void StandUpRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4062,8 +4011,8 @@ static void StandUpRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -4149,8 +4098,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4185,9 +4134,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4240,8 +4187,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4294,8 +4241,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4331,8 +4278,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4380,8 +4326,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4439,8 +4385,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4476,8 +4422,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4530,8 +4475,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4584,8 +4529,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4620,9 +4565,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4670,8 +4613,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4759,8 +4702,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4796,8 +4739,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4829,9 +4772,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4867,8 +4808,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4921,8 +4862,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4975,8 +4916,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5012,8 +4953,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5045,8 +4986,7 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5082,8 +5022,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5131,8 +5071,8 @@ static void StandUpRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5190,8 +5130,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5227,8 +5167,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5260,8 +5200,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5297,8 +5236,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5351,8 +5290,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5405,8 +5344,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5442,8 +5381,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5475,9 +5414,7 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5513,8 +5450,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5562,8 +5499,8 @@ static void StandUpRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5729,8 +5666,8 @@ static void StandUpRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5763,8 +5700,8 @@ static void StandUpRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5773,9 +5710,7 @@ static void StandUpRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5816,8 +5751,8 @@ static void StandUpRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5893,8 +5828,8 @@ static void StandUpRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5927,8 +5862,8 @@ static void StandUpRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5938,8 +5873,7 @@ static void StandUpRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5980,8 +5914,8 @@ static void StandUpRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6082,8 +6016,8 @@ static void StandUpRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6116,8 +6050,8 @@ static void StandUpRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6126,9 +6060,7 @@ static void StandUpRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6169,8 +6101,8 @@ static void StandUpRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6253,8 +6185,8 @@ static void StandUpRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6287,8 +6219,8 @@ static void StandUpRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6298,8 +6230,7 @@ static void StandUpRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6340,8 +6271,8 @@ static void StandUpRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -6430,9 +6361,7 @@ static void StandUpRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6463,8 +6392,7 @@ static void StandUpRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6496,8 +6424,7 @@ static void StandUpRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6556,9 +6483,7 @@ static void StandUpRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6599,9 +6524,7 @@ static void StandUpRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6632,8 +6555,7 @@ static void StandUpRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6665,8 +6587,7 @@ static void StandUpRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6725,9 +6646,7 @@ static void StandUpRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6768,9 +6687,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6801,8 +6718,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6834,8 +6750,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6894,9 +6809,7 @@ static void StandUpRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6937,9 +6850,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6970,8 +6881,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7003,8 +6913,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7063,9 +6972,7 @@ static void StandUpRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7106,9 +7013,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7139,8 +7044,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7172,8 +7076,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7232,9 +7135,7 @@ static void StandUpRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7275,9 +7176,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7308,8 +7207,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7341,8 +7239,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7401,9 +7298,7 @@ static void StandUpRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7444,9 +7339,7 @@ static void StandUpRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7477,8 +7370,7 @@ static void StandUpRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7510,8 +7402,7 @@ static void StandUpRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7570,9 +7461,7 @@ static void StandUpRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7613,9 +7502,7 @@ static void StandUpRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7646,8 +7533,7 @@ static void StandUpRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7679,8 +7565,7 @@ static void StandUpRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7739,9 +7624,7 @@ static void StandUpRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7782,9 +7665,7 @@ static void StandUpRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7814,8 +7695,7 @@ static void StandUpRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -7846,8 +7726,7 @@ static void StandUpRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7905,9 +7784,7 @@ static void StandUpRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -7949,9 +7826,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7982,8 +7857,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8015,8 +7889,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8075,9 +7948,7 @@ static void StandUpRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8118,9 +7989,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8151,8 +8020,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8184,8 +8052,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8244,9 +8111,7 @@ static void StandUpRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8287,9 +8152,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8320,8 +8183,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8353,8 +8215,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8413,9 +8274,7 @@ static void StandUpRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8442,9 +8301,7 @@ static void StandUpRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8464,8 +8321,7 @@ static void StandUpRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8483,8 +8339,7 @@ static void StandUpRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8515,9 +8370,7 @@ static void StandUpRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8544,9 +8397,7 @@ static void StandUpRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8563,8 +8414,7 @@ static void StandUpRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8585,8 +8435,7 @@ static void StandUpRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8617,9 +8466,7 @@ static void StandUpRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8646,9 +8493,7 @@ static void StandUpRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8668,8 +8513,7 @@ static void StandUpRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8687,8 +8531,7 @@ static void StandUpRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8719,9 +8562,7 @@ static void StandUpRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8748,9 +8589,7 @@ static void StandUpRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8767,8 +8606,7 @@ static void StandUpRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8789,8 +8627,7 @@ static void StandUpRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8821,9 +8658,7 @@ static void StandUpRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8850,9 +8685,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8872,8 +8705,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8891,8 +8723,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8923,9 +8754,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8952,9 +8781,7 @@ static void StandUpRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8971,8 +8798,7 @@ static void StandUpRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8993,8 +8819,7 @@ static void StandUpRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9025,9 +8850,7 @@ static void StandUpRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9054,9 +8877,7 @@ static void StandUpRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9076,8 +8897,7 @@ static void StandUpRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9095,8 +8915,7 @@ static void StandUpRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9127,9 +8946,7 @@ static void StandUpRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9156,9 +8973,7 @@ static void StandUpRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9175,8 +8990,7 @@ static void StandUpRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9197,8 +9011,7 @@ static void StandUpRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9229,9 +9042,7 @@ static void StandUpRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9258,9 +9069,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9279,8 +9088,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -9297,8 +9105,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9328,9 +9135,7 @@ static void StandUpRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -9358,9 +9163,7 @@ static void StandUpRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9376,8 +9179,7 @@ static void StandUpRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -9397,8 +9199,7 @@ static void StandUpRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9428,9 +9229,7 @@ static void StandUpRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -9458,9 +9257,7 @@ static void StandUpRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9480,8 +9277,7 @@ static void StandUpRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9499,8 +9295,7 @@ static void StandUpRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9531,9 +9326,7 @@ static void StandUpRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9560,9 +9353,7 @@ static void StandUpRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9579,8 +9370,7 @@ static void StandUpRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9601,8 +9391,7 @@ static void StandUpRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9633,9 +9422,7 @@ static void StandUpRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9662,9 +9449,7 @@ static void StandUpRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9681,8 +9466,7 @@ static void StandUpRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9700,8 +9484,7 @@ static void StandUpRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9732,9 +9515,7 @@ static void StandUpRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9761,9 +9542,7 @@ static void StandUpRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9780,8 +9559,7 @@ static void StandUpRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9799,8 +9577,7 @@ static void StandUpRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9831,9 +9608,7 @@ static void StandUpRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9989,9 +9764,7 @@ static void StandUpRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10008,8 +9781,7 @@ static void StandUpRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10027,8 +9799,7 @@ static void StandUpRCTrackDiagFlatTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10059,9 +9830,7 @@ static void StandUpRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10087,9 +9856,7 @@ static void StandUpRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10106,8 +9873,7 @@ static void StandUpRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10125,8 +9891,7 @@ static void StandUpRCTrackDiag60DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10157,9 +9922,7 @@ static void StandUpRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10185,9 +9948,7 @@ static void StandUpRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10204,8 +9965,7 @@ static void StandUpRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10223,8 +9983,7 @@ static void StandUpRCTrackDiagFlatTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10255,9 +10014,7 @@ static void StandUpRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10283,9 +10040,7 @@ static void StandUpRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10302,8 +10057,7 @@ static void StandUpRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10321,8 +10075,7 @@ static void StandUpRCTrackDiag60DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10353,9 +10106,7 @@ static void StandUpRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -12064,9 +11815,7 @@ static void StandUpRCTrackLeftBankedQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12138,9 +11887,7 @@ static void StandUpRCTrackLeftBankedQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12190,9 +11937,7 @@ static void StandUpRCTrackRightBankedQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12264,9 +12009,7 @@ static void StandUpRCTrackRightBankedQuarterTurn3Tile25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12334,9 +12077,7 @@ static void StandUpRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12376,8 +12117,8 @@ static void StandUpRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12413,9 +12154,7 @@ static void StandUpRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -12455,8 +12194,8 @@ static void StandUpRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12509,9 +12248,7 @@ static void StandUpRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12561,9 +12298,7 @@ static void StandUpRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12603,8 +12338,8 @@ static void StandUpRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12640,8 +12375,7 @@ static void StandUpRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -12681,8 +12415,8 @@ static void StandUpRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12735,9 +12469,7 @@ static void StandUpRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12837,8 +12569,8 @@ static void StandUpRCTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12871,8 +12603,8 @@ static void StandUpRCTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12881,9 +12613,7 @@ static void StandUpRCTrackLeftEighthToDiagUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12924,8 +12654,8 @@ static void StandUpRCTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13007,8 +12737,8 @@ static void StandUpRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13041,8 +12771,8 @@ static void StandUpRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13052,8 +12782,7 @@ static void StandUpRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13094,8 +12823,8 @@ static void StandUpRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13145,8 +12874,8 @@ static void StandUpRCTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13179,8 +12908,8 @@ static void StandUpRCTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13189,8 +12918,7 @@ static void StandUpRCTrackLeftEighthToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13223,8 +12951,8 @@ static void StandUpRCTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13316,8 +13044,8 @@ static void StandUpRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13350,8 +13078,8 @@ static void StandUpRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13361,8 +13089,7 @@ static void StandUpRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13395,8 +13122,8 @@ static void StandUpRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13440,7 +13167,7 @@ static void StandUpRCTrackRightEighthToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -13502,9 +13229,7 @@ static void StandUpRCTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13526,8 +13251,7 @@ static void StandUpRCTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13546,8 +13270,7 @@ static void StandUpRCTrackDiagUp25ToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13579,9 +13302,7 @@ static void StandUpRCTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13608,9 +13329,7 @@ static void StandUpRCTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13628,8 +13347,7 @@ static void StandUpRCTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13652,8 +13370,7 @@ static void StandUpRCTrackDiagUp25ToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13685,9 +13402,7 @@ static void StandUpRCTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -13714,9 +13429,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -13738,8 +13451,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -13758,8 +13470,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -13791,9 +13502,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -13820,9 +13529,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -13840,8 +13547,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -13864,8 +13570,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -13897,9 +13602,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -13958,9 +13661,7 @@ static void StandUpRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -13978,8 +13679,7 @@ static void StandUpRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -13998,8 +13698,7 @@ static void StandUpRCTrackDiagLeftBankedFlatToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14031,9 +13730,7 @@ static void StandUpRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14060,9 +13757,7 @@ static void StandUpRCTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14080,8 +13775,7 @@ static void StandUpRCTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14100,8 +13794,7 @@ static void StandUpRCTrackDiagRightBankedFlatToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14133,9 +13826,7 @@ static void StandUpRCTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14162,9 +13853,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14182,8 +13871,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14202,8 +13890,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToLeftBankedFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14235,9 +13922,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14264,9 +13949,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14284,8 +13967,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14304,8 +13986,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToRightBankedFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14337,9 +14018,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14398,9 +14077,7 @@ static void StandUpRCTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14418,8 +14095,7 @@ static void StandUpRCTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14438,8 +14114,7 @@ static void StandUpRCTrackDiagUp25LeftBanked( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14471,9 +14146,7 @@ static void StandUpRCTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14500,9 +14173,7 @@ static void StandUpRCTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14520,8 +14191,7 @@ static void StandUpRCTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14540,8 +14210,7 @@ static void StandUpRCTrackDiagUp25RightBanked( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14573,9 +14242,7 @@ static void StandUpRCTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14616,9 +14283,7 @@ static void StandUpRCTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14640,8 +14305,7 @@ static void StandUpRCTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14660,8 +14324,7 @@ static void StandUpRCTrackDiagFlatToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14693,9 +14356,7 @@ static void StandUpRCTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14722,9 +14383,7 @@ static void StandUpRCTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14742,8 +14401,7 @@ static void StandUpRCTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14766,8 +14424,7 @@ static void StandUpRCTrackDiagFlatToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14799,9 +14456,7 @@ static void StandUpRCTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -14828,9 +14483,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14852,8 +14505,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14872,8 +14524,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14905,9 +14556,7 @@ static void StandUpRCTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14934,9 +14583,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14954,8 +14601,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -14978,8 +14624,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15011,9 +14656,7 @@ static void StandUpRCTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15135,8 +14778,8 @@ static void StandUpRCTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15173,8 +14816,8 @@ static void StandUpRCTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15183,9 +14826,7 @@ static void StandUpRCTrackLeftEighthBankToDiagUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15230,8 +14871,8 @@ static void StandUpRCTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15321,8 +14962,8 @@ static void StandUpRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15359,8 +15000,8 @@ static void StandUpRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15370,8 +15011,7 @@ static void StandUpRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15416,8 +15056,8 @@ static void StandUpRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15471,8 +15111,8 @@ static void StandUpRCTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15509,8 +15149,8 @@ static void StandUpRCTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15519,8 +15159,7 @@ static void StandUpRCTrackLeftEighthBankToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15557,8 +15196,8 @@ static void StandUpRCTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15656,8 +15295,8 @@ static void StandUpRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15694,8 +15333,8 @@ static void StandUpRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15705,8 +15344,7 @@ static void StandUpRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15743,8 +15381,8 @@ static void StandUpRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15792,7 +15430,7 @@ static void StandUpRCTrackRightEighthBankToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -15885,9 +15523,7 @@ static void StandUpRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -15967,9 +15603,7 @@ static void StandUpRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16025,9 +15659,7 @@ static void StandUpRCTrackRightBankToRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16107,9 +15739,7 @@ static void StandUpRCTrackRightBankToRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -16176,8 +15806,8 @@ static void StandUpRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -16221,8 +15851,8 @@ static void StandUpRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16249,9 +15879,7 @@ static void StandUpRCTrackLeftLargeCorkscrewUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16264,8 +15892,8 @@ static void StandUpRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -16337,8 +15965,8 @@ static void StandUpRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -16396,8 +16024,8 @@ static void StandUpRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::rightCorner, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::right, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -16441,8 +16069,8 @@ static void StandUpRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomRightSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16470,8 +16098,7 @@ static void StandUpRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16484,8 +16111,8 @@ static void StandUpRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -16556,8 +16183,8 @@ static void StandUpRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -16623,7 +16250,7 @@ static void StandUpRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -16660,7 +16287,7 @@ static void StandUpRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -16695,7 +16322,7 @@ static void StandUpRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -16792,8 +16419,8 @@ static void StandUpRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16833,9 +16460,7 @@ static void StandUpRCTrackLeftMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -16874,8 +16499,7 @@ static void StandUpRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -16912,8 +16536,8 @@ static void StandUpRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); @@ -17008,8 +16632,8 @@ static void StandUpRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17050,8 +16674,7 @@ static void StandUpRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -17090,9 +16713,7 @@ static void StandUpRCTrackRightMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -17129,8 +16750,8 @@ static void StandUpRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); if (direction == 0 || direction == 3) @@ -17281,8 +16902,8 @@ static void StandUpRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -17323,8 +16944,8 @@ static void StandUpRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -17357,8 +16978,7 @@ static void StandUpRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -17397,8 +17017,8 @@ static void StandUpRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -17435,8 +17055,8 @@ static void StandUpRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -17569,8 +17189,8 @@ static void StandUpRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -17611,8 +17231,8 @@ static void StandUpRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -17644,9 +17264,7 @@ static void StandUpRCTrackRightLargeHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -17685,8 +17303,8 @@ static void StandUpRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -17723,8 +17341,8 @@ static void StandUpRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -17798,8 +17416,8 @@ static void StandUpRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -17838,8 +17456,8 @@ static void StandUpRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17887,8 +17505,8 @@ static void StandUpRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17948,8 +17566,8 @@ static void StandUpRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -17988,8 +17606,8 @@ static void StandUpRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18037,8 +17655,8 @@ static void StandUpRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18149,8 +17767,8 @@ static void StandUpRCTrackLeftZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18198,8 +17816,8 @@ static void StandUpRCTrackLeftZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -18295,8 +17913,8 @@ static void StandUpRCTrackRightZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18344,8 +17962,8 @@ static void StandUpRCTrackRightZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -18483,8 +18101,8 @@ static void StandUpRCTrackLeftLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -18494,8 +18112,8 @@ static void StandUpRCTrackLeftLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -18661,8 +18279,8 @@ static void StandUpRCTrackRightLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -18672,8 +18290,8 @@ static void StandUpRCTrackRightLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) diff --git a/src/openrct2/paint/track/coaster/Steeplechase.cpp b/src/openrct2/paint/track/coaster/Steeplechase.cpp index a13a532a92..2ba3a9f947 100644 --- a/src/openrct2/paint/track/coaster/Steeplechase.cpp +++ b/src/openrct2/paint/track/coaster/Steeplechase.cpp @@ -81,21 +81,24 @@ static void SteeplechaseTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { 28635, SPR_STATION_BASE_B_SW_NE }, - { 28636, SPR_STATION_BASE_B_NW_SE }, - { 28635, SPR_STATION_BASE_B_SW_NE }, - { 28636, SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + 28635, + 28636, + 28635, + 28636, }; - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), - { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 3 } }); - PaintAddImageAsChildRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 6, height }, - { { 0, 0, height }, { 32, 20, 3 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 6, height }, + { { 0, 6, height + 1 }, { 32, 20, 3 } }); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + } + else + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -359,9 +362,7 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -393,8 +394,8 @@ static void SteeplechaseTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -422,9 +423,7 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -456,8 +455,8 @@ static void SteeplechaseTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -504,9 +503,7 @@ static void SteeplechaseTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -560,9 +557,7 @@ static void SteeplechaseTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -593,8 +588,8 @@ static void SteeplechaseTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -624,8 +619,8 @@ static void SteeplechaseTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -664,9 +659,7 @@ static void SteeplechaseTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -709,9 +702,7 @@ static void SteeplechaseTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -742,8 +733,8 @@ static void SteeplechaseTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -774,8 +765,8 @@ static void SteeplechaseTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -813,9 +804,7 @@ static void SteeplechaseTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -863,9 +852,7 @@ static void SteeplechaseTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -897,9 +884,7 @@ static void SteeplechaseTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -943,9 +928,7 @@ static void SteeplechaseTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1058,8 +1041,8 @@ static void SteeplechaseTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1092,8 +1075,8 @@ static void SteeplechaseTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1102,9 +1085,7 @@ static void SteeplechaseTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1139,8 +1120,8 @@ static void SteeplechaseTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1217,8 +1198,8 @@ static void SteeplechaseTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1251,8 +1232,8 @@ static void SteeplechaseTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1262,8 +1243,7 @@ static void SteeplechaseTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1298,8 +1278,8 @@ static void SteeplechaseTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1390,9 +1370,7 @@ static void SteeplechaseTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1423,8 +1401,7 @@ static void SteeplechaseTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1456,8 +1433,7 @@ static void SteeplechaseTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1490,9 +1466,7 @@ static void SteeplechaseTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1533,9 +1507,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1566,8 +1538,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1599,8 +1570,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1633,9 +1603,7 @@ static void SteeplechaseTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1676,9 +1644,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1709,8 +1675,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1742,8 +1707,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1776,9 +1740,7 @@ static void SteeplechaseTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1819,9 +1781,7 @@ static void SteeplechaseTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1852,8 +1812,7 @@ static void SteeplechaseTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1885,8 +1844,7 @@ static void SteeplechaseTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1919,9 +1877,7 @@ static void SteeplechaseTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -1962,9 +1918,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1994,8 +1948,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -2026,8 +1979,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -2059,9 +2011,7 @@ static void SteeplechaseTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -2103,9 +2053,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2136,8 +2084,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2169,8 +2116,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2203,9 +2149,7 @@ static void SteeplechaseTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); diff --git a/src/openrct2/paint/track/coaster/SuspendedSwingingCoaster.cpp b/src/openrct2/paint/track/coaster/SuspendedSwingingCoaster.cpp index 951c202136..5e166bef07 100644 --- a/src/openrct2/paint/track/coaster/SuspendedSwingingCoaster.cpp +++ b/src/openrct2/paint/track/coaster/SuspendedSwingingCoaster.cpp @@ -87,24 +87,24 @@ static void SuspendedSwingingRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { SPR_STATION_BASE_C_SW_NE, 25963, SPR_STATION_INVERTED_BAR_D_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 25964, SPR_STATION_INVERTED_BAR_D_NW_SE }, - { SPR_STATION_BASE_C_SW_NE, 25963, SPR_STATION_INVERTED_BAR_D_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 25964, SPR_STATION_INVERTED_BAR_D_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { 25963, SPR_STATION_INVERTED_BAR_D_SW_NE }, + { 25964, SPR_STATION_INVERTED_BAR_D_NW_SE }, + { 25963, SPR_STATION_INVERTED_BAR_D_SW_NE }, + { 25964, SPR_STATION_INVERTED_BAR_D_NW_SE }, }; - + const bool stationDrawn = TrackPaintUtilDrawStationInverted( + session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height + 29 }, + session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height + 29 }, { { 0, 6, height + 29 }, { 32, 20, 3 } }); - PaintAddImageAsChildRotated( - session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 29 }, - { { 0, 6, height + 29 }, { 32, 20, 3 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); + if (stationDrawn) + { + PaintAddImageAsChildRotated( + session, direction, session.SupportColours.WithIndex(imageIds[direction][1]), { 0, 6, height + 29 }, + { { 0, 6, height + 29 }, { 32, 20, 3 } }); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } TrackPaintUtilDrawStationTunnelTall(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -666,8 +666,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -708,8 +708,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -740,9 +740,7 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -776,8 +774,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -811,8 +809,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -874,8 +872,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -914,8 +912,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -943,9 +941,7 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -978,8 +974,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -1009,8 +1005,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1062,8 +1058,8 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1102,8 +1098,8 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -1131,8 +1127,7 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -1165,8 +1160,8 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -1196,8 +1191,8 @@ static void SuspendedSwingingRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1268,9 +1263,7 @@ static void SuspendedSwingingRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 44, 0, 0); @@ -1306,8 +1299,8 @@ static void SuspendedSwingingRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 44, 0, 0); @@ -1339,8 +1332,8 @@ static void SuspendedSwingingRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 44, 0, 0); @@ -1371,9 +1364,7 @@ static void SuspendedSwingingRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 44, 0, 0); @@ -1423,9 +1414,7 @@ static void SuspendedSwingingRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 44, 0, 0); @@ -1461,8 +1450,8 @@ static void SuspendedSwingingRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 44, 0, 0); @@ -1494,8 +1483,8 @@ static void SuspendedSwingingRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 44, 0, 0); @@ -1526,9 +1515,7 @@ static void SuspendedSwingingRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 44, 0, 0); @@ -1583,8 +1570,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1625,9 +1612,7 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1661,8 +1646,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1724,8 +1709,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1768,8 +1753,8 @@ static void SuspendedSwingingRCTrackLeftQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1821,8 +1806,8 @@ static void SuspendedSwingingRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1865,8 +1850,8 @@ static void SuspendedSwingingRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1973,8 +1958,8 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2017,8 +2002,8 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2050,9 +2035,7 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2088,8 +2071,8 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2123,8 +2106,8 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2180,8 +2163,8 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2224,8 +2207,8 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2257,8 +2240,7 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2294,8 +2276,8 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2329,8 +2311,8 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2386,8 +2368,8 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2430,8 +2412,8 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2463,9 +2445,7 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2501,8 +2481,8 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2536,8 +2516,8 @@ static void SuspendedSwingingRCTrackLeftQuarterHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2593,8 +2573,8 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2637,8 +2617,8 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2670,8 +2650,7 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2707,8 +2686,8 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2742,8 +2721,8 @@ static void SuspendedSwingingRCTrackRightQuarterHelixLargeDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2799,8 +2778,7 @@ static void SuspendedSwingingRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -2840,8 +2818,8 @@ static void SuspendedSwingingRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2874,8 +2852,8 @@ static void SuspendedSwingingRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2884,9 +2862,7 @@ static void SuspendedSwingingRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2920,8 +2896,8 @@ static void SuspendedSwingingRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -2984,9 +2960,7 @@ static void SuspendedSwingingRCTrackRightEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -3026,8 +3000,8 @@ static void SuspendedSwingingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3060,8 +3034,8 @@ static void SuspendedSwingingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3071,8 +3045,7 @@ static void SuspendedSwingingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -3106,8 +3079,8 @@ static void SuspendedSwingingRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -3207,9 +3180,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3240,8 +3211,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3273,8 +3243,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3306,9 +3275,7 @@ static void SuspendedSwingingRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -3355,9 +3322,7 @@ static void SuspendedSwingingRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -3374,8 +3339,7 @@ static void SuspendedSwingingRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -3393,8 +3357,7 @@ static void SuspendedSwingingRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -3412,9 +3375,7 @@ static void SuspendedSwingingRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -3475,9 +3436,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -3508,8 +3467,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -3541,8 +3499,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -3574,9 +3531,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -3623,9 +3578,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -3642,8 +3595,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -3661,8 +3613,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -3680,9 +3631,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -3729,9 +3678,7 @@ static void SuspendedSwingingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -3748,8 +3695,7 @@ static void SuspendedSwingingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -3767,8 +3713,7 @@ static void SuspendedSwingingRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -3786,9 +3731,7 @@ static void SuspendedSwingingRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -3849,9 +3792,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3882,8 +3823,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3915,8 +3855,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3948,9 +3887,7 @@ static void SuspendedSwingingRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4011,9 +3948,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4044,8 +3979,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4077,8 +4011,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4110,9 +4043,7 @@ static void SuspendedSwingingRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4159,9 +4090,7 @@ static void SuspendedSwingingRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -4178,8 +4107,7 @@ static void SuspendedSwingingRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -4197,8 +4125,7 @@ static void SuspendedSwingingRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -4215,9 +4142,7 @@ static void SuspendedSwingingRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -4258,9 +4183,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -4290,8 +4213,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -4322,8 +4244,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -4354,9 +4275,7 @@ static void SuspendedSwingingRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4403,9 +4322,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -4422,8 +4339,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -4441,8 +4357,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -4460,9 +4375,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4509,9 +4422,7 @@ static void SuspendedSwingingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -4528,8 +4439,7 @@ static void SuspendedSwingingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -4547,8 +4457,7 @@ static void SuspendedSwingingRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -4566,9 +4475,7 @@ static void SuspendedSwingingRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -4629,9 +4536,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4662,8 +4567,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4695,8 +4599,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -4728,9 +4631,7 @@ static void SuspendedSwingingRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) diff --git a/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp b/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp index b527a92e20..9c1025fe08 100644 --- a/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/TwisterRollerCoaster.cpp @@ -110,11 +110,11 @@ static void TwisterRCTrackStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][2] = { - { 17154, SPR_STATION_BASE_A_SW_NE }, - { 17155, SPR_STATION_BASE_A_NW_SE }, - { 17154, SPR_STATION_BASE_A_SW_NE }, - { 17155, SPR_STATION_BASE_A_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + 17154, + 17155, + 17154, + 17155, }; if (trackElement.GetTrackType() == TrackElemType::EndStation) @@ -127,15 +127,19 @@ static void TwisterRCTrackStation( else { PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); } - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 9, trackElement); + if (TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 9, trackElement, StationBaseType::a, 0)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); @@ -702,9 +706,7 @@ static void TwisterRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -740,8 +742,8 @@ static void TwisterRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -773,9 +775,7 @@ static void TwisterRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -811,8 +811,8 @@ static void TwisterRCTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -854,9 +854,7 @@ static void TwisterRCTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1088,9 +1086,7 @@ static void TwisterRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1126,8 +1122,8 @@ static void TwisterRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1159,9 +1155,7 @@ static void TwisterRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1197,8 +1191,8 @@ static void TwisterRCTrackBankedLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1243,9 +1237,7 @@ static void TwisterRCTrackBankedLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1566,9 +1558,7 @@ static void TwisterRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1602,8 +1592,8 @@ static void TwisterRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1634,9 +1624,7 @@ static void TwisterRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1670,8 +1658,8 @@ static void TwisterRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1713,9 +1701,7 @@ static void TwisterRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1761,9 +1747,7 @@ static void TwisterRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1797,8 +1781,8 @@ static void TwisterRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1829,8 +1813,7 @@ static void TwisterRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1864,8 +1847,8 @@ static void TwisterRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1907,9 +1890,7 @@ static void TwisterRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1972,9 +1953,7 @@ static void TwisterRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2006,8 +1985,8 @@ static void TwisterRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2039,8 +2018,8 @@ static void TwisterRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2082,9 +2061,7 @@ static void TwisterRCTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2130,9 +2107,7 @@ static void TwisterRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2164,8 +2139,8 @@ static void TwisterRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2197,8 +2172,8 @@ static void TwisterRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2240,9 +2215,7 @@ static void TwisterRCTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2292,8 +2265,8 @@ static void TwisterRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2330,8 +2303,8 @@ static void TwisterRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2363,9 +2336,7 @@ static void TwisterRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2394,8 +2365,8 @@ static void TwisterRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2430,8 +2401,8 @@ static void TwisterRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2463,9 +2434,7 @@ static void TwisterRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -2502,8 +2471,8 @@ static void TwisterRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -2549,8 +2518,8 @@ static void TwisterRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -2828,9 +2797,7 @@ static void TwisterRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2865,9 +2832,7 @@ static void TwisterRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2909,9 +2874,7 @@ static void TwisterRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2968,9 +2931,7 @@ static void TwisterRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3005,9 +2966,7 @@ static void TwisterRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3052,9 +3011,7 @@ static void TwisterRCTrackLeftQuarterTurn3Bank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3104,9 +3061,7 @@ static void TwisterRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3150,9 +3105,7 @@ static void TwisterRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3194,9 +3147,7 @@ static void TwisterRCTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3247,9 +3198,7 @@ static void TwisterRCTrackRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3316,8 +3265,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3352,9 +3301,7 @@ static void TwisterRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3400,8 +3347,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3447,8 +3394,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3484,8 +3431,7 @@ static void TwisterRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3526,8 +3472,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3577,8 +3523,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3614,8 +3560,7 @@ static void TwisterRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3661,8 +3606,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3708,8 +3653,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3744,9 +3689,7 @@ static void TwisterRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3787,8 +3730,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3866,8 +3809,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3903,8 +3846,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3936,9 +3879,7 @@ static void TwisterRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -3974,8 +3915,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4021,8 +3962,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4068,8 +4009,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4105,8 +4046,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4138,8 +4079,7 @@ static void TwisterRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4175,8 +4115,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4217,8 +4157,8 @@ static void TwisterRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4268,8 +4208,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4305,8 +4245,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4338,8 +4278,7 @@ static void TwisterRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4375,8 +4314,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4429,8 +4368,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4476,8 +4415,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4513,8 +4452,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4546,9 +4485,7 @@ static void TwisterRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4584,8 +4521,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4633,8 +4570,8 @@ static void TwisterRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5183,8 +5120,8 @@ static void TwisterRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5217,8 +5154,8 @@ static void TwisterRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5227,9 +5164,7 @@ static void TwisterRCTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5270,8 +5205,8 @@ static void TwisterRCTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5346,8 +5281,8 @@ static void TwisterRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5380,8 +5315,8 @@ static void TwisterRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5391,8 +5326,7 @@ static void TwisterRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5433,8 +5367,8 @@ static void TwisterRCTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5525,8 +5459,8 @@ static void TwisterRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5559,8 +5493,8 @@ static void TwisterRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5569,9 +5503,7 @@ static void TwisterRCTrackLeftEighthBankToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5612,8 +5544,8 @@ static void TwisterRCTrackLeftEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5688,8 +5620,8 @@ static void TwisterRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5722,8 +5654,8 @@ static void TwisterRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5733,8 +5665,7 @@ static void TwisterRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5775,8 +5706,8 @@ static void TwisterRCTrackRightEighthBankToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5845,9 +5776,7 @@ static void TwisterRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5878,8 +5807,7 @@ static void TwisterRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5911,8 +5839,7 @@ static void TwisterRCTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5971,9 +5898,7 @@ static void TwisterRCTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6013,9 +5938,7 @@ static void TwisterRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6046,8 +5969,7 @@ static void TwisterRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6079,8 +6001,7 @@ static void TwisterRCTrackDiag60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6139,9 +6060,7 @@ static void TwisterRCTrackDiag60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -6181,9 +6100,7 @@ static void TwisterRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6214,8 +6131,7 @@ static void TwisterRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6247,8 +6163,7 @@ static void TwisterRCTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6307,9 +6222,7 @@ static void TwisterRCTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -6349,9 +6262,7 @@ static void TwisterRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6382,8 +6293,7 @@ static void TwisterRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6415,8 +6325,7 @@ static void TwisterRCTrackDiag25DegUpTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6475,9 +6384,7 @@ static void TwisterRCTrackDiag25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6517,9 +6424,7 @@ static void TwisterRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6550,8 +6455,7 @@ static void TwisterRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6583,8 +6487,7 @@ static void TwisterRCTrackDiag60DegUpTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6643,9 +6546,7 @@ static void TwisterRCTrackDiag60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -6685,9 +6586,7 @@ static void TwisterRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6718,8 +6617,7 @@ static void TwisterRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6751,8 +6649,7 @@ static void TwisterRCTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6811,9 +6708,7 @@ static void TwisterRCTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6853,9 +6748,7 @@ static void TwisterRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6886,8 +6779,7 @@ static void TwisterRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6919,8 +6811,7 @@ static void TwisterRCTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -6979,9 +6870,7 @@ static void TwisterRCTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -7021,9 +6910,7 @@ static void TwisterRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7054,8 +6941,7 @@ static void TwisterRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7087,8 +6973,7 @@ static void TwisterRCTrackDiag60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7147,9 +7032,7 @@ static void TwisterRCTrackDiag60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -7189,9 +7072,7 @@ static void TwisterRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7221,8 +7102,7 @@ static void TwisterRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -7253,8 +7133,7 @@ static void TwisterRCTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -7312,9 +7191,7 @@ static void TwisterRCTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -7355,9 +7232,7 @@ static void TwisterRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7388,8 +7263,7 @@ static void TwisterRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7421,8 +7295,7 @@ static void TwisterRCTrackDiag25DegDownTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7481,9 +7354,7 @@ static void TwisterRCTrackDiag25DegDownTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7523,9 +7394,7 @@ static void TwisterRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7556,8 +7425,7 @@ static void TwisterRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7589,8 +7457,7 @@ static void TwisterRCTrackDiag60DegDownTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7649,9 +7516,7 @@ static void TwisterRCTrackDiag60DegDownTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -7691,9 +7556,7 @@ static void TwisterRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7724,8 +7587,7 @@ static void TwisterRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7757,8 +7619,7 @@ static void TwisterRCTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7817,9 +7678,7 @@ static void TwisterRCTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -7859,9 +7718,7 @@ static void TwisterRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7892,8 +7749,7 @@ static void TwisterRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7925,8 +7781,7 @@ static void TwisterRCTrackDiagFlatTo60DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -7985,9 +7840,7 @@ static void TwisterRCTrackDiagFlatTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8027,9 +7880,7 @@ static void TwisterRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8060,8 +7911,7 @@ static void TwisterRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8093,8 +7943,7 @@ static void TwisterRCTrackDiag60DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8153,9 +8002,7 @@ static void TwisterRCTrackDiag60DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8195,9 +8042,7 @@ static void TwisterRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8228,8 +8073,7 @@ static void TwisterRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8261,8 +8105,7 @@ static void TwisterRCTrackDiagFlatTo60DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8321,9 +8164,7 @@ static void TwisterRCTrackDiagFlatTo60DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -8363,9 +8204,7 @@ static void TwisterRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8396,8 +8235,7 @@ static void TwisterRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8429,8 +8267,7 @@ static void TwisterRCTrackDiag60DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8489,9 +8326,7 @@ static void TwisterRCTrackDiag60DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -8517,9 +8352,7 @@ static void TwisterRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8539,8 +8372,7 @@ static void TwisterRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8558,8 +8390,7 @@ static void TwisterRCTrackDiagFlatToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8590,9 +8421,7 @@ static void TwisterRCTrackDiagFlatToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8618,9 +8447,7 @@ static void TwisterRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8637,8 +8464,7 @@ static void TwisterRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8659,8 +8485,7 @@ static void TwisterRCTrackDiagFlatToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8691,9 +8516,7 @@ static void TwisterRCTrackDiagFlatToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8719,9 +8542,7 @@ static void TwisterRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8741,8 +8562,7 @@ static void TwisterRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8760,8 +8580,7 @@ static void TwisterRCTrackDiagLeftBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8792,9 +8611,7 @@ static void TwisterRCTrackDiagLeftBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8820,9 +8637,7 @@ static void TwisterRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8839,8 +8654,7 @@ static void TwisterRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8861,8 +8675,7 @@ static void TwisterRCTrackDiagRightBankToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8893,9 +8706,7 @@ static void TwisterRCTrackDiagRightBankToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -8921,9 +8732,7 @@ static void TwisterRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8943,8 +8752,7 @@ static void TwisterRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8962,8 +8770,7 @@ static void TwisterRCTrackDiagLeftBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -8994,9 +8801,7 @@ static void TwisterRCTrackDiagLeftBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9022,9 +8827,7 @@ static void TwisterRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9041,8 +8844,7 @@ static void TwisterRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9063,8 +8865,7 @@ static void TwisterRCTrackDiagRightBankTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9095,9 +8896,7 @@ static void TwisterRCTrackDiagRightBankTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9123,9 +8922,7 @@ static void TwisterRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9145,8 +8942,7 @@ static void TwisterRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9164,8 +8960,7 @@ static void TwisterRCTrackDiag25DegUpToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9196,9 +8991,7 @@ static void TwisterRCTrackDiag25DegUpToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9224,9 +9017,7 @@ static void TwisterRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9243,8 +9034,7 @@ static void TwisterRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9265,8 +9055,7 @@ static void TwisterRCTrackDiag25DegUpToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9297,9 +9086,7 @@ static void TwisterRCTrackDiag25DegUpToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -9325,9 +9112,7 @@ static void TwisterRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9346,8 +9131,7 @@ static void TwisterRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -9364,8 +9148,7 @@ static void TwisterRCTrackDiagLeftBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9395,9 +9178,7 @@ static void TwisterRCTrackDiagLeftBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -9424,9 +9205,7 @@ static void TwisterRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9442,8 +9221,7 @@ static void TwisterRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -9463,8 +9241,7 @@ static void TwisterRCTrackDiagRightBankTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -9494,9 +9271,7 @@ static void TwisterRCTrackDiagRightBankTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -9523,9 +9298,7 @@ static void TwisterRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9545,8 +9318,7 @@ static void TwisterRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9564,8 +9336,7 @@ static void TwisterRCTrackDiag25DegDownToLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9596,9 +9367,7 @@ static void TwisterRCTrackDiag25DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9624,9 +9393,7 @@ static void TwisterRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9643,8 +9410,7 @@ static void TwisterRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9665,8 +9431,7 @@ static void TwisterRCTrackDiag25DegDownToRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9697,9 +9462,7 @@ static void TwisterRCTrackDiag25DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -9725,9 +9488,7 @@ static void TwisterRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9744,8 +9505,7 @@ static void TwisterRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9763,8 +9523,7 @@ static void TwisterRCTrackDiagLeftBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9795,9 +9554,7 @@ static void TwisterRCTrackDiagLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9823,9 +9580,7 @@ static void TwisterRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9842,8 +9597,7 @@ static void TwisterRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9861,8 +9615,7 @@ static void TwisterRCTrackDiagRightBank( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9893,9 +9646,7 @@ static void TwisterRCTrackDiagRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -9940,9 +9691,7 @@ static void TwisterRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -9986,9 +9735,7 @@ static void TwisterRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10033,9 +9780,7 @@ static void TwisterRCTrackRightBankToRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10086,9 +9831,7 @@ static void TwisterRCTrackRightBankToRightQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10137,9 +9880,7 @@ static void TwisterRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10186,9 +9927,7 @@ static void TwisterRCTrackLeftQuarterTurn325DegDownToLeftBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10230,9 +9969,7 @@ static void TwisterRCTrackRightQuarterTurn325DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10279,9 +10016,7 @@ static void TwisterRCTrackRightQuarterTurn325DegDownToRightBank( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10353,9 +10088,7 @@ static void TwisterRCTrackLeftBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10401,9 +10134,7 @@ static void TwisterRCTrackLeftBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10446,9 +10177,7 @@ static void TwisterRCTrackRightBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10501,9 +10230,7 @@ static void TwisterRCTrackRightBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10567,9 +10294,7 @@ static void TwisterRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10604,8 +10329,8 @@ static void TwisterRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10636,9 +10361,7 @@ static void TwisterRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10674,8 +10397,8 @@ static void TwisterRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10717,9 +10440,7 @@ static void TwisterRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10765,9 +10486,7 @@ static void TwisterRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10802,8 +10521,8 @@ static void TwisterRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10834,8 +10553,7 @@ static void TwisterRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10871,8 +10589,8 @@ static void TwisterRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10914,9 +10632,7 @@ static void TwisterRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12004,8 +11720,8 @@ static void TwisterRCTrackHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -12143,8 +11859,8 @@ static void TwisterRCTrackLeftCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -12203,8 +11919,8 @@ static void TwisterRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12265,8 +11981,8 @@ static void TwisterRCTrackRightCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -12683,8 +12399,8 @@ static void TwisterRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -12729,8 +12445,8 @@ static void TwisterRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12784,8 +12500,8 @@ static void TwisterRCTrackLeftBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12851,8 +12567,8 @@ static void TwisterRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -12897,8 +12613,8 @@ static void TwisterRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -12952,8 +12668,8 @@ static void TwisterRCTrackRightBarrelRollUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -13113,8 +12829,8 @@ void TwisterRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -13155,8 +12871,8 @@ void TwisterRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -13189,8 +12905,7 @@ void TwisterRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -13223,8 +12938,8 @@ void TwisterRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -13261,8 +12976,8 @@ void TwisterRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -13366,8 +13081,8 @@ void TwisterRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -13408,8 +13123,8 @@ void TwisterRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -13441,9 +13156,7 @@ void TwisterRCTrackRightLargeHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -13476,8 +13189,8 @@ void TwisterRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -13514,8 +13227,8 @@ void TwisterRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -13570,7 +13283,7 @@ static void TwisterRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); break; @@ -13601,7 +13314,7 @@ static void TwisterRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); break; @@ -13636,7 +13349,7 @@ static void TwisterRCTrack90DegToInvertedFlatQuarterLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); break; @@ -13719,8 +13432,8 @@ static void TwisterRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13749,8 +13462,8 @@ static void TwisterRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13779,8 +13492,8 @@ static void TwisterRCTrackLeftTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -13840,8 +13553,8 @@ static void TwisterRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13870,8 +13583,8 @@ static void TwisterRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -13900,8 +13613,8 @@ static void TwisterRCTrackRightTwistDownToUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -13951,8 +13664,8 @@ static void TwisterRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -13988,8 +13701,8 @@ static void TwisterRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -14033,8 +13746,8 @@ static void TwisterRCTrackLeftTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -14072,8 +13785,8 @@ static void TwisterRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -14109,8 +13822,8 @@ static void TwisterRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -14154,8 +13867,8 @@ static void TwisterRCTrackRightTwistUpToDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -14242,8 +13955,8 @@ static void TwisterRCTrackLeftFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -14273,8 +13986,8 @@ static void TwisterRCTrackLeftFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -14305,8 +14018,8 @@ static void TwisterRCTrackLeftFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -14367,8 +14080,8 @@ static void TwisterRCTrackRightFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -14397,8 +14110,8 @@ static void TwisterRCTrackRightFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -14428,8 +14141,8 @@ static void TwisterRCTrackRightFlyerTwistUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -14545,8 +14258,8 @@ static void TwisterRCTrackFlyerHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -14649,8 +14362,8 @@ static void TwisterRCTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14683,8 +14396,8 @@ static void TwisterRCTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14693,9 +14406,7 @@ static void TwisterRCTrackLeftEighthToDiagUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14736,8 +14447,8 @@ static void TwisterRCTrackLeftEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14812,8 +14523,8 @@ static void TwisterRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14846,8 +14557,8 @@ static void TwisterRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14857,8 +14568,7 @@ static void TwisterRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14899,8 +14609,8 @@ static void TwisterRCTrackRightEighthToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14950,8 +14660,8 @@ static void TwisterRCTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14984,8 +14694,8 @@ static void TwisterRCTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -14994,8 +14704,7 @@ static void TwisterRCTrackLeftEighthToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15028,8 +14737,8 @@ static void TwisterRCTrackLeftEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15114,8 +14823,8 @@ static void TwisterRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15148,8 +14857,8 @@ static void TwisterRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15159,8 +14868,7 @@ static void TwisterRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15193,8 +14901,8 @@ static void TwisterRCTrackRightEighthToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15231,7 +14939,7 @@ static void TwisterRCTrackRightEighthToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -15292,9 +15000,7 @@ static void TwisterRCTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15314,8 +15020,7 @@ static void TwisterRCTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15333,8 +15038,7 @@ static void TwisterRCTrackDiagUp25ToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15365,9 +15069,7 @@ static void TwisterRCTrackDiagUp25ToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15393,9 +15095,7 @@ static void TwisterRCTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15412,8 +15112,7 @@ static void TwisterRCTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15434,8 +15133,7 @@ static void TwisterRCTrackDiagUp25ToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15466,9 +15164,7 @@ static void TwisterRCTrackDiagUp25ToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -15494,9 +15190,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15516,8 +15210,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15535,8 +15228,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15567,9 +15259,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15595,9 +15285,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15614,8 +15302,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15636,8 +15323,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15668,9 +15354,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15728,9 +15412,7 @@ static void TwisterRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15747,8 +15429,7 @@ static void TwisterRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15766,8 +15447,7 @@ static void TwisterRCTrackDiagLeftBankedFlatToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15798,9 +15478,7 @@ static void TwisterRCTrackDiagLeftBankedFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15826,9 +15504,7 @@ static void TwisterRCTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15845,8 +15521,7 @@ static void TwisterRCTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15864,8 +15539,7 @@ static void TwisterRCTrackDiagRightBankedFlatToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15896,9 +15570,7 @@ static void TwisterRCTrackDiagRightBankedFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -15924,9 +15596,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15943,8 +15613,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15962,8 +15631,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToLeftBankedFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -15994,9 +15662,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToLeftBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16022,9 +15688,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16041,8 +15705,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16060,8 +15723,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToRightBankedFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16092,9 +15754,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToRightBankedFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16152,9 +15812,7 @@ static void TwisterRCTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16171,8 +15829,7 @@ static void TwisterRCTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16190,8 +15847,7 @@ static void TwisterRCTrackDiagUp25LeftBanked( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16222,9 +15878,7 @@ static void TwisterRCTrackDiagUp25LeftBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16250,9 +15904,7 @@ static void TwisterRCTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16269,8 +15921,7 @@ static void TwisterRCTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16288,8 +15939,7 @@ static void TwisterRCTrackDiagUp25RightBanked( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16320,9 +15970,7 @@ static void TwisterRCTrackDiagUp25RightBanked( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16362,9 +16010,7 @@ static void TwisterRCTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16384,8 +16030,7 @@ static void TwisterRCTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16403,8 +16048,7 @@ static void TwisterRCTrackDiagFlatToLeftBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16435,9 +16079,7 @@ static void TwisterRCTrackDiagFlatToLeftBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16463,9 +16105,7 @@ static void TwisterRCTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16482,8 +16122,7 @@ static void TwisterRCTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16504,8 +16143,7 @@ static void TwisterRCTrackDiagFlatToRightBankedUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16536,9 +16174,7 @@ static void TwisterRCTrackDiagFlatToRightBankedUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -16564,9 +16200,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16586,8 +16220,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16605,8 +16238,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16637,9 +16269,7 @@ static void TwisterRCTrackDiagLeftBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16665,9 +16295,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16684,8 +16312,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16706,8 +16333,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16738,9 +16364,7 @@ static void TwisterRCTrackDiagRightBankedUp25ToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -16854,8 +16478,8 @@ static void TwisterRCTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16888,8 +16512,8 @@ static void TwisterRCTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16898,9 +16522,7 @@ static void TwisterRCTrackLeftEighthBankToDiagUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -16941,8 +16563,8 @@ static void TwisterRCTrackLeftEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17024,8 +16646,8 @@ static void TwisterRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17058,8 +16680,8 @@ static void TwisterRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17069,8 +16691,7 @@ static void TwisterRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17111,8 +16732,8 @@ static void TwisterRCTrackRightEighthBankToDiagUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17162,8 +16783,8 @@ static void TwisterRCTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17196,8 +16817,8 @@ static void TwisterRCTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17206,8 +16827,7 @@ static void TwisterRCTrackLeftEighthBankToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17240,8 +16860,8 @@ static void TwisterRCTrackLeftEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17331,8 +16951,8 @@ static void TwisterRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17365,8 +16985,8 @@ static void TwisterRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17376,8 +16996,7 @@ static void TwisterRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17410,8 +17029,8 @@ static void TwisterRCTrackRightEighthBankToOrthogonalUp25( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -17455,7 +17074,7 @@ static void TwisterRCTrackRightEighthBankToOrthogonalUp25( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide), direction), + EnumsToFlags(PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -17541,8 +17160,8 @@ static void TwisterRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -17583,8 +17202,8 @@ static void TwisterRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17616,9 +17235,7 @@ static void TwisterRCTrackLeftLargeCorkscrewUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17631,8 +17248,8 @@ static void TwisterRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -17698,8 +17315,8 @@ static void TwisterRCTrackLeftLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -17757,8 +17374,8 @@ static void TwisterRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::rightCorner, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::right, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -17799,8 +17416,8 @@ static void TwisterRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::bottomRightSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -17833,8 +17450,7 @@ static void TwisterRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -17847,8 +17463,8 @@ static void TwisterRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -17913,8 +17529,8 @@ static void TwisterRCTrackRightLargeCorkscrewUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::centre, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -18023,8 +17639,8 @@ static void TwisterRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18064,9 +17680,7 @@ static void TwisterRCTrackLeftMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -18099,8 +17713,7 @@ static void TwisterRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -18134,8 +17747,8 @@ static void TwisterRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); @@ -18224,8 +17837,8 @@ static void TwisterRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -18266,8 +17879,7 @@ static void TwisterRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -18300,9 +17912,7 @@ static void TwisterRCTrackRightMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -18336,8 +17946,8 @@ static void TwisterRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); if (direction == 0 || direction == 3) @@ -18444,8 +18054,8 @@ static void TwisterRCTrackLeftZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18493,8 +18103,8 @@ static void TwisterRCTrackLeftZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -18584,8 +18194,8 @@ static void TwisterRCTrackRightZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -18633,8 +18243,8 @@ static void TwisterRCTrackRightZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -18762,8 +18372,8 @@ static void TwisterRCTrackLeftLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -18773,8 +18383,8 @@ static void TwisterRCTrackLeftLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -18930,8 +18540,8 @@ static void TwisterRCTrackRightLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -18941,8 +18551,8 @@ static void TwisterRCTrackRightLargeZeroGRollUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -19027,9 +18637,7 @@ static void TwisterRCTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32); @@ -19046,8 +18654,7 @@ static void TwisterRCTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -19065,8 +18672,7 @@ static void TwisterRCTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -19101,8 +18707,8 @@ static void TwisterRCTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19119,8 +18725,7 @@ static void TwisterRCTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -19138,8 +18743,7 @@ static void TwisterRCTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -19174,8 +18778,8 @@ static void TwisterRCTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19192,8 +18796,7 @@ static void TwisterRCTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19211,8 +18814,7 @@ static void TwisterRCTrackDiagFlatTo60DegUpLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19243,9 +18845,7 @@ static void TwisterRCTrackDiagFlatTo60DegUpLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 136); @@ -19271,9 +18871,7 @@ static void TwisterRCTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19290,8 +18888,7 @@ static void TwisterRCTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -19309,8 +18906,7 @@ static void TwisterRCTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -19345,8 +18941,8 @@ static void TwisterRCTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -19363,8 +18959,7 @@ static void TwisterRCTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19382,8 +18977,7 @@ static void TwisterRCTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19418,8 +19012,8 @@ static void TwisterRCTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19436,8 +19030,7 @@ static void TwisterRCTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19455,8 +19048,7 @@ static void TwisterRCTrackDiag60DegUpToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19487,9 +19079,7 @@ static void TwisterRCTrackDiag60DegUpToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19515,9 +19105,7 @@ static void TwisterRCTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19534,8 +19122,7 @@ static void TwisterRCTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19553,8 +19140,7 @@ static void TwisterRCTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19589,8 +19175,8 @@ static void TwisterRCTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -19607,8 +19193,7 @@ static void TwisterRCTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19626,8 +19211,7 @@ static void TwisterRCTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19662,8 +19246,8 @@ static void TwisterRCTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -19680,8 +19264,7 @@ static void TwisterRCTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -19699,8 +19282,7 @@ static void TwisterRCTrackDiagFlatTo60DegDownLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); @@ -19731,9 +19313,7 @@ static void TwisterRCTrackDiagFlatTo60DegDownLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19759,9 +19339,7 @@ static void TwisterRCTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 136); @@ -19778,8 +19356,7 @@ static void TwisterRCTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19797,8 +19374,7 @@ static void TwisterRCTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -19833,8 +19409,8 @@ static void TwisterRCTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -19851,8 +19427,7 @@ static void TwisterRCTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -19870,8 +19445,7 @@ static void TwisterRCTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -19906,8 +19480,8 @@ static void TwisterRCTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -19924,8 +19498,7 @@ static void TwisterRCTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -19943,8 +19516,7 @@ static void TwisterRCTrackDiag60DegDownToFlatLongBase( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -19975,9 +19547,7 @@ static void TwisterRCTrackDiag60DegDownToFlatLongBase( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::centre), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 32); @@ -20008,9 +19578,7 @@ static void TwisterRCTrackLeftEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -20027,8 +19595,7 @@ static void TwisterRCTrackLeftEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -20046,8 +19613,7 @@ static void TwisterRCTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -20088,8 +19654,8 @@ static void TwisterRCTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -20122,8 +19688,8 @@ static void TwisterRCTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -20133,8 +19699,8 @@ static void TwisterRCTrackLeftEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::bottomLeft, + PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); switch (direction) @@ -20196,9 +19762,7 @@ static void TwisterRCTrackRightEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 96); @@ -20216,8 +19780,7 @@ static void TwisterRCTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -20234,8 +19797,7 @@ static void TwisterRCTrackRightEighthDiveLoopUpToOrthogonal( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::top, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 120); @@ -20276,8 +19838,8 @@ static void TwisterRCTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 112); @@ -20310,8 +19872,8 @@ static void TwisterRCTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 80); @@ -20321,8 +19883,8 @@ static void TwisterRCTrackRightEighthDiveLoopUpToOrthogonal( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, PaintSegment::centre, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::bottomLeft, PaintSegment::centre, + PaintSegment::bottom, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) diff --git a/src/openrct2/paint/track/coaster/VirginiaReel.cpp b/src/openrct2/paint/track/coaster/VirginiaReel.cpp index d7dc1fe458..1fa84ba4a5 100644 --- a/src/openrct2/paint/track/coaster/VirginiaReel.cpp +++ b/src/openrct2/paint/track/coaster/VirginiaReel.cpp @@ -364,28 +364,22 @@ static void PaintVirginiaReelStation( if (direction == 0 || direction == 2) { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); - imageId = session.TrackColours.WithIndex(SPR_VIRGINIA_REEL_FLAT_SW_NE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 2 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height + 1 }, { 32, 20, 2 } }); PaintUtilPushTunnelLeft(session, height, kTunnelGroup, TunnelSubType::Flat); } else if (direction == 1 || direction == 3) { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 2 } }); - imageId = session.TrackColours.WithIndex(SPR_VIRGINIA_REEL_FLAT_NW_SE); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 2 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height + 1 }, { 20, 32, 2 } }); PaintUtilPushTunnelRight(session, height, kTunnelGroup, TunnelSubType::Flat); } DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -406,9 +400,7 @@ static void PaintVirginiaReelTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left), direction), 0xFFFF, 0); break; diff --git a/src/openrct2/paint/track/coaster/WildMouse.cpp b/src/openrct2/paint/track/coaster/WildMouse.cpp index 09f34ab46b..5257c8bced 100644 --- a/src/openrct2/paint/track/coaster/WildMouse.cpp +++ b/src/openrct2/paint/track/coaster/WildMouse.cpp @@ -199,32 +199,29 @@ static void WildMouseTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t baseImageIds[4] = { - SPR_STATION_BASE_B_SW_NE, - SPR_STATION_BASE_B_NW_SE, - SPR_STATION_BASE_B_SW_NE, - SPR_STATION_BASE_B_NW_SE, - }; - auto trackType = trackElement.GetTrackType(); - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(baseImageIds[direction]), - { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); if (trackType == TrackElemType::EndStation) { bool isClosed = trackElement.IsBrakeClosed(); - PaintAddImageAsChildRotated( + PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(_wild_mouse_block_brakes_image_ids[direction][isClosed]), - { 0, 0, height }, { { 0, 0, height }, { 32, 20, 2 } }); + { 0, 0, height }, { { 0, 6, height + 1 }, { 32, 20, 2 } }); } else { - PaintAddImageAsChildRotated( + PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(_wild_mouse_brakes_image_ids[direction]), { 0, 0, height }, - { { 0, 0, height }, { 32, 20, 2 } }); + { { 0, 6, height + 1 }, { 32, 20, 2 } }); + } + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, -1, height, session.SupportColours); } - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -552,15 +549,15 @@ static void WildMouseTrackRightQuarterTurn3( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide); + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide); + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide); + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -616,11 +613,11 @@ static void WildMouseTrackRightQuarterTurn325DegDown( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide); + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide); + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -697,11 +694,11 @@ static void WildMouseTrackRightQuarterTurn325DegUp( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide); + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomRightSide); + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -760,9 +757,7 @@ static void WildMouseTrackLeftQuarterTurn1( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), - direction), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } diff --git a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp index d67ae3dffe..fa57a46bec 100644 --- a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp +++ b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.cpp @@ -851,11 +851,23 @@ static constexpr uint32_t kBlockBrakesImageIds[4][3] = { { SPR_WOODEN_RC_BLOCK_BRAKES_NW_SE_OPEN, SPR_WOODEN_RC_BLOCK_BRAKES_NW_SE_CLOSED, SPR_WOODEN_RC_BLOCK_BRAKES_RAILS_NW_SE }, }; -static constexpr uint32_t kStationBlockBrakesImageIds[4][2] = { - { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_SW_NE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_SW_NE }, - { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_NW_SE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_NW_SE }, - { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_SW_NE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_SW_NE }, - { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_NW_SE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_NW_SE }, +static constexpr ImageIndex kStationBlockBrakesImageIds[2][kNumOrthogonalDirections][2] = { + { + { SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_OPEN_SW_NE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_CLOSED_SW_NE }, + { SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_OPEN_NW_SE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_CLOSED_NW_SE }, + { SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_OPEN_SW_NE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_CLOSED_SW_NE }, + { SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_OPEN_NW_SE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_BLOCK_BRAKE_CLOSED_NW_SE }, + }, + { + { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_SW_NE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_SW_NE }, + { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_NW_SE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_NW_SE }, + { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_SW_NE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_SW_NE }, + { SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_OPEN_NW_SE, SPR_G2_WOODEN_RC_STATION_BLOCK_BRAKE_CLOSED_NW_SE }, + }, }; static constexpr const uint32_t kWoodenRCDiagBrakeImages[kNumOrthogonalDirections] = { @@ -927,8 +939,10 @@ static constexpr std::array kFlatT } }; static constexpr std::array kLeftBankImages = { { - { SPR_WOODEN_RC_LEFT_BANK_SW_NE, SPR_WOODEN_RC_LEFT_BANK_RAILS_SW_NE }, - { SPR_WOODEN_RC_LEFT_BANK_NW_SE, SPR_WOODEN_RC_LEFT_BANK_RAILS_NW_SE }, + { SPR_WOODEN_RC_LEFT_BANK_SW_NE, SPR_WOODEN_RC_LEFT_BANK_RAILS_SW_NE, SPR_G2_WOODEN_RC_LEFT_BANK_FRONT_SW_NE, + SPR_G2_WOODEN_RC_LEFT_BANK_RAILS_FRONT_SW_NE }, + { SPR_WOODEN_RC_LEFT_BANK_NW_SE, SPR_WOODEN_RC_LEFT_BANK_RAILS_NW_SE, SPR_G2_WOODEN_RC_LEFT_BANK_FRONT_NW_SE, + SPR_G2_WOODEN_RC_LEFT_BANK_RAILS_FRONT_NW_SE }, { SPR_WOODEN_RC_LEFT_BANK_NE_SW, SPR_WOODEN_RC_LEFT_BANK_RAILS_NE_SW }, { SPR_WOODEN_RC_LEFT_BANK_SE_NW, SPR_WOODEN_RC_LEFT_BANK_RAILS_SE_NW }, } }; @@ -2034,30 +2048,37 @@ static void WoodenRCTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t stationImageIds[4][2] = { - { SPR_WOODEN_RC_STATION_SW_NE, SPR_WOODEN_RC_STATION_RAILS_SW_NE }, - { SPR_WOODEN_RC_STATION_NW_SE, SPR_WOODEN_RC_STATION_RAILS_NW_SE }, - { SPR_WOODEN_RC_STATION_SW_NE, SPR_WOODEN_RC_STATION_RAILS_SW_NE }, - { SPR_WOODEN_RC_STATION_NW_SE, SPR_WOODEN_RC_STATION_RAILS_NW_SE }, + static constexpr ImageIndex stationImageIds[2][kNumOrthogonalDirections] = { + { + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_SW_NE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_NW_SE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_SW_NE, + SPR_G2_WOODEN_RC_STATION_NO_PLATFORM_NW_SE, + }, + { + SPR_WOODEN_RC_STATION_SW_NE, + SPR_WOODEN_RC_STATION_NW_SE, + SPR_WOODEN_RC_STATION_SW_NE, + SPR_WOODEN_RC_STATION_NW_SE, + }, }; - - auto trackType = trackElement.GetTrackType(); - if (trackType == TrackElemType::EndStation) + const bool drewStation = TrackPaintUtilDrawStation2( + session, ride, direction, height, trackElement, StationBaseType::none, 0, 9, 11); + const ImageId colours = isClassic ? session.TrackColours : session.SupportColours; + if (trackElement.GetTrackType() == TrackElemType::EndStation) { - const auto brakeImg = trackElement.IsBrakeClosed() ? kStationBlockBrakesImageIds[direction][1] - : kStationBlockBrakesImageIds[direction][0]; - WoodenRCTrackPaint( - session, direction, brakeImg, SPR_G2_EMPTY, { 0, 2, height }, { { 0, 2, height }, { 32, 27, 2 } }); + const ImageIndex imageIndex = kStationBlockBrakesImageIds[drewStation][direction][trackElement.IsBrakeClosed()]; + PaintAddImageAsParentRotated( + session, direction, colours.WithIndex(imageIndex), { 0, 2, height }, { { 0, 2, height }, { 32, 27, 2 } }); } else { - WoodenRCTrackPaint( - session, direction, stationImageIds[direction][0], stationImageIds[direction][1], { 0, 2, height }, + PaintAddImageAsParentRotated( + session, direction, colours.WithIndex(stationImageIds[drewStation][direction]), { 0, 2, height }, { { 0, 2, height }, { 32, 27, 2 } }); } WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, 9, 11); TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2999,26 +3020,25 @@ static void WoodenRCTrackRightQuarterTurn5( blockedSegments = kSegmentsAll; break; case 1: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide); + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide); + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight); break; case 4: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 5: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide); + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight); break; case 6: blockedSegments = kSegmentsAll; @@ -3193,8 +3213,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -3258,8 +3277,8 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3324,9 +3343,8 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -3335,8 +3353,7 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -3406,8 +3423,8 @@ static void WoodenRCTrackLeftQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3557,7 +3574,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -3621,8 +3638,8 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -3687,9 +3704,8 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -3698,7 +3714,7 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -3768,8 +3784,8 @@ static void WoodenRCTrackRightQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4000,8 +4016,8 @@ static void WoodenRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4066,8 +4082,8 @@ static void WoodenRCTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4274,8 +4290,8 @@ static void WoodenRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4340,8 +4356,8 @@ static void WoodenRCTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -4454,8 +4470,8 @@ static void WoodenRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -4492,8 +4508,8 @@ static void WoodenRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4525,9 +4541,7 @@ static void WoodenRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -4560,8 +4574,8 @@ static void WoodenRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4600,8 +4614,8 @@ static void WoodenRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -4633,9 +4647,7 @@ static void WoodenRCTrackLeftVerticalLoop( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 168); @@ -4672,8 +4684,8 @@ static void WoodenRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -4713,8 +4725,8 @@ static void WoodenRCTrackLeftVerticalLoop( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5090,9 +5102,7 @@ static void WoodenRCTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -5268,9 +5278,7 @@ static void WoodenRCTrackLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5431,8 +5439,7 @@ static void WoodenRCTrackRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -5800,6 +5807,12 @@ static void WoodenRCTrack25DegUpLeftBanked( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25115), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24249_FRONT), + { 0, 0, height }, { { 4, 26, height + 5 }, { 24, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25115_FRONT), { 0, 0, height }, + { { 4, 26, height + 5 }, { 24, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); @@ -5922,6 +5935,12 @@ static void WoodenRCTrack25DegUpRightBanked( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25122), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24256_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25122_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); @@ -10231,9 +10250,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -10394,8 +10411,7 @@ static void WoodenRCTrackRightBankedQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); @@ -10572,8 +10588,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -10637,8 +10652,8 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10703,9 +10718,8 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, + PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -10714,8 +10728,7 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -10785,8 +10798,8 @@ static void WoodenRCTrackLeftBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -10936,7 +10949,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -11000,8 +11013,8 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11066,9 +11079,8 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -11077,7 +11089,7 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); break; @@ -11147,8 +11159,8 @@ static void WoodenRCTrackRightBankedQuarterTurn525DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -11262,6 +11274,12 @@ static void WoodenRCTrack25DegUpToLeftBanked25DegUp( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25127), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24261_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25127_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); @@ -11273,6 +11291,12 @@ static void WoodenRCTrack25DegUpToLeftBanked25DegUp( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25128), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24262_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25128_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); @@ -11349,6 +11373,12 @@ static void WoodenRCTrack25DegUpToRightBanked25DegUp( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25133), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24267_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25133_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); @@ -11360,6 +11390,12 @@ static void WoodenRCTrack25DegUpToRightBanked25DegUp( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25134), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24268_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25134_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25Deg); @@ -11562,6 +11598,12 @@ static void WoodenRCTrackLeftBankedFlatToLeftBanked25DegUp( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25143), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24277_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25143_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); @@ -11684,6 +11726,12 @@ static void WoodenRCTrackRightBankedFlatToRightBanked25DegUp( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25150), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24284_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25150_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); @@ -11716,6 +11764,12 @@ static void WoodenRCTrackLeftBanked25DegUpToLeftBankedFlat( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25151), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24285_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25151_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); @@ -11838,6 +11892,12 @@ static void WoodenRCTrackRightBanked25DegUpToRightBankedFlat( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25158), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24292_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25158_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::Up25DegToFlat); @@ -11910,6 +11970,12 @@ static void WoodenRCTrackFlatToLeftBanked25DegUp( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25091), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24225_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25091_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); @@ -12032,6 +12098,12 @@ static void WoodenRCTrackFlatToRightBanked25DegUp( PaintAddImageAsChildRotated( session, direction, WoodenRCGetRailsColour(session).WithIndex(25098), { 0, 0, height }, { { 0, 3, height }, { 32, 25, 2 } }); + PaintAddImageAsParentRotated( + session, direction, WoodenRCGetTrackColour(session).WithIndex(SPR_G2_WOODEN_RC_24232_FRONT), + { 0, 0, height }, { { 0, 26, height + 5 }, { 32, 1, 9 } }); + PaintAddImageAsChildRotated( + session, direction, WoodenRCGetRailsColour(session).WithIndex(SPR_G2_WOODEN_RC_25098_FRONT), { 0, 0, height }, + { { 0, 26, height + 5 }, { 32, 1, 9 } }); WoodenASupportsPaintSetupRotated( session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours, WoodenSupportTransitionType::FlatToUp25Deg); @@ -12352,8 +12424,8 @@ static void WoodenRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12395,9 +12467,7 @@ static void WoodenRCTrackLeftMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12433,8 +12503,7 @@ static void WoodenRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12468,8 +12537,8 @@ static void WoodenRCTrackLeftMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); @@ -12563,8 +12632,8 @@ static void WoodenRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::topRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -12607,8 +12676,7 @@ static void WoodenRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::centre, - PaintSegment::bottomLeftSide), + PaintSegment::bottom, PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12644,9 +12712,7 @@ static void WoodenRCTrackRightMediumHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 144); @@ -12680,8 +12746,8 @@ static void WoodenRCTrackRightMediumHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::topCorner), + PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::top), direction), 0xFFFF, 0); if (direction == 0 || direction == 3) @@ -12822,8 +12888,8 @@ static void WoodenRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -12867,8 +12933,8 @@ static void WoodenRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -12901,8 +12967,7 @@ static void WoodenRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -12941,8 +13006,8 @@ static void WoodenRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -12979,8 +13044,8 @@ static void WoodenRCTrackLeftLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); @@ -13099,8 +13164,8 @@ static void WoodenRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 88); @@ -13144,8 +13209,8 @@ static void WoodenRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -13177,9 +13242,7 @@ static void WoodenRCTrackRightLargeHalfLoopUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 128); @@ -13218,8 +13281,8 @@ static void WoodenRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 224); @@ -13256,8 +13319,8 @@ static void WoodenRCTrackRightLargeHalfLoopUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); diff --git a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.hpp b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.hpp index e5e83f357a..72bb434214 100644 --- a/src/openrct2/paint/track/coaster/WoodenRollerCoaster.hpp +++ b/src/openrct2/paint/track/coaster/WoodenRollerCoaster.hpp @@ -299,7 +299,7 @@ static void WoodenRCTrackLeftQuarterTurn3Bank( static constexpr int blockedSegments[4] = { kSegmentsAll, kSegmentsAll, - EnumsToFlags(PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), kSegmentsAll, }; @@ -507,17 +507,17 @@ static void WoodenRCTrackBankedRightQuarterTurn5( static constexpr int blockedSegments[7] = { kSegmentsAll, - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), kSegmentsAll, }; @@ -586,17 +586,15 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -662,9 +660,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -725,17 +721,15 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -796,17 +790,15 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -873,8 +865,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -930,17 +921,15 @@ static void WoodenRCTrackLeftHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::bottom, PaintSegment::topLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1007,17 +996,15 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::bottom, PaintSegment::topLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1084,8 +1071,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1146,17 +1132,15 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1217,17 +1201,15 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1293,9 +1275,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1351,17 +1331,15 @@ static void WoodenRCTrackRightHalfBankedHelixUpSmall( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1428,17 +1406,15 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1447,8 +1423,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -1500,8 +1475,8 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1553,17 +1528,13 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::bottom, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1572,8 +1543,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -1625,8 +1595,8 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1687,17 +1657,15 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1758,17 +1726,15 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1777,7 +1743,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -1829,8 +1795,8 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1882,16 +1848,13 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -1900,7 +1863,7 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -1952,8 +1915,8 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2009,17 +1972,15 @@ static void WoodenRCTrackLeftHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::bottom, PaintSegment::topLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2086,17 +2047,15 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::bottom, PaintSegment::topLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2105,7 +2064,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -2157,8 +2116,8 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2210,16 +2169,13 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2228,7 +2184,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -2280,8 +2236,8 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2342,17 +2298,15 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::right, PaintSegment::bottom, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2413,17 +2367,15 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, - PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::topRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2432,8 +2384,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -2485,8 +2436,8 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2538,17 +2489,13 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::bottom, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2557,8 +2504,7 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); break; @@ -2610,8 +2556,8 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2667,17 +2613,15 @@ static void WoodenRCTrackRightHalfBankedHelixUpLarge( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::bottomRight), direction), 48, 0x20); PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -2751,9 +2695,7 @@ static void WoodenRCTrackLeftBankToLeftQuarterTurn325DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -2890,8 +2832,7 @@ static void WoodenRCTrackRightBankToRightQuarterTurn325DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); diff --git a/src/openrct2/paint/track/coaster/WoodenWildMouse.cpp b/src/openrct2/paint/track/coaster/WoodenWildMouse.cpp index e17ef7ad70..5d6d9c20de 100644 --- a/src/openrct2/paint/track/coaster/WoodenWildMouse.cpp +++ b/src/openrct2/paint/track/coaster/WoodenWildMouse.cpp @@ -149,8 +149,8 @@ static void WoodenWildMouseTrackFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomCorner, - PaintSegment::topLeftSide, PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::bottom, PaintSegment::topLeft, + PaintSegment::bottomRight), direction), height, 0x20); PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(BlockedSegments::kStraightFlat, direction), 0xFFFF, 0); @@ -161,22 +161,18 @@ static void WoodenWildMouseTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][2] = { - { SPR_WOODEN_WILD_MOUSE_FLAT_SW_NE, SPR_STATION_BASE_B_SW_NE }, - { SPR_WOODEN_WILD_MOUSE_FLAT_NW_SE, SPR_STATION_BASE_B_NW_SE }, - { SPR_WOODEN_WILD_MOUSE_FLAT_SW_NE, SPR_STATION_BASE_B_SW_NE }, - { SPR_WOODEN_WILD_MOUSE_FLAT_NW_SE, SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIds[4] = { + SPR_WOODEN_WILD_MOUSE_FLAT_SW_NE, + SPR_WOODEN_WILD_MOUSE_FLAT_NW_SE, + SPR_WOODEN_WILD_MOUSE_FLAT_SW_NE, + SPR_WOODEN_WILD_MOUSE_FLAT_NW_SE, }; - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), - { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsChildRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 6, height }, - { { 0, 0, height }, { 32, 20, 1 } }); + session, direction, session.TrackColours.WithIndex(imageIds[direction]), { 0, 6, height }, + { { 0, 6, height + 1 }, { 32, 20, 1 } }); DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2); TrackPaintUtilDrawStationTunnel(session, direction, height); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -542,7 +538,7 @@ static void WoodenWildMouseTrackRightQuarterTurn3( break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide); + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight); break; case 3: blockedSegments = kSegmentsAll; diff --git a/src/openrct2/paint/track/gentle/CarRide.cpp b/src/openrct2/paint/track/gentle/CarRide.cpp index 7d6a4b4b91..09c0e61685 100644 --- a/src/openrct2/paint/track/gentle/CarRide.cpp +++ b/src/openrct2/paint/track/gentle/CarRide.cpp @@ -190,7 +190,7 @@ static void PaintCarRideTrackFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -231,7 +231,7 @@ static void PaintCarRideTrack25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); } @@ -272,7 +272,7 @@ static void PaintCarRideTrackFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); } @@ -313,7 +313,7 @@ static void PaintCarRideTrack25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); } @@ -347,34 +347,20 @@ static void PaintCarRideStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - ImageId imageId; - - if (direction == 0 || direction == 2) - { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); - } - else if (direction == 1 || direction == 3) - { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); - } - - imageId = session.TrackColours.WithIndex(kPiecesFlat[direction]); - if (direction == 0 || direction == 2) - { - PaintAddImageAsChild(session, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 1 } }); - } - else - { - PaintAddImageAsChild(session, imageId, { 6, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); - } + const ImageId imageId = session.TrackColours.WithIndex(kPiecesFlat[direction]); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 1 }, { 32, 20, 1 } }); TrackPaintUtilDrawStationTunnel(session, direction, height); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -403,15 +389,15 @@ static void PaintCarRideTrackRightQuarterTurn3Tiles( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::leftCorner); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -554,7 +540,7 @@ static void PaintCarRideTrack60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); } @@ -613,7 +599,7 @@ static void PaintCarRideTrack25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); } @@ -672,7 +658,7 @@ static void PaintCarRideTrack60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); } @@ -730,7 +716,7 @@ static void PaintCarRideTrackLogBumps( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } diff --git a/src/openrct2/paint/track/gentle/Circus.cpp b/src/openrct2/paint/track/gentle/Circus.cpp index 3d4ac5f868..ab66f8d975 100644 --- a/src/openrct2/paint/track/gentle/Circus.cpp +++ b/src/openrct2/paint/track/gentle/Circus.cpp @@ -25,18 +25,18 @@ using namespace OpenRCT2; static void PaintCircusTent( PaintSession& session, const Ride& ride, uint8_t direction, int8_t al, int8_t cl, uint16_t height, ImageId stationColour) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; auto vehicle = GetEntity(ride.vehicles[0]); - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = vehicle; } - auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto imageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); if (stationColour != TrackStationColour) { imageTemplate = stationColour; @@ -63,7 +63,7 @@ static void PaintCircus( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); @@ -99,20 +99,19 @@ static void PaintCircus( { case 1: // Top - cornerSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + cornerSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 3: // Right - cornerSegments = EnumsToFlags(PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight); break; case 6: // Left - cornerSegments = EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide); + cornerSegments = EnumsToFlags(PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft); break; case 7: // Bottom - cornerSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight); break; } diff --git a/src/openrct2/paint/track/gentle/CrookedHouse.cpp b/src/openrct2/paint/track/gentle/CrookedHouse.cpp index 7573d2e0a8..2b4e9318d3 100644 --- a/src/openrct2/paint/track/gentle/CrookedHouse.cpp +++ b/src/openrct2/paint/track/gentle/CrookedHouse.cpp @@ -63,11 +63,11 @@ static void PaintCrookedHouseStructure( if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; - if (ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK) { auto vehicle = GetEntity(ride->vehicles[0]); if (vehicle != nullptr) @@ -97,7 +97,7 @@ static void PaintCrookedHouse( WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); @@ -124,20 +124,19 @@ static void PaintCrookedHouse( { case 1: // Top - cornerSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + cornerSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 3: // Right - cornerSegments = EnumsToFlags(PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight); break; case 6: // Left - cornerSegments = EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide); + cornerSegments = EnumsToFlags(PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft); break; case 7: // Bottom - cornerSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight); break; } diff --git a/src/openrct2/paint/track/gentle/Dodgems.cpp b/src/openrct2/paint/track/gentle/Dodgems.cpp index 370957b480..707b5765ca 100644 --- a/src/openrct2/paint/track/gentle/Dodgems.cpp +++ b/src/openrct2/paint/track/gentle/Dodgems.cpp @@ -58,9 +58,9 @@ static void PaintDodgems( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); - if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) + if (stationObject != nullptr && !(stationObject->Flags & StationObjectFlags::noPlatforms)) { auto imageId = session.SupportColours.WithIndex(SprDodgemsFloor); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 1, 1, height }, { 30, 30, 1 } }); diff --git a/src/openrct2/paint/track/gentle/FerrisWheel.cpp b/src/openrct2/paint/track/gentle/FerrisWheel.cpp index 5c9f7e0c7d..52df885dde 100644 --- a/src/openrct2/paint/track/gentle/FerrisWheel.cpp +++ b/src/openrct2/paint/track/gentle/FerrisWheel.cpp @@ -65,12 +65,12 @@ static void PaintFerrisWheelRiders( static void PaintFerrisWheelStructure( PaintSession& session, const Ride& ride, uint8_t direction, int8_t axisOffset, uint16_t height, ImageId stationColour) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; auto vehicle = GetEntity(ride.vehicles[0]); - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = vehicle; @@ -81,7 +81,7 @@ static void PaintFerrisWheelStructure( BoundBoxXYZ bb = { { boundBox.offset, height + 7 }, { boundBox.length, 127 } }; auto supportsImageTemplate = session.TrackColours; - auto wheelImageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto wheelImageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); if (stationColour != TrackStationColour) { wheelImageTemplate = stationColour; @@ -124,7 +124,7 @@ static void PaintFerrisWheel( WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, stationColour); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); diff --git a/src/openrct2/paint/track/gentle/FlyingSaucers.cpp b/src/openrct2/paint/track/gentle/FlyingSaucers.cpp index a7347d140a..614a16868b 100644 --- a/src/openrct2/paint/track/gentle/FlyingSaucers.cpp +++ b/src/openrct2/paint/track/gentle/FlyingSaucers.cpp @@ -50,9 +50,9 @@ static void PaintFlyingSaucers( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); - if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) + if (stationObject != nullptr && !(stationObject->Flags & StationObjectFlags::noPlatforms)) { auto imageId = session.TrackColours.WithIndex(SprFlyingSaucersFloor); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 1, 1, height }, { 30, 30, 1 } }); diff --git a/src/openrct2/paint/track/gentle/GhostTrain.cpp b/src/openrct2/paint/track/gentle/GhostTrain.cpp index 44db150251..82491bac4a 100644 --- a/src/openrct2/paint/track/gentle/GhostTrain.cpp +++ b/src/openrct2/paint/track/gentle/GhostTrain.cpp @@ -229,7 +229,7 @@ static void PaintGhostTrainTrackFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -269,7 +269,7 @@ static void PaintGhostTrainTrack25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); } @@ -320,7 +320,7 @@ static void PaintGhostTrainTrackFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); } @@ -343,7 +343,7 @@ static void PaintGhostTrainTrack25DegUpToFlatShared( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); } @@ -418,26 +418,20 @@ static void PaintGhostTrainStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - ImageId imageId; - - static constexpr std::array imageIds = { - SPR_STATION_BASE_B_SW_NE, - SPR_STATION_BASE_B_NW_SE, - SPR_STATION_BASE_B_SW_NE, - SPR_STATION_BASE_B_NW_SE, - }; - - imageId = GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 3 } }); - - imageId = session.TrackColours.WithIndex(kGhostTrainTrackPiecesFlat[direction]); - PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 3 } }); + const ImageId imageId = session.TrackColours.WithIndex(kGhostTrainTrackPiecesFlat[direction]); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height + 1 }, { 32, 20, 3 } }); TrackPaintUtilDrawStationTunnel(session, direction, height); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -470,15 +464,15 @@ static void PaintGhostTrainTrackRightQuarterTurn3Tiles( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::leftCorner); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -574,7 +568,7 @@ static void PaintGhostTrainTrackBrakes( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } diff --git a/src/openrct2/paint/track/gentle/HauntedHouse.cpp b/src/openrct2/paint/track/gentle/HauntedHouse.cpp index f15bfb1c8b..db2f1a7fae 100644 --- a/src/openrct2/paint/track/gentle/HauntedHouse.cpp +++ b/src/openrct2/paint/track/gentle/HauntedHouse.cpp @@ -34,12 +34,12 @@ static void PaintHauntedHouseStructure( { uint8_t frameNum = 0; - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; auto vehicle = GetEntity(ride.vehicles[0]); - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = vehicle; @@ -76,7 +76,7 @@ static void PaintHauntedHouse( DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); @@ -103,20 +103,19 @@ static void PaintHauntedHouse( { case 1: // top - cornerSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + cornerSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 3: // right - cornerSegments = EnumsToFlags(PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight); break; case 6: // left - cornerSegments = EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide); + cornerSegments = EnumsToFlags(PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft); break; case 7: // bottom - cornerSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight); break; } diff --git a/src/openrct2/paint/track/gentle/Maze.cpp b/src/openrct2/paint/track/gentle/Maze.cpp index 357bf4d3eb..33b5848c3a 100644 --- a/src/openrct2/paint/track/gentle/Maze.cpp +++ b/src/openrct2/paint/track/gentle/Maze.cpp @@ -72,7 +72,7 @@ static void MazePaintSetup( PaintUtilSetSegmentSupportHeight(session, kSegmentsAll & ~EnumToFlag(PaintSegment::centre), 0xFFFF, 0); int32_t baseImageId = 0; - switch (ride.track_colour[0].supports) + switch (ride.trackColours[0].supports) { case 0: baseImageId = SprMazeBaseBrick; diff --git a/src/openrct2/paint/track/gentle/MerryGoRound.cpp b/src/openrct2/paint/track/gentle/MerryGoRound.cpp index ea7849d85a..3f4a7b95ae 100644 --- a/src/openrct2/paint/track/gentle/MerryGoRound.cpp +++ b/src/openrct2/paint/track/gentle/MerryGoRound.cpp @@ -35,7 +35,7 @@ static void PaintRiders( { if (session.DPI.zoom_level > ZoomLevel{ 0 }) return; - if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + if (!(ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) return; for (int32_t peep = 0; peep <= 14; peep += 2) @@ -60,18 +60,18 @@ static void PaintCarousel( { height += 7; - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; auto vehicle = GetEntity(ride.vehicles[0]); - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = vehicle; - if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN) - && ride.breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE && ride.breakdown_sound_modifier >= 128) + if (ride.lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN) + && ride.breakdownReasonPending == BREAKDOWN_CONTROL_FAILURE && ride.breakdownSoundModifier >= 128) { height += kMerryGoRoundBreakdownVibration[(vehicle->current_time >> 1) & 7]; } @@ -87,7 +87,7 @@ static void PaintCarousel( CoordsXYZ offset(xOffset, yOffset, height); BoundBoxXYZ bb = { { xOffset + 16, yOffset + 16, height }, { 24, 24, 48 } }; - auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto imageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); if (stationColour != TrackStationColour) { imageTemplate = stationColour; @@ -117,7 +117,7 @@ static void PaintMerryGoRound( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); @@ -153,20 +153,19 @@ static void PaintMerryGoRound( { case 1: // top - cornerSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + cornerSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 3: // right - cornerSegments = EnumsToFlags(PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight); break; case 6: // left - cornerSegments = EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide); + cornerSegments = EnumsToFlags(PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft); break; case 7: // bottom - cornerSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight); break; } diff --git a/src/openrct2/paint/track/gentle/MiniGolf.cpp b/src/openrct2/paint/track/gentle/MiniGolf.cpp index 3d3a6292ca..894df9e14c 100644 --- a/src/openrct2/paint/track/gentle/MiniGolf.cpp +++ b/src/openrct2/paint/track/gentle/MiniGolf.cpp @@ -516,7 +516,7 @@ static void PaintMiniGolfTrackFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); if (MiniGolfPaintUtilShouldDrawFence(session, trackElement)) @@ -556,7 +556,7 @@ static void PaintMiniGolfTrack25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); imageId = GetStationColourScheme(session, trackElement).WithIndex(kMiniGolfTrackSprites25DegUp[direction][1]); @@ -598,7 +598,7 @@ static void PaintMiniGolfTrackFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); imageId = GetStationColourScheme(session, trackElement).WithIndex(kMiniGolfTrackSpritesFlatTo25DegUp[direction][1]); @@ -640,7 +640,7 @@ static void PaintMiniGolfTrack25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); imageId = GetStationColourScheme(session, trackElement).WithIndex(kMiniGolfTrackSprites25DegUpToFlat[direction][1]); @@ -697,7 +697,7 @@ static void PaintMiniGolfStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto* stationObj = ride.GetStationObject(); + const auto* stationObj = ride.getStationObject(); ImageId imageId; bool hasFence; @@ -768,9 +768,7 @@ static void PaintMiniGolfTrackLeftQuarterTurn1Tile( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomLeftSide), - direction), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); const bool shouldDrawFence = MiniGolfPaintUtilShouldDrawFence(session, trackElement); diff --git a/src/openrct2/paint/track/gentle/MiniHelicopters.cpp b/src/openrct2/paint/track/gentle/MiniHelicopters.cpp index 26f0679484..e7805d46ea 100644 --- a/src/openrct2/paint/track/gentle/MiniHelicopters.cpp +++ b/src/openrct2/paint/track/gentle/MiniHelicopters.cpp @@ -32,25 +32,26 @@ static void PaintMiniHelicoptersTrackStation( if (direction == 0 || direction == 2) { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); - imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_NE_SW); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height + 1 }, { 32, 20, 1 } }); } else if (direction == 1 || direction == 3) { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); - imageId = session.TrackColours.WithIndex(SPR_TRACK_SUBMARINE_RIDE_MINI_HELICOPTERS_FLAT_SE_NW); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height + 1 }, { 20, 32, 1 } }); } - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); TrackPaintUtilDrawStationTunnel(session, direction, height); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, -1, height, session.SupportColours); + } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -85,7 +86,7 @@ static void PaintMiniHelicoptersTrackFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -129,7 +130,7 @@ static void PaintMiniHelicoptersTrackFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); } @@ -173,7 +174,7 @@ static void PaintMiniHelicoptersTrack25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); } @@ -217,7 +218,7 @@ static void PaintMiniHelicoptersTrack25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); } @@ -265,9 +266,7 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::topCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::top), direction), 0xFFFF, 0); break; @@ -275,9 +274,7 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left), direction), 0xFFFF, 0); break; @@ -286,9 +283,7 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::bottomCorner), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom), direction), 0xFFFF, 0); break; @@ -327,9 +322,7 @@ static void PaintMiniHelicoptersTrackLeftQuarterTurn1Tile( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomLeftSide), - direction), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } diff --git a/src/openrct2/paint/track/gentle/MonorailCycles.cpp b/src/openrct2/paint/track/gentle/MonorailCycles.cpp index f15568d01f..912349e53b 100644 --- a/src/openrct2/paint/track/gentle/MonorailCycles.cpp +++ b/src/openrct2/paint/track/gentle/MonorailCycles.cpp @@ -187,7 +187,7 @@ static void PaintMonorailCyclesTrackFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -201,25 +201,26 @@ static void PaintMonorailCyclesStation( if (direction == 0 || direction == 2) { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 1 } }); - imageId = session.TrackColours.WithIndex(SprMonorailCyclesFlatSwNe); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 20, 1 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height + 1 }, { 32, 20, 1 } }); } else if (direction == 1 || direction == 3) { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 1 } }); - imageId = session.TrackColours.WithIndex(SprMonorailCyclesFlatNwSe); - PaintAddImageAsChild(session, imageId, { 0, 0, height }, { { 0, 0, height }, { 20, 32, 1 } }); + PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height + 1 }, { 20, 32, 1 } }); } - DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); TrackPaintUtilDrawStationTunnel(session, direction, height); - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Boxed); + } + else + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, -1, height, session.SupportColours); + } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -241,9 +242,7 @@ static void PaintMonorailCyclesTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::topCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::top), direction), 0xFFFF, 0); break; @@ -251,9 +250,7 @@ static void PaintMonorailCyclesTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left), direction), 0xFFFF, 0); break; @@ -262,9 +259,7 @@ static void PaintMonorailCyclesTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::bottomCorner), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom), direction), 0xFFFF, 0); break; @@ -365,9 +360,7 @@ static void PaintMonorailCyclesTrackRightQuarterTurn5Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right), direction), 0xFFFF, 0); break; @@ -376,8 +369,8 @@ static void PaintMonorailCyclesTrackRightQuarterTurn5Tiles( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -385,8 +378,7 @@ static void PaintMonorailCyclesTrackRightQuarterTurn5Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre), direction), 0xFFFF, 0); break; @@ -395,8 +387,8 @@ static void PaintMonorailCyclesTrackRightQuarterTurn5Tiles( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -404,9 +396,7 @@ static void PaintMonorailCyclesTrackRightQuarterTurn5Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left), direction), 0xFFFF, 0); break; @@ -476,9 +466,7 @@ static void PaintMonorailCyclesTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::topCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::top), direction & 1), 0xFFFF, 0); break; @@ -487,8 +475,8 @@ static void PaintMonorailCyclesTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top), direction & 1), 0xFFFF, 0); break; @@ -497,8 +485,8 @@ static void PaintMonorailCyclesTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction & 1), 0xFFFF, 0); break; @@ -506,9 +494,7 @@ static void PaintMonorailCyclesTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom), direction & 1), 0xFFFF, 0); break; @@ -567,9 +553,7 @@ static void PaintMonorailCyclesTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right), direction & 1), 0xFFFF, 0); break; @@ -578,8 +562,8 @@ static void PaintMonorailCyclesTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide, PaintSegment::rightCorner), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right), direction & 1), 0xFFFF, 0); break; @@ -588,8 +572,8 @@ static void PaintMonorailCyclesTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top), direction & 1), 0xFFFF, 0); break; @@ -597,9 +581,7 @@ static void PaintMonorailCyclesTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left), direction & 1), 0xFFFF, 0); break; diff --git a/src/openrct2/paint/track/gentle/ObservationTower.cpp b/src/openrct2/paint/track/gentle/ObservationTower.cpp index 69d06bde5d..b259899a69 100644 --- a/src/openrct2/paint/track/gentle/ObservationTower.cpp +++ b/src/openrct2/paint/track/gentle/ObservationTower.cpp @@ -46,7 +46,7 @@ static void PaintObservationTowerBase( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.SupportColours, height, kFloorSpritesMetalB, stationObject); @@ -78,36 +78,33 @@ static void PaintObservationTowerBase( { case 1: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::topRightSide, - PaintSegment::rightCorner); + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::topRight, PaintSegment::right); break; case 2: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topRight, PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide, - PaintSegment::bottomCorner); + PaintSegment::top, PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight, + PaintSegment::bottom); break; case 4: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::left); break; case 5: - blockedSegments = EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + blockedSegments = EnumsToFlags(PaintSegment::right, PaintSegment::bottomRight, PaintSegment::bottom); break; case 6: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner); + PaintSegment::top, PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom); break; case 7: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight, + PaintSegment::right); break; case 8: - blockedSegments = EnumsToFlags(PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner); + blockedSegments = EnumsToFlags(PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom); break; } PaintUtilSetSegmentSupportHeight(session, blockedSegments, 0xFFFF, 0); diff --git a/src/openrct2/paint/track/gentle/SpaceRings.cpp b/src/openrct2/paint/track/gentle/SpaceRings.cpp index 6a2c2d5088..1ea7f5a3da 100644 --- a/src/openrct2/paint/track/gentle/SpaceRings.cpp +++ b/src/openrct2/paint/track/gentle/SpaceRings.cpp @@ -43,7 +43,7 @@ static void PaintSpaceRingsStructure( { uint32_t vehicleIndex = (segment - direction) & 0x3; const auto* rideEntry = GetRideEntryByIndex(ride.subtype); - if (rideEntry == nullptr || (ride.num_stations != 0 && vehicleIndex >= ride.NumTrains)) + if (rideEntry == nullptr || (ride.numStations != 0 && vehicleIndex >= ride.numTrains)) { session.CurrentlyDrawnEntity = nullptr; session.InteractionType = ViewportInteractionItem::Ride; @@ -53,7 +53,7 @@ static void PaintSpaceRingsStructure( int32_t frameNum = direction; uint32_t baseImageId = rideEntry->Cars[0].base_image_id; auto vehicle = GetEntity(ride.vehicles[vehicleIndex]); - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = vehicle; @@ -67,7 +67,7 @@ static void PaintSpaceRingsStructure( if (stationColour == TrackStationColour) { - stationColour = ImageId(0, ride.vehicle_colours[vehicleIndex].Body, ride.vehicle_colours[vehicleIndex].Trim); + stationColour = ImageId(0, ride.vehicleColours[vehicleIndex].Body, ride.vehicleColours[vehicleIndex].Trim); } auto imageId = stationColour.WithIndex(baseImageId + frameNum); @@ -104,7 +104,7 @@ static void PaintSpaceRings( DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); switch (trackSequence) @@ -152,35 +152,33 @@ static void PaintSpaceRings( break; case 1: cornerSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::topRightSide, - PaintSegment::rightCorner); + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::topRight, PaintSegment::right); break; case 2: - cornerSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner); + cornerSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topRight, PaintSegment::right); break; case 3: cornerSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide, - PaintSegment::bottomCorner); + PaintSegment::top, PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight, + PaintSegment::bottom); break; case 4: - cornerSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner); + cornerSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::left); break; case 5: - cornerSegments = EnumsToFlags(PaintSegment::rightCorner, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + cornerSegments = EnumsToFlags(PaintSegment::right, PaintSegment::bottomRight, PaintSegment::bottom); break; case 6: cornerSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner); + PaintSegment::top, PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom); break; case 7: cornerSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight, + PaintSegment::right); break; case 8: - cornerSegments = EnumsToFlags(PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner); + cornerSegments = EnumsToFlags(PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom); break; } PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); diff --git a/src/openrct2/paint/track/gentle/SpiralSlide.cpp b/src/openrct2/paint/track/gentle/SpiralSlide.cpp index 60eaa7c08c..c06f455787 100644 --- a/src/openrct2/paint/track/gentle/SpiralSlide.cpp +++ b/src/openrct2/paint/track/gentle/SpiralSlide.cpp @@ -56,7 +56,7 @@ static void SpiralSlidePaintTileRight( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; @@ -78,7 +78,7 @@ static void SpiralSlidePaintTileLeft( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; @@ -100,7 +100,7 @@ static void SpiralSlidePaintTileFront( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; @@ -138,9 +138,9 @@ static void SpiralSlidePaintTileFront( PaintAddImageAsParent(session, imageId, { 16, 16, height }, { { 8, 0, height + 3 }, { 8, 16, 108 } }); } - if (session.DPI.zoom_level <= ZoomLevel{ 0 } && ride.slide_in_use != 0) + if (session.DPI.zoom_level <= ZoomLevel{ 0 } && ride.slideInUse != 0) { - uint8_t slide_progress = ride.spiral_slide_progress; + uint8_t slide_progress = ride.spiralSlideProgress; if (slide_progress != 0) { slide_progress--; @@ -186,7 +186,7 @@ static void SpiralSlidePaintTileFront( boundingBox.x = 8; } - imageId = ImageId(offset + slide_progress, ride.slide_peep_t_shirt_colour, COLOUR_GREY); + imageId = ImageId(offset + slide_progress, ride.slidePeepTShirtColour, COLOUR_GREY); PaintAddImageAsChild(session, imageId, { 16, 16, height }, { boundingBoxOffset, boundingBox }); } @@ -200,7 +200,7 @@ static void PaintSpiralSlide( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; @@ -213,9 +213,9 @@ static void PaintSpiralSlide( GetStationColourScheme(session, trackElement)); // Base - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); - if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) + if (stationObject != nullptr && !(stationObject->Flags & StationObjectFlags::noPlatforms)) { auto imageId = session.SupportColours.WithIndex( rideEntry->Cars[0].base_image_id + ((direction & 1) ? SpiralSlideBaseB : SpiralSlideBaseA)); diff --git a/src/openrct2/paint/track/shops/Facility.cpp b/src/openrct2/paint/track/shops/Facility.cpp index ca003055ce..c0026e6416 100644 --- a/src/openrct2/paint/track/shops/Facility.cpp +++ b/src/openrct2/paint/track/shops/Facility.cpp @@ -34,7 +34,7 @@ static void PaintFacility( bool hasSupports = DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, GetShopSupportColourScheme(session, trackElement)); - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; diff --git a/src/openrct2/paint/track/shops/Shop.cpp b/src/openrct2/paint/track/shops/Shop.cpp index f653ad98fa..825b3eb324 100644 --- a/src/openrct2/paint/track/shops/Shop.cpp +++ b/src/openrct2/paint/track/shops/Shop.cpp @@ -33,7 +33,7 @@ static void PaintShop( bool hasSupports = DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, GetShopSupportColourScheme(session, trackElement)); - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; diff --git a/src/openrct2/paint/track/thrill/3dCinema.cpp b/src/openrct2/paint/track/thrill/3dCinema.cpp index 49d93d357f..98b85058d1 100644 --- a/src/openrct2/paint/track/thrill/3dCinema.cpp +++ b/src/openrct2/paint/track/thrill/3dCinema.cpp @@ -25,17 +25,17 @@ static void Paint3dCinemaDome( PaintSession& session, const Ride& ride, uint8_t direction, int8_t xOffset, int8_t yOffset, uint16_t height, ImageId stationColour) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && !ride.vehicles[0].IsNull()) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK && !ride.vehicles[0].IsNull()) { session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = GetEntity(ride.vehicles[0]); } - auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto imageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); if (stationColour != TrackStationColour) { imageTemplate = stationColour; @@ -64,7 +64,7 @@ static void Paint3dCinema( WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, stationColour); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); @@ -99,20 +99,19 @@ static void Paint3dCinema( { case 1: // top - cornerSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + cornerSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 3: // right - cornerSegments = EnumsToFlags(PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight); break; case 6: // left - cornerSegments = EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide); + cornerSegments = EnumsToFlags(PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft); break; case 7: // bottom - cornerSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight); break; } diff --git a/src/openrct2/paint/track/thrill/Enterprise.cpp b/src/openrct2/paint/track/thrill/Enterprise.cpp index e1cbf96e80..9c3c3d6a6b 100644 --- a/src/openrct2/paint/track/thrill/Enterprise.cpp +++ b/src/openrct2/paint/track/thrill/Enterprise.cpp @@ -55,7 +55,7 @@ static void PaintEnterpriseStructure( return; Vehicle* vehicle = nullptr; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK) { vehicle = GetEntity(ride.vehicles[0]); if (vehicle != nullptr) @@ -74,7 +74,7 @@ static void PaintEnterpriseStructure( imageOffset = (vehicle->Pitch << 2) + (((vehicle->Orientation >> 3) + session.CurrentRotation) % 4); } - auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto imageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); auto imageFlags = GetStationColourScheme(session, trackElement); if (imageFlags != TrackStationColour) { @@ -104,7 +104,7 @@ static void PaintEnterprise( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); TrackPaintUtilPaintFences( @@ -157,17 +157,16 @@ static void PaintEnterprise( switch (trackSequence) { case 0: - cornerSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + cornerSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 3: - cornerSegments = EnumsToFlags(PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight); break; case 12: - cornerSegments = EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide); + cornerSegments = EnumsToFlags(PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft); break; case 15: - cornerSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight); break; } PaintUtilSetSegmentSupportHeight(session, cornerSegments, height + 2, 0x20); diff --git a/src/openrct2/paint/track/thrill/GoKarts.cpp b/src/openrct2/paint/track/thrill/GoKarts.cpp index 0ebc55d2e0..6be488d3e2 100644 --- a/src/openrct2/paint/track/thrill/GoKarts.cpp +++ b/src/openrct2/paint/track/thrill/GoKarts.cpp @@ -354,7 +354,7 @@ static void PaintGoKartsStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto* stationObj = ride.GetStationObject(); + const auto* stationObj = ride.getStationObject(); bool hasFence; ImageId imageId; diff --git a/src/openrct2/paint/track/thrill/LaunchedFreefall.cpp b/src/openrct2/paint/track/thrill/LaunchedFreefall.cpp index 2f56dadc46..1e95d74d30 100644 --- a/src/openrct2/paint/track/thrill/LaunchedFreefall.cpp +++ b/src/openrct2/paint/track/thrill/LaunchedFreefall.cpp @@ -44,7 +44,7 @@ static void PaintLaunchedFreefallBase( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.SupportColours, height, kFloorSpritesMetal, stationObject); @@ -78,36 +78,33 @@ static void PaintLaunchedFreefallBase( break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::topRightSide, - PaintSegment::rightCorner); + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::topRight, PaintSegment::right); break; case 2: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topRight, PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide, - PaintSegment::bottomCorner); + PaintSegment::top, PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight, + PaintSegment::bottom); break; case 4: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::left); break; case 5: - blockedSegments = EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + blockedSegments = EnumsToFlags(PaintSegment::right, PaintSegment::bottomRight, PaintSegment::bottom); break; case 6: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner); + PaintSegment::top, PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom); break; case 7: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight, + PaintSegment::right); break; case 8: - blockedSegments = EnumsToFlags(PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner); + blockedSegments = EnumsToFlags(PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom); break; } PaintUtilSetSegmentSupportHeight(session, blockedSegments, 0xFFFF, 0); diff --git a/src/openrct2/paint/track/thrill/MagicCarpet.cpp b/src/openrct2/paint/track/thrill/MagicCarpet.cpp index ac8d78bf83..43d5279266 100644 --- a/src/openrct2/paint/track/thrill/MagicCarpet.cpp +++ b/src/openrct2/paint/track/thrill/MagicCarpet.cpp @@ -93,7 +93,7 @@ static ImageIndex GetMagicCarpetPendulumImage(Plane plane, Direction direction, static Vehicle* GetFirstVehicle(const Ride& ride) { - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK) { return GetEntity(ride.vehicles[0]); } @@ -146,7 +146,7 @@ static void PaintMagicCarpetVehicle( PaintSession& session, const Ride& ride, uint8_t direction, int32_t swing, CoordsXYZ offset, const BoundBoxXYZ& bb, ImageId stationColour) { - const auto* rideEntry = ride.GetRideEntry(); + const auto* rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; @@ -169,7 +169,7 @@ static void PaintMagicCarpetVehicle( offset.z += kMagicCarpetOscillationZ[swing]; // Vehicle - auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto imageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); if (stationColour != TrackStationColour) { imageTemplate = stationColour; @@ -225,9 +225,9 @@ static void PaintMagicCarpet( case 0: case 2: DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); - if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) + if (stationObject != nullptr && !(stationObject->Flags & StationObjectFlags::noPlatforms)) { auto imageId = session.SupportColours.WithIndex(SPR_STATION_BASE_D); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); diff --git a/src/openrct2/paint/track/thrill/MotionSimulator.cpp b/src/openrct2/paint/track/thrill/MotionSimulator.cpp index 25b02ba441..b1ea751351 100644 --- a/src/openrct2/paint/track/thrill/MotionSimulator.cpp +++ b/src/openrct2/paint/track/thrill/MotionSimulator.cpp @@ -38,14 +38,14 @@ static void PaintMotionSimulatorVehicle( PaintSession& session, const Ride& ride, int8_t offsetX, int8_t offsetY, uint8_t direction, int32_t height, ImageId stationColour) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return; CoordsXYZ offset(offsetX, offsetY, height + 2); Vehicle* vehicle = nullptr; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK) { vehicle = GetEntity(ride.vehicles[0]); if (vehicle != nullptr) @@ -68,7 +68,7 @@ static void PaintMotionSimulatorVehicle( } } - auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto imageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); if (stationColour != TrackStationColour) { imageTemplate = stationColour; @@ -116,7 +116,7 @@ static void PaintMotionSimulator( WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, stationColour); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); diff --git a/src/openrct2/paint/track/thrill/RotoDrop.cpp b/src/openrct2/paint/track/thrill/RotoDrop.cpp index 8c0022cf4d..493ca6d688 100644 --- a/src/openrct2/paint/track/thrill/RotoDrop.cpp +++ b/src/openrct2/paint/track/thrill/RotoDrop.cpp @@ -48,7 +48,7 @@ static void PaintRotoDropBase( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, GetStationColourScheme(session, trackElement)); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.SupportColours, height, kFloorSpritesMetalB, stationObject); @@ -83,36 +83,33 @@ static void PaintRotoDropBase( { case 1: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::topRightSide, - PaintSegment::rightCorner); + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::topRight, PaintSegment::right); break; case 2: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topRight, PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide, - PaintSegment::bottomCorner); + PaintSegment::top, PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight, + PaintSegment::bottom); break; case 4: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::left); break; case 5: - blockedSegments = EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + blockedSegments = EnumsToFlags(PaintSegment::right, PaintSegment::bottomRight, PaintSegment::bottom); break; case 6: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner); + PaintSegment::top, PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom); break; case 7: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight, + PaintSegment::right); break; case 8: - blockedSegments = EnumsToFlags(PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner); + blockedSegments = EnumsToFlags(PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom); break; } PaintUtilSetSegmentSupportHeight(session, blockedSegments, 0xFFFF, 0); diff --git a/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp b/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp index 4f696b6d43..474ccd04a4 100644 --- a/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp +++ b/src/openrct2/paint/track/thrill/SwingingInverterShip.cpp @@ -74,7 +74,7 @@ static void PaintSwingingInverterShipStructure( BoundBoxXYZ bb = { { boundBox.offset, height }, { boundBox.length, 127 } }; Vehicle* vehicle = nullptr; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK) { vehicle = GetEntity(ride.vehicles[0]); if (vehicle != nullptr) @@ -103,7 +103,7 @@ static void PaintSwingingInverterShipStructure( } } - auto vehicleImageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto vehicleImageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); if (stationColour != TrackStationColour) { vehicleImageTemplate = stationColour; @@ -134,13 +134,13 @@ static void PaintSwingingInverterShip( uint8_t relativeTrackSequence = kTrackMap1x4[direction][trackSequence]; ImageId imageId; - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); if (relativeTrackSequence != 1 && relativeTrackSequence != 3) { DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); - if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) + if (stationObject != nullptr && !(stationObject->Flags & StationObjectFlags::noPlatforms)) { imageId = session.SupportColours.WithIndex(SPR_STATION_BASE_D); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); diff --git a/src/openrct2/paint/track/thrill/SwingingShip.cpp b/src/openrct2/paint/track/thrill/SwingingShip.cpp index c80968a325..7540378387 100644 --- a/src/openrct2/paint/track/thrill/SwingingShip.cpp +++ b/src/openrct2/paint/track/thrill/SwingingShip.cpp @@ -66,7 +66,7 @@ static void PaintSwingingShipRiders( if (session.DPI.zoom_level > ZoomLevel{ 1 }) return; - if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + if (!(ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) return; int32_t peep = 0; @@ -95,7 +95,7 @@ static void PaintSwingingShipStructure( return; Vehicle* vehicle = nullptr; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && !ride.vehicles[0].IsNull()) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK && !ride.vehicles[0].IsNull()) { vehicle = GetEntity(ride.vehicles[0]); session.InteractionType = ViewportInteractionItem::Entity; @@ -126,7 +126,7 @@ static void PaintSwingingShipStructure( } auto supportsImageTemplate = session.TrackColours; - auto vehicleImageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto vehicleImageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); if (stationColour != TrackStationColour) { vehicleImageTemplate = stationColour; @@ -162,7 +162,7 @@ static void PaintSwingingShip( ImageId imageId; bool hasFence; - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); if (relativeTrackSequence == 1 || relativeTrackSequence == 4) { @@ -172,7 +172,7 @@ static void PaintSwingingShip( else { DrawSupportsSideBySide(session, direction, height, session.SupportColours, MetalSupportType::Tubes); - if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) + if (stationObject != nullptr && !(stationObject->Flags & StationObjectFlags::noPlatforms)) { ImageIndex base = (direction & 1) ? SPR_STATION_BASE_A_NW_SE : SPR_STATION_BASE_A_SW_NE; imageId = session.SupportColours.WithIndex(base); @@ -182,7 +182,7 @@ static void PaintSwingingShip( PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - if (stationObject != nullptr && !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) + if (stationObject != nullptr && !(stationObject->Flags & StationObjectFlags::noPlatforms)) { if (direction & 1) { diff --git a/src/openrct2/paint/track/thrill/TopSpin.cpp b/src/openrct2/paint/track/thrill/TopSpin.cpp index 50f2529295..922ef22737 100644 --- a/src/openrct2/paint/track/thrill/TopSpin.cpp +++ b/src/openrct2/paint/track/thrill/TopSpin.cpp @@ -104,7 +104,7 @@ static void PaintTopSpinSeat( break; } - auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto imageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); if (stationColour != TrackStationColour) { imageTemplate = stationColour; @@ -130,7 +130,7 @@ static void PaintTopSpinVehicle( uint8_t seatRotation = 0; uint8_t armRotation = 0; auto* vehicle = GetEntity(ride.vehicles[0]); - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { session.InteractionType = ViewportInteractionItem::Entity; session.CurrentlyDrawnEntity = vehicle; @@ -150,8 +150,8 @@ static void PaintTopSpinVehicle( CoordsXYZ offset = { al, cl, height }; BoundBoxXYZ bb = { { al + 16, cl + 16, height }, { 24, 24, 90 } }; - auto supportImageTemplate = ImageId(0, ride.track_colour[0].main, ride.track_colour[0].supports); - auto armImageTemplate = ImageId(0, ride.track_colour[0].main, ride.track_colour[0].additional); + auto supportImageTemplate = ImageId(0, ride.trackColours[0].main, ride.trackColours[0].supports); + auto armImageTemplate = ImageId(0, ride.trackColours[0].main, ride.trackColours[0].additional); if (stationColour != TrackStationColour) { supportImageTemplate = stationColour; @@ -193,7 +193,7 @@ static void PaintTopSpin( WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, stationColour); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, session.TrackColours, height, kFloorSpritesCork, stationObject); @@ -228,20 +228,19 @@ static void PaintTopSpin( { case 1: // top - cornerSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + cornerSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 3: // right - cornerSegments = EnumsToFlags(PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight); break; case 6: // left - cornerSegments = EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide); + cornerSegments = EnumsToFlags(PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft); break; case 7: // bottom - cornerSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight); break; } diff --git a/src/openrct2/paint/track/thrill/Twist.cpp b/src/openrct2/paint/track/thrill/Twist.cpp index ceb2a9df9c..0615444006 100644 --- a/src/openrct2/paint/track/thrill/Twist.cpp +++ b/src/openrct2/paint/track/thrill/Twist.cpp @@ -37,7 +37,7 @@ static void PaintTwistStructure( height += 7; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && !ride.vehicles[0].IsNull()) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK && !ride.vehicles[0].IsNull()) { vehicle = GetEntity(ride.vehicles[0]); @@ -53,7 +53,7 @@ static void PaintTwistStructure( frameNum = frameNum % 216; } - auto imageTemplate = ImageId(0, ride.vehicle_colours[0].Body, ride.vehicle_colours[0].Trim); + auto imageTemplate = ImageId(0, ride.vehicleColours[0].Body, ride.vehicleColours[0].Trim); if (stationColour != TrackStationColour) { imageTemplate = stationColour; @@ -68,7 +68,7 @@ static void PaintTwistStructure( }; PaintAddImageAsParent(session, imageId, { xOffset, yOffset, height }, bb); - if (session.DPI.zoom_level < ZoomLevel{ 1 } && ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) + if (session.DPI.zoom_level < ZoomLevel{ 1 } && ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK && vehicle != nullptr) { for (int32_t i = 0; i < vehicle->num_peeps; i += 2) { @@ -98,7 +98,7 @@ static void PaintTwist( WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, stationColour); - const StationObject* stationObject = ride.GetStationObject(); + const StationObject* stationObject = ride.getStationObject(); TrackPaintUtilPaintFloor(session, edges, stationColour, height, kFloorSpritesCork, stationObject); switch (trackSequence) @@ -148,17 +148,16 @@ static void PaintTwist( switch (trackSequence) { case 1: - cornerSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + cornerSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 3: - cornerSegments = EnumsToFlags(PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight); break; case 6: - cornerSegments = EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide); + cornerSegments = EnumsToFlags(PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft); break; case 7: - cornerSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + cornerSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight); break; } diff --git a/src/openrct2/paint/track/transport/Chairlift.cpp b/src/openrct2/paint/track/transport/Chairlift.cpp index 24d0f807c6..63c8a41ab8 100644 --- a/src/openrct2/paint/track/transport/Chairlift.cpp +++ b/src/openrct2/paint/track/transport/Chairlift.cpp @@ -200,7 +200,7 @@ static void ChairliftPaintStationNeSw( bool isStart = ChairliftPaintUtilIsFirstTrack(ride, trackElement, pos, trackType); bool isEnd = ChairliftPaintUtilIsLastTrack(ride, trackElement, pos, trackType); - const auto* stationObj = ride.GetStationObject(); + const auto* stationObj = ride.getStationObject(); auto stationColour = GetStationColourScheme(session, trackElement); WoodenASupportsPaintSetupRotated( session, WoodenSupportType::Truss, WoodenSupportSubType::NeSw, direction, height, stationColour); @@ -243,7 +243,7 @@ static void ChairliftPaintStationNeSw( imageId = session.TrackColours.WithIndex(SPR_FENCE_METAL_SW); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 30, 2, height + 4 }, { 1, 28, 27 } }); - imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairlift_bullwheel_rotation / 16384]); + imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairliftBullwheelRotation / 16384]); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 19 } }); imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_NE); @@ -253,7 +253,7 @@ static void ChairliftPaintStationNeSw( } else if ((direction == 2 && isStart) || (direction == 0 && isEnd)) { - imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairlift_bullwheel_rotation / 16384]); + imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairliftBullwheelRotation / 16384]); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 19 } }); imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_SW); @@ -291,7 +291,7 @@ static void ChairliftPaintStationSeNw( bool isStart = ChairliftPaintUtilIsFirstTrack(ride, trackElement, pos, trackType); bool isEnd = ChairliftPaintUtilIsLastTrack(ride, trackElement, pos, trackType); - const auto* stationObj = ride.GetStationObject(); + const auto* stationObj = ride.getStationObject(); auto stationColour = GetStationColourScheme(session, trackElement); WoodenASupportsPaintSetupRotated( @@ -333,7 +333,7 @@ static void ChairliftPaintStationSeNw( bool drawLeftColumn = true; if ((direction == 1 && isStart) || (direction == 3 && isEnd)) { - imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairlift_bullwheel_rotation / 16384]); + imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairliftBullwheelRotation / 16384]); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 14, 14, height + 4 }, { 4, 4, 19 } }); imageId = session.TrackColours.WithIndex(SPR_CHAIRLIFT_STATION_END_CAP_SE); @@ -346,7 +346,7 @@ static void ChairliftPaintStationSeNw( imageId = session.TrackColours.WithIndex(SPR_FENCE_METAL_SE); PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 2, 30, height + 4 }, { 28, 1, 27 } }); - imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairlift_bullwheel_rotation / 16384]); + imageId = session.TrackColours.WithIndex(chairlift_bullwheel_frames[ride.chairliftBullwheelRotation / 16384]); auto bb = BoundBoxXYZ{ { 14, 14, height + 4 }, { 4, 4, 19 } }; PaintAddImageAsParent(session, imageId, { 0, 0, height }, bb); @@ -647,8 +647,8 @@ static void ChairliftPaintLeftQuarterTurn1Tile( } ChairliftPaintUtilDrawSupports( - session, PaintUtilRotateSegments(EnumsToFlags(PaintSegment::topLeftSide, PaintSegment::bottomLeftSide), direction), - height, supportType); + session, PaintUtilRotateSegments(EnumsToFlags(PaintSegment::topLeft, PaintSegment::bottomLeft), direction), height, + supportType); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); diff --git a/src/openrct2/paint/track/transport/Lift.cpp b/src/openrct2/paint/track/transport/Lift.cpp index aa3ae26034..0bab68339d 100644 --- a/src/openrct2/paint/track/transport/Lift.cpp +++ b/src/openrct2/paint/track/transport/Lift.cpp @@ -86,36 +86,33 @@ static void PaintLiftBase( { case 1: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::topCorner, PaintSegment::topRightSide, - PaintSegment::rightCorner); + PaintSegment::left, PaintSegment::topLeft, PaintSegment::top, PaintSegment::topRight, PaintSegment::right); break; case 2: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topRight, PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topRightSide, PaintSegment::rightCorner, PaintSegment::bottomRightSide, - PaintSegment::bottomCorner); + PaintSegment::top, PaintSegment::topRight, PaintSegment::right, PaintSegment::bottomRight, + PaintSegment::bottom); break; case 4: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::left); break; case 5: - blockedSegments = EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + blockedSegments = EnumsToFlags(PaintSegment::right, PaintSegment::bottomRight, PaintSegment::bottom); break; case 6: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::leftCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomCorner); + PaintSegment::top, PaintSegment::topLeft, PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom); break; case 7: blockedSegments = EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom, PaintSegment::bottomRight, + PaintSegment::right); break; case 8: - blockedSegments = EnumsToFlags(PaintSegment::leftCorner, PaintSegment::bottomLeftSide, PaintSegment::bottomCorner); + blockedSegments = EnumsToFlags(PaintSegment::left, PaintSegment::bottomLeft, PaintSegment::bottom); break; } PaintUtilSetSegmentSupportHeight(session, blockedSegments, 0xFFFF, 0); diff --git a/src/openrct2/paint/track/transport/MiniatureRailway.cpp b/src/openrct2/paint/track/transport/MiniatureRailway.cpp index 21d407d714..40bff2c6f3 100644 --- a/src/openrct2/paint/track/transport/MiniatureRailway.cpp +++ b/src/openrct2/paint/track/transport/MiniatureRailway.cpp @@ -156,13 +156,6 @@ static constexpr uint32_t miniature_railway_track_pieces_flat[4] = { SPR_MINIATURE_RAILWAY_FLAT_NW_SE, }; -static constexpr uint32_t miniature_railway_station_floor[4] = { - SPR_STATION_BASE_A_SW_NE, - SPR_STATION_BASE_A_NW_SE, - SPR_STATION_BASE_A_SW_NE, - SPR_STATION_BASE_A_NW_SE, -}; - static constexpr uint32_t miniature_railway_track_pieces_flat_station[4] = { SPR_MINIATURE_RAILWAY_FLAT_NO_BASE_SW_NE, SPR_MINIATURE_RAILWAY_FLAT_NO_BASE_NW_SE, @@ -712,21 +705,19 @@ static void PaintMiniatureRailwayStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - ImageId imageId; + if (WoodenASupportsPaintSetupRotated( + session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours)) + { + const ImageId imageId = session.SupportColours.WithIndex(miniature_railway_track_floor[direction]); + PaintAddImageAsChildRotated(session, direction, imageId, { 0, 0, height }, { { 0, 0, height }, { 32, 32, 0 } }); + } - WoodenASupportsPaintSetupRotated( - session, supportType.wooden, WoodenSupportSubType::NeSw, direction, height, session.SupportColours); - - imageId = GetStationColourScheme(session, trackElement).WithIndex(miniature_railway_station_floor[direction]); - PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); - - imageId = session.TrackColours.WithIndex(miniature_railway_track_pieces_flat_station[direction]); - PaintAddImageAsChildRotated(session, direction, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 2 } }); + const ImageId imageId = session.TrackColours.WithIndex(miniature_railway_track_pieces_flat_station[direction]); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 1 }, { 32, 20, 1 } }); TrackPaintUtilDrawStationTunnel(session, direction, height); - TrackPaintUtilDrawStation3(session, ride, direction, height + 2, height, trackElement); - // covers shouldn't be offset by +2 + TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::a, -2, 7, 9); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 30); @@ -1061,26 +1052,25 @@ static void PaintMiniatureRailwayTrackRightQuarterTurn5Tiles( blockedSegments = kSegmentsAll; break; case 1: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomCorner, PaintSegment::topRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::centre, - PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide); + PaintSegment::top, PaintSegment::left, PaintSegment::right, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft, PaintSegment::bottomRight); break; case 4: - blockedSegments = EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide); + blockedSegments = EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight); break; case 5: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::leftCorner, - PaintSegment::bottomCorner, PaintSegment::topLeftSide); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft); break; case 6: blockedSegments = kSegmentsAll; @@ -1196,13 +1186,13 @@ static void PaintMiniatureRailwayTrackSBendLeft( break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right); break; case 3: blockedSegments = kSegmentsAll; @@ -1307,13 +1297,13 @@ static void PaintMiniatureRailwayTrackSBendRight( break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top); break; case 3: blockedSegments = kSegmentsAll; @@ -1423,7 +1413,7 @@ static void PaintMiniatureRailwayTrackRightQuarterTurn3Tiles( break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom); break; case 3: blockedSegments = kSegmentsAll; @@ -1611,7 +1601,9 @@ static void PaintMiniatureRailwayTrackLeftEighthToDiag( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); + + if (trackSequence != 4 || !isRightEighthToOrthog) + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } static constexpr uint32_t kFloorPiecesRightEighthToDiag[4][5] = { @@ -1777,7 +1769,10 @@ static void PaintMiniatureRailwayTrackRightEighthToDiag( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); + + // Fixes #5281. + if (trackSequence != 4 || !isLeftEighthToOrthog) + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD1E0 */ @@ -1871,7 +1866,10 @@ static void MiniatureRailwayTrackDiagFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); + + // Fixes #5281. + if (supportSubType != WoodenSupportSubType::Null) + PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } /** rct2: 0x008AD230 */ @@ -1952,7 +1950,10 @@ static void MiniatureRailwayTrackDiag25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56); + + // Fixes #5281 + if (supportSubType != WoodenSupportSubType::Null) + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AD210 */ @@ -2003,7 +2004,9 @@ static void MiniatureRailwayTrackDiagFlatTo25DegUp( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48); + + if (supportSubType != WoodenSupportSubType::Null) + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** rct2: 0x008AD220 */ @@ -2082,7 +2085,9 @@ static void MiniatureRailwayTrackDiag25DegUpToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56); + + if (supportSubType != WoodenSupportSubType::Null) + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AD260 */ @@ -2160,7 +2165,10 @@ static void MiniatureRailwayTrackDiag25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56); + + // Fixes #5281 + if (supportSubType != WoodenSupportSubType::Null) + PaintUtilSetGeneralSupportHeight(session, height + 56); } /** rct2: 0x008AD240 */ @@ -2237,7 +2245,10 @@ static void MiniatureRailwayTrackDiagFlatTo25DegDown( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 56); + + // Fixes #5281, + if (supportSubType != WoodenSupportSubType::Null) + PaintUtilSetGeneralSupportHeight(session, height + 56); } static void MiniatureRailwayTrackDiag25DegDownToFlat( @@ -2286,7 +2297,10 @@ static void MiniatureRailwayTrackDiag25DegDownToFlat( } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); - PaintUtilSetGeneralSupportHeight(session, height + 48); + + // Fixes #5281. + if (supportSubType != WoodenSupportSubType::Null) + PaintUtilSetGeneralSupportHeight(session, height + 48); } /** diff --git a/src/openrct2/paint/track/transport/Monorail.cpp b/src/openrct2/paint/track/transport/Monorail.cpp index 3fd93bff77..b828949f55 100644 --- a/src/openrct2/paint/track/transport/Monorail.cpp +++ b/src/openrct2/paint/track/transport/Monorail.cpp @@ -442,7 +442,7 @@ static void PaintMonorailTrackFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -452,34 +452,8 @@ static void PaintMonorailStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - ImageId imageId; - const StationObject* stationObject = nullptr; - - stationObject = ride.GetStationObject(); - - if (stationObject == nullptr || !(stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS)) - { - if (direction == 0 || direction == 2) - { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 0, 2, height }, { 32, 28, 2 } }); - } - else if (direction == 1 || direction == 3) - { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height - 2 }, { { 2, 0, height }, { 28, 32, 2 } }); - } - } - - imageId = session.TrackColours.WithIndex(kTrackPiecesFlat[direction]); - if (direction == 0 || direction == 2) - { - PaintAddImageAsChild(session, imageId, { 0, 6, height }, { { 0, 0, height }, { 32, 20, 2 } }); - } - else - { - PaintAddImageAsChild(session, imageId, { 6, 0, height }, { { 0, 0, height }, { 20, 32, 2 } }); - } + const ImageId imageId = session.TrackColours.WithIndex(kTrackPiecesFlat[direction]); + PaintAddImageAsParentRotated(session, direction, imageId, { 0, 6, height }, { { 0, 6, height + 1 }, { 32, 20, 2 } }); if (direction == 0 || direction == 2) { @@ -490,9 +464,15 @@ static void PaintMonorailStation( PaintUtilPushTunnelRight(session, height, kTunnelGroup, TunnelSubType::Flat); } - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, -2)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); @@ -538,7 +518,7 @@ static void PaintMonorailTrack25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); } @@ -583,7 +563,7 @@ static void PaintMonorailTrackFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); } @@ -628,7 +608,7 @@ static void PaintMonorailTrack25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); } @@ -699,25 +679,25 @@ static void PaintMonorailTrackRightQuarterTurn5Tiles( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::bottomCorner, PaintSegment::topRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre); + PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre); break; case 5: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::leftCorner, - PaintSegment::bottomCorner, PaintSegment::topLeftSide); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft); break; case 6: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::leftCorner); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left); break; } @@ -787,21 +767,21 @@ static void PaintMonorailTrackSBendLeft( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::top); break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction & 1), 0xFFFF, 0); @@ -857,21 +837,21 @@ static void PaintMonorailTrackSBendRight( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction & 1), 0xFFFF, 0); @@ -902,15 +882,15 @@ static void PaintMonorailTrackRightQuarterTurn3Tiles( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::leftCorner); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); @@ -981,26 +961,26 @@ static void PaintMonorailTrackLeftEighthToDiag( switch (trackSequence) { case 0: - blockedSegments = EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide); + blockedSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight); break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::topCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::top); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, PaintSegment::bottomRightSide, - PaintSegment::rightCorner); + PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, PaintSegment::bottomRight, + PaintSegment::right); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::leftCorner, PaintSegment::topLeftSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::left, PaintSegment::topLeft); break; case 4: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::topLeftSide, - PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::topLeft, + PaintSegment::bottom, PaintSegment::bottomRight); break; } @@ -1057,26 +1037,25 @@ static void PaintMonorailTrackRightEighthToDiag( switch (trackSequence) { case 0: - blockedSegments = EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide); + blockedSegments = EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight); break; case 1: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomCorner, - PaintSegment::bottomRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottom, + PaintSegment::bottomRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, PaintSegment::topLeftSide, - PaintSegment::topCorner); + PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, PaintSegment::topLeft, PaintSegment::top); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomCorner, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottom, PaintSegment::bottomRight); break; case 4: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::leftCorner, - PaintSegment::topLeftSide, PaintSegment::bottomRightSide); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::left, + PaintSegment::topLeft, PaintSegment::bottomRight); break; } diff --git a/src/openrct2/paint/track/transport/SuspendedMonorail.cpp b/src/openrct2/paint/track/transport/SuspendedMonorail.cpp index 24d4bac6a8..9f9f38bef9 100644 --- a/src/openrct2/paint/track/transport/SuspendedMonorail.cpp +++ b/src/openrct2/paint/track/transport/SuspendedMonorail.cpp @@ -61,24 +61,24 @@ static void SuspendedMonorailTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][3] = { - { SPR_STATION_BASE_C_SW_NE, 25853, SPR_STATION_INVERTED_BAR_F_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 25854, SPR_STATION_INVERTED_BAR_F_NW_SE }, - { SPR_STATION_BASE_C_SW_NE, 25853, SPR_STATION_INVERTED_BAR_F_SW_NE }, - { SPR_STATION_BASE_C_NW_SE, 25854, SPR_STATION_INVERTED_BAR_F_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { 25853, SPR_STATION_INVERTED_BAR_F_SW_NE }, + { 25854, SPR_STATION_INVERTED_BAR_F_NW_SE }, + { 25853, SPR_STATION_INVERTED_BAR_F_SW_NE }, + { 25854, SPR_STATION_INVERTED_BAR_F_NW_SE }, }; - + const bool stationDrawn = TrackPaintUtilDrawStationInverted( + session, ride, direction, height, trackElement, STATION_VARIANT_TALL); PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][0]), { 0, 0, height }, - { { 0, 2, height }, { 32, 28, 1 } }); - PaintAddImageAsParentRotated( - session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height + 32 }, + session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height + 32 }, { { 0, 6, height + 32 }, { 32, 20, 3 } }); - PaintAddImageAsChildRotated( - session, direction, session.SupportColours.WithIndex(imageIds[direction][2]), { 0, 6, height + 32 }, - { { 0, 6, height + 32 }, { 32, 20, 3 } }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - TrackPaintUtilDrawStationInverted(session, ride, direction, height, trackElement, STATION_VARIANT_TALL); + if (stationDrawn) + { + PaintAddImageAsChildRotated( + session, direction, session.SupportColours.WithIndex(imageIds[direction][1]), { 0, 6, height + 32 }, + { { 0, 6, height + 32 }, { 32, 20, 3 } }); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } PaintUtilPushTunnelRotated(session, direction, height, TunnelType::InvertedSquare); PaintUtilSetSegmentSupportHeight(session, kSegmentsAll, 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -336,8 +336,8 @@ static void SuspendedMonorailTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -378,8 +378,8 @@ static void SuspendedMonorailTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -410,9 +410,7 @@ static void SuspendedMonorailTrackLeftQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -446,8 +444,8 @@ static void SuspendedMonorailTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -481,8 +479,8 @@ static void SuspendedMonorailTrackLeftQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -547,9 +545,7 @@ static void SuspendedMonorailTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 42, 0, 0); @@ -587,8 +583,8 @@ static void SuspendedMonorailTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 42, 0, 0); @@ -622,8 +618,8 @@ static void SuspendedMonorailTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 42, 0, 0); @@ -658,9 +654,7 @@ static void SuspendedMonorailTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendLeftSupports(session, supportType.metal, trackSequence, direction, height + 42, 0, 0); @@ -714,9 +708,7 @@ static void SuspendedMonorailTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 42, 0, 0); @@ -754,8 +746,8 @@ static void SuspendedMonorailTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 42, 0, 0); @@ -789,8 +781,8 @@ static void SuspendedMonorailTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 42, 0, 0); @@ -825,9 +817,7 @@ static void SuspendedMonorailTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); DrawSBendRightSupports(session, supportType.metal, trackSequence, direction, height + 42, 0, 0); @@ -882,8 +872,8 @@ static void SuspendedMonorailTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -924,9 +914,7 @@ static void SuspendedMonorailTrackLeftQuarterTurn3( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -960,8 +948,8 @@ static void SuspendedMonorailTrackLeftQuarterTurn3( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); MetalASupportsPaintSetup( @@ -1062,8 +1050,8 @@ static void SuspendedMonorailTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1096,8 +1084,8 @@ static void SuspendedMonorailTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1106,9 +1094,7 @@ static void SuspendedMonorailTrackLeftEighthToDiag( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1142,8 +1128,8 @@ static void SuspendedMonorailTrackLeftEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -1242,8 +1228,8 @@ static void SuspendedMonorailTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1276,8 +1262,8 @@ static void SuspendedMonorailTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1287,8 +1273,7 @@ static void SuspendedMonorailTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); @@ -1322,8 +1307,8 @@ static void SuspendedMonorailTrackRightEighthToDiag( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); switch (direction) @@ -1409,9 +1394,7 @@ static void SuspendedMonorailTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1428,8 +1411,7 @@ static void SuspendedMonorailTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1447,8 +1429,7 @@ static void SuspendedMonorailTrackDiag25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1466,9 +1447,7 @@ static void SuspendedMonorailTrackDiag25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -1515,9 +1494,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1534,8 +1511,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1553,8 +1529,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegUp( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1572,9 +1547,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -1621,9 +1594,7 @@ static void SuspendedMonorailTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1640,8 +1611,7 @@ static void SuspendedMonorailTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1659,8 +1629,7 @@ static void SuspendedMonorailTrackDiag25DegUpToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1678,9 +1647,7 @@ static void SuspendedMonorailTrackDiag25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -1727,9 +1694,7 @@ static void SuspendedMonorailTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1746,8 +1711,7 @@ static void SuspendedMonorailTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1765,8 +1729,7 @@ static void SuspendedMonorailTrackDiag25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); @@ -1784,9 +1747,7 @@ static void SuspendedMonorailTrackDiag25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -1833,9 +1794,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1851,8 +1810,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -1869,8 +1827,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegDown( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1887,9 +1844,7 @@ static void SuspendedMonorailTrackDiagFlatTo25DegDown( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) @@ -1936,9 +1891,7 @@ static void SuspendedMonorailTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1955,8 +1908,7 @@ static void SuspendedMonorailTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1974,8 +1926,7 @@ static void SuspendedMonorailTrackDiag25DegDownToFlat( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 64); @@ -1993,9 +1944,7 @@ static void SuspendedMonorailTrackDiag25DegDownToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); switch (direction) diff --git a/src/openrct2/paint/track/water/BoatHire.cpp b/src/openrct2/paint/track/water/BoatHire.cpp index a4f6525119..798b07385e 100644 --- a/src/openrct2/paint/track/water/BoatHire.cpp +++ b/src/openrct2/paint/track/water/BoatHire.cpp @@ -64,7 +64,7 @@ static void PaintBoatHireTrackFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 16); } @@ -74,7 +74,7 @@ static void PaintBoatHireStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto* stationObj = ride.GetStationObject(); + const auto* stationObj = ride.getStationObject(); TrackPaintUtilDrawStationTunnel(session, direction, height); TrackPaintUtilDrawPier( @@ -125,8 +125,7 @@ static void PaintBoatHireTrackLeftQuarterTurn1Tile( PaintUtilSetSegmentSupportHeight( session, - PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topLeftSide), direction), + PaintUtilRotateSegments(EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 16); } diff --git a/src/openrct2/paint/track/water/DinghySlide.cpp b/src/openrct2/paint/track/water/DinghySlide.cpp index b5bd6be5f7..f9734e8dce 100644 --- a/src/openrct2/paint/track/water/DinghySlide.cpp +++ b/src/openrct2/paint/track/water/DinghySlide.cpp @@ -37,6 +37,8 @@ enum SPR_DINGHY_SLIDE_FLAT_CHAIN_FRONT_SE_NW = 19731, SPR_DINGHY_SLIDE_STATION_SW_NE = 19732, SPR_DINGHY_SLIDE_STATION_NW_SE = 19733, + SPR_DINGHY_SLIDE_STATION_FRONT_SW_NE = 19734, + SPR_DINGHY_SLIDE_STATION_FRONT_NW_SE = 19735, SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_SW_NE = 19740, SPR_DINGHY_SLIDE_FLAT_TO_25_DEG_NW_SE = 19741, @@ -247,7 +249,7 @@ static void DinghySlideTrackFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -256,23 +258,32 @@ static void DinghySlideTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - static constexpr uint32_t imageIds[4][2] = { - { SPR_DINGHY_SLIDE_STATION_SW_NE, SPR_STATION_BASE_B_SW_NE }, - { SPR_DINGHY_SLIDE_STATION_NW_SE, SPR_STATION_BASE_B_NW_SE }, - { SPR_DINGHY_SLIDE_STATION_SW_NE, SPR_STATION_BASE_B_SW_NE }, - { SPR_DINGHY_SLIDE_STATION_NW_SE, SPR_STATION_BASE_B_NW_SE }, + static constexpr ImageIndex imageIds[4][2] = { + { SPR_DINGHY_SLIDE_STATION_SW_NE, SPR_DINGHY_SLIDE_STATION_FRONT_SW_NE }, + { SPR_DINGHY_SLIDE_STATION_NW_SE, SPR_DINGHY_SLIDE_STATION_FRONT_NW_SE }, + { SPR_DINGHY_SLIDE_STATION_SW_NE, SPR_DINGHY_SLIDE_STATION_FRONT_SW_NE }, + { SPR_DINGHY_SLIDE_STATION_NW_SE, SPR_DINGHY_SLIDE_STATION_FRONT_NW_SE }, }; PaintAddImageAsParentRotated( session, direction, session.TrackColours.WithIndex(imageIds[direction][0]), { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - PaintAddImageAsParentRotated( - session, direction, GetStationColourScheme(session, trackElement).WithIndex(imageIds[direction][1]), { 0, 0, height }, - { 32, 32, 1 }); - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - - TrackPaintUtilDrawStation(session, ride, direction, height, trackElement); + if (TrackPaintUtilDrawStation(session, ride, direction, height, trackElement, StationBaseType::b, 0)) + { + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); + } + else + { + PaintAddImageAsParentRotated( + session, direction, session.TrackColours.WithIndex(imageIds[direction][1]), { 0, 0, height }, + { { 0, 27, height }, { 32, 1, 26 } }); + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } + } TrackPaintUtilDrawStationTunnel(session, direction, height); @@ -323,7 +334,7 @@ static void DinghySlideTrack25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); } @@ -362,7 +373,7 @@ static void DinghySlideTrack60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); } @@ -410,7 +421,7 @@ static void DinghySlideTrackFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); } @@ -449,7 +460,7 @@ static void DinghySlideTrack25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); } @@ -488,7 +499,7 @@ static void DinghySlideTrack60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); } @@ -536,7 +547,7 @@ static void DinghySlideTrack25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); } @@ -675,9 +686,7 @@ static void DinghySlideTrackRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right), direction), 0xFFFF, 0); break; @@ -686,8 +695,8 @@ static void DinghySlideTrackRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -695,8 +704,7 @@ static void DinghySlideTrackRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre), direction), 0xFFFF, 0); break; @@ -705,8 +713,8 @@ static void DinghySlideTrackRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -714,9 +722,7 @@ static void DinghySlideTrackRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left), direction), 0xFFFF, 0); break; @@ -785,9 +791,7 @@ static void DinghySlideTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -801,8 +805,8 @@ static void DinghySlideTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -816,8 +820,8 @@ static void DinghySlideTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -829,9 +833,7 @@ static void DinghySlideTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -900,9 +902,7 @@ static void DinghySlideTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -916,8 +916,8 @@ static void DinghySlideTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -931,8 +931,8 @@ static void DinghySlideTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -944,9 +944,7 @@ static void DinghySlideTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -1036,15 +1034,15 @@ static void DinghySlideTrackRightQuarterTurn3( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::leftCorner); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); diff --git a/src/openrct2/paint/track/water/DinghySlideCovered.cpp b/src/openrct2/paint/track/water/DinghySlideCovered.cpp index e933d1fe3e..a6b250bb2b 100644 --- a/src/openrct2/paint/track/water/DinghySlideCovered.cpp +++ b/src/openrct2/paint/track/water/DinghySlideCovered.cpp @@ -202,7 +202,7 @@ static void DinghySlideTrackCoveredFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -241,7 +241,7 @@ static void DinghySlideTrackCovered25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 56); } @@ -280,7 +280,7 @@ static void DinghySlideTrackCovered60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 104); } @@ -319,7 +319,7 @@ static void DinghySlideTrackCoveredFlatTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 48); } @@ -358,7 +358,7 @@ static void DinghySlideTrackCovered25DegUpTo60DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); } @@ -397,7 +397,7 @@ static void DinghySlideTrackCovered60DegUpTo25DegUp( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 72); } @@ -436,7 +436,7 @@ static void DinghySlideTrackCovered25DegUpToFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 40); } @@ -576,9 +576,7 @@ static void DinghySlideTrackCoveredRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::rightCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right), direction), 0xFFFF, 0); break; @@ -587,8 +585,8 @@ static void DinghySlideTrackCoveredRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -596,8 +594,7 @@ static void DinghySlideTrackCoveredRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre), direction), 0xFFFF, 0); break; @@ -606,8 +603,8 @@ static void DinghySlideTrackCoveredRightQuarterTurn5( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -615,9 +612,7 @@ static void DinghySlideTrackCoveredRightQuarterTurn5( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left), direction), 0xFFFF, 0); break; @@ -680,9 +675,7 @@ static void DinghySlideTrackCoveredSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -696,8 +689,8 @@ static void DinghySlideTrackCoveredSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -711,8 +704,8 @@ static void DinghySlideTrackCoveredSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -724,9 +717,7 @@ static void DinghySlideTrackCoveredSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -795,9 +786,7 @@ static void DinghySlideTrackCoveredSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -811,8 +800,8 @@ static void DinghySlideTrackCoveredSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -826,8 +815,8 @@ static void DinghySlideTrackCoveredSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -839,9 +828,7 @@ static void DinghySlideTrackCoveredSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -931,15 +918,15 @@ static void DinghySlideTrackCoveredRightQuarterTurn3( { case 0: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::rightCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::right); break; case 2: blockedSegments = EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, PaintSegment::bottomCorner); + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom); break; case 3: blockedSegments = EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::leftCorner); + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::left); break; } PaintUtilSetSegmentSupportHeight(session, PaintUtilRotateSegments(blockedSegments, direction), 0xFFFF, 0); diff --git a/src/openrct2/paint/track/water/LogFlume.cpp b/src/openrct2/paint/track/water/LogFlume.cpp index d02387d999..29309a0a1d 100644 --- a/src/openrct2/paint/track/water/LogFlume.cpp +++ b/src/openrct2/paint/track/water/LogFlume.cpp @@ -192,23 +192,24 @@ static void PaintLogFlumeTrackStation( PaintSession& session, const Ride& ride, [[maybe_unused]] uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - auto imageId = session.TrackColours.WithIndex(kLogFlumeTrackFlatImageIds[direction][0]); + const ImageId imageId = session.TrackColours.WithIndex(kLogFlumeTrackFlatImageIds[direction][0]); PaintAddImageAsParentRotated(session, direction, imageId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - if (direction & 1) + if (TrackPaintUtilDrawStation2(session, ride, direction, height, trackElement, StationBaseType::b, 0, 7, 9)) { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_NW_SE); + DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); } else { - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_SW_NE); + const ImageId frontImageId = session.TrackColours.WithIndex(kLogFlumeTrackFlatImageIds[direction][1]); + PaintAddImageAsParentRotated(session, direction, frontImageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); + + if (TrackPaintUtilShouldPaintSupports(session.MapPosition)) + { + MetalASupportsPaintSetupRotated( + session, supportType.metal, MetalSupportPlace::Centre, direction, 0, height, session.SupportColours); + } } - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); - - DrawSupportsSideBySide(session, direction, height, session.SupportColours, supportType.metal); - - TrackPaintUtilDrawStation3(session, ride, direction, height + 2, height, trackElement); - // Covers shouldn't be offset by +2 TrackPaintUtilDrawStationTunnel(session, direction, height); @@ -465,9 +466,7 @@ static void PaintLogFlumeTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -481,8 +480,8 @@ static void PaintLogFlumeTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -496,8 +495,8 @@ static void PaintLogFlumeTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -509,9 +508,7 @@ static void PaintLogFlumeTrackSBendLeft( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -580,9 +577,7 @@ static void PaintLogFlumeTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -596,8 +591,8 @@ static void PaintLogFlumeTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -611,8 +606,8 @@ static void PaintLogFlumeTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -624,9 +619,7 @@ static void PaintLogFlumeTrackSBendRight( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -715,9 +708,7 @@ static void PaintLogFlumeTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -725,9 +716,7 @@ static void PaintLogFlumeTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -735,9 +724,7 @@ static void PaintLogFlumeTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -811,9 +798,7 @@ static void PaintLogFlumeTrackRightQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + EnumsToFlags(PaintSegment::right, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -822,8 +807,7 @@ static void PaintLogFlumeTrackRightQuarterTurn3Tiles( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -831,9 +815,7 @@ static void PaintLogFlumeTrackRightQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::bottomRightSide), + EnumsToFlags(PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; diff --git a/src/openrct2/paint/track/water/RiverRapids.cpp b/src/openrct2/paint/track/water/RiverRapids.cpp index 8c160ccc0e..baefb8dc47 100644 --- a/src/openrct2/paint/track/water/RiverRapids.cpp +++ b/src/openrct2/paint/track/water/RiverRapids.cpp @@ -14,7 +14,6 @@ #include "../../../ride/Track.h" #include "../../../ride/TrackPaint.h" #include "../../../ride/Vehicle.h" -#include "../../../scenario/Scenario.h" #include "../../../world/Map.h" #include "../../Paint.h" #include "../../support/WoodenSupports.h" @@ -219,7 +218,7 @@ static void PaintRiverRapidsStation( const TrackElement& trackElement, SupportType supportType) { PaintRiverRapidsTrackFlat(session, ride, trackSequence, direction, height, trackElement, supportType); - TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 12, trackElement); + TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 12, trackElement, StationBaseType::none, 0); PaintUtilSetGeneralSupportHeight(session, height + kDefaultGeneralSupportHeight); } @@ -527,7 +526,7 @@ static void PaintRiverRapidsTrackWaterfall( { ImageId imageId; - uint16_t frameNum = (GetGameState().CurrentTicks / 2) & 7; + uint16_t frameNum = (getGameState().currentTicks / 2) & 7; if (direction & 1) { @@ -598,7 +597,7 @@ static void PaintRiverRapidsTrackRapids( { ImageId imageId; - uint16_t frameNum = (GetGameState().CurrentTicks / 2) & 7; + uint16_t frameNum = (getGameState().currentTicks / 2) & 7; if (direction & 1) { @@ -650,7 +649,7 @@ static void PaintRiverRapidsTrackWhirlpool( { ImageId imageId; - uint8_t frameNum = (GetGameState().CurrentTicks / 4) % 16; + uint8_t frameNum = (getGameState().currentTicks / 4) % 16; if (direction & 1) { diff --git a/src/openrct2/paint/track/water/SplashBoats.cpp b/src/openrct2/paint/track/water/SplashBoats.cpp index e2ce17a8ec..0df83e5953 100644 --- a/src/openrct2/paint/track/water/SplashBoats.cpp +++ b/src/openrct2/paint/track/water/SplashBoats.cpp @@ -229,6 +229,13 @@ enum SPR_SPLASH_BOATS_S_BEND_TOP_NW_NE_NW_SEQ_0 = 20995, }; +static constexpr ImageIndex kSplashBoatsFlatImageIndexes[kNumOrthogonalDirections][2] = { + { SPR_SPLASH_BOATS_FLAT_TOP_SW_NE, SPR_SPLASH_BOATS_FLAT_SIDE_SW_NE }, + { SPR_SPLASH_BOATS_FLAT_TOP_NW_SE, SPR_SPLASH_BOATS_FLAT_SIDE_NW_SE }, + { SPR_SPLASH_BOATS_FLAT_TOP_NE_SW, SPR_SPLASH_BOATS_FLAT_SIDE_NE_SW }, + { SPR_SPLASH_BOATS_FLAT_TOP_SE_NW, SPR_SPLASH_BOATS_FLAT_SIDE_SE_NW }, +}; + static constexpr uint32_t kSplashBoats25DegUpImageId[4] = { SPR_SPLASH_BOATS_25_DEG_UP_SW_NE, SPR_SPLASH_BOATS_25_DEG_UP_NW_SE, @@ -734,28 +741,10 @@ static void PaintSplashBoatsTrackFlat( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - ImageId imageId; - - if (direction & 1) - { - imageId = session.TrackColours.WithIndex( - (direction == 1 ? SPR_SPLASH_BOATS_FLAT_TOP_NW_SE : SPR_SPLASH_BOATS_FLAT_TOP_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height }, { 20, 32, 2 } }); - - imageId = session.TrackColours.WithIndex( - (direction == 1 ? SPR_SPLASH_BOATS_FLAT_SIDE_NW_SE : SPR_SPLASH_BOATS_FLAT_SIDE_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 27, 0, height }, { 1, 32, 26 } }); - } - else - { - imageId = session.TrackColours.WithIndex( - (direction == 0 ? SPR_SPLASH_BOATS_FLAT_TOP_SW_NE : SPR_SPLASH_BOATS_FLAT_TOP_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height }, { 32, 20, 2 } }); - - imageId = session.TrackColours.WithIndex( - (direction == 0 ? SPR_SPLASH_BOATS_FLAT_SIDE_SW_NE : SPR_SPLASH_BOATS_FLAT_SIDE_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); - } + const ImageId trackId = session.TrackColours.WithIndex(kSplashBoatsFlatImageIndexes[direction][0]); + PaintAddImageAsParentRotated(session, direction, trackId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); + const ImageId frontId = session.TrackColours.WithIndex(kSplashBoatsFlatImageIndexes[direction][1]); + PaintAddImageAsParentRotated(session, direction, frontId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); @@ -778,29 +767,17 @@ static void PaintSplashBoatsStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - if (direction & 1) - { - auto imageId = session.TrackColours.WithIndex( - (direction == 1 ? SPR_SPLASH_BOATS_FLAT_TOP_NW_SE : SPR_SPLASH_BOATS_FLAT_TOP_SE_NW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 6, 0, height + 3 }, { 20, 32, 1 } }); - - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_NW_SE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); - } - else - { - auto imageId = session.TrackColours.WithIndex( - (direction == 0 ? SPR_SPLASH_BOATS_FLAT_TOP_SW_NE : SPR_SPLASH_BOATS_FLAT_TOP_NE_SW)); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); - - imageId = GetStationColourScheme(session, trackElement).WithIndex(SPR_STATION_BASE_B_SW_NE); - PaintAddImageAsParent(session, imageId, { 0, 0, height }, { 32, 32, 1 }); - } + const ImageId trackId = session.TrackColours.WithIndex(kSplashBoatsFlatImageIndexes[direction][0]); + PaintAddImageAsParentRotated(session, direction, trackId, { 0, 0, height }, { { 0, 6, height + 3 }, { 32, 20, 1 } }); DrawSupportForSequenceA( session, supportType.wooden, trackSequence, direction, height, session.SupportColours); - TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 7, trackElement); + if (!TrackPaintUtilDrawNarrowStationPlatform(session, ride, direction, height, 7, trackElement, StationBaseType::b, 0)) + { + const ImageId frontId = session.TrackColours.WithIndex(kSplashBoatsFlatImageIndexes[direction][1]); + PaintAddImageAsParentRotated(session, direction, frontId, { 0, 0, height }, { { 0, 27, height }, { 32, 1, 26 } }); + } TrackPaintUtilDrawStationTunnel(session, direction, height); @@ -830,8 +807,7 @@ static void PaintSplashBoatsTrackLeftQuarterTurn5Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; case 2: @@ -839,8 +815,8 @@ static void PaintSplashBoatsTrackLeftQuarterTurn5Tiles( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::topRightSide, PaintSegment::topCorner, - PaintSegment::leftCorner, PaintSegment::bottomLeftSide), + PaintSegment::topLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::top, + PaintSegment::left, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -849,9 +825,8 @@ static void PaintSplashBoatsTrackLeftQuarterTurn5Tiles( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topRightSide, PaintSegment::bottomRightSide, PaintSegment::rightCorner, - PaintSegment::centre, PaintSegment::topCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide, - PaintSegment::bottomLeftSide), + PaintSegment::topRight, PaintSegment::bottomRight, PaintSegment::right, PaintSegment::centre, + PaintSegment::top, PaintSegment::bottom, PaintSegment::topLeft, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -859,8 +834,7 @@ static void PaintSplashBoatsTrackLeftQuarterTurn5Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::rightCorner, PaintSegment::topRightSide, PaintSegment::bottomRightSide), - direction), + EnumsToFlags(PaintSegment::right, PaintSegment::topRight, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; case 5: @@ -868,8 +842,8 @@ static void PaintSplashBoatsTrackLeftQuarterTurn5Tiles( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomCorner, PaintSegment::leftCorner), + PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottomLeft, + PaintSegment::bottom, PaintSegment::left), direction), 0xFFFF, 0); break; @@ -919,7 +893,7 @@ static void PaintSplashBoatsTrackRightQuarterTurn5Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; case 2: @@ -927,8 +901,8 @@ static void PaintSplashBoatsTrackRightQuarterTurn5Tiles( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::topRightSide), + PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::right, + PaintSegment::bottom, PaintSegment::topRight), direction), 0xFFFF, 0); break; @@ -937,9 +911,8 @@ static void PaintSplashBoatsTrackRightQuarterTurn5Tiles( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide, PaintSegment::centre, - PaintSegment::leftCorner, PaintSegment::rightCorner, PaintSegment::bottomLeftSide, - PaintSegment::bottomRightSide), + PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight, PaintSegment::centre, + PaintSegment::left, PaintSegment::right, PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -947,7 +920,7 @@ static void PaintSplashBoatsTrackRightQuarterTurn5Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::topCorner, PaintSegment::topLeftSide, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::top, PaintSegment::topLeft, PaintSegment::topRight), direction), 0xFFFF, 0); break; case 5: @@ -955,8 +928,8 @@ static void PaintSplashBoatsTrackRightQuarterTurn5Tiles( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::bottomRightSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner, PaintSegment::bottomCorner, PaintSegment::topLeftSide), + PaintSegment::bottomRight, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left, + PaintSegment::bottom, PaintSegment::topLeft), direction), 0xFFFF, 0); break; @@ -1043,8 +1016,8 @@ static void PaintSplashBoatsTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; @@ -1061,8 +1034,8 @@ static void PaintSplashBoatsTrackSBendLeft( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1153,8 +1126,8 @@ static void PaintSplashBoatsTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, + PaintSegment::bottomLeft, PaintSegment::bottomRight), direction), 0xFFFF, 0); break; @@ -1171,8 +1144,8 @@ static void PaintSplashBoatsTrackSBendRight( session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, + PaintSegment::topRight, PaintSegment::bottomLeft), direction), 0xFFFF, 0); break; diff --git a/src/openrct2/paint/track/water/SubmarineRide.cpp b/src/openrct2/paint/track/water/SubmarineRide.cpp index 54472f815b..8c9ad8c1fe 100644 --- a/src/openrct2/paint/track/water/SubmarineRide.cpp +++ b/src/openrct2/paint/track/water/SubmarineRide.cpp @@ -28,7 +28,7 @@ static void SubmarineRidePaintTrackStation( PaintSession& session, const Ride& ride, uint8_t trackSequence, uint8_t direction, int32_t height, const TrackElement& trackElement, SupportType supportType) { - const auto* stationObj = ride.GetStationObject(); + const auto* stationObj = ride.getStationObject(); int32_t heightLower = height - 16; ImageId imageId; @@ -79,7 +79,7 @@ static void SubmarineRidePaintTrackFlat( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags(PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide), direction), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 16); } @@ -102,9 +102,7 @@ static void SubmarineRidePaintTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::bottomLeftSide, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::topCorner), + EnumsToFlags(PaintSegment::bottomLeft, PaintSegment::centre, PaintSegment::topRight, PaintSegment::top), direction), 0xFFFF, 0); break; @@ -112,9 +110,7 @@ static void SubmarineRidePaintTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomLeftSide, - PaintSegment::leftCorner), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::left), direction), 0xFFFF, 0); break; @@ -124,9 +120,7 @@ static void SubmarineRidePaintTrackLeftQuarterTurn3Tiles( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomRightSide, - PaintSegment::bottomCorner), + EnumsToFlags(PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomRight, PaintSegment::bottom), direction), 0xFFFF, 0); break; @@ -162,9 +156,7 @@ static void SubmarineRidePaintTrackLeftQuarterTurn1Tile( PaintUtilSetSegmentSupportHeight( session, PaintUtilRotateSegments( - EnumsToFlags( - PaintSegment::leftCorner, PaintSegment::topLeftSide, PaintSegment::centre, PaintSegment::bottomLeftSide), - direction), + EnumsToFlags(PaintSegment::left, PaintSegment::topLeft, PaintSegment::centre, PaintSegment::bottomLeft), direction), 0xFFFF, 0); PaintUtilSetGeneralSupportHeight(session, height + 16); } diff --git a/src/openrct2/paint/vehicle/Vehicle.MiniGolf.cpp b/src/openrct2/paint/vehicle/Vehicle.MiniGolf.cpp index ed9cf89727..6a2388f624 100644 --- a/src/openrct2/paint/vehicle/Vehicle.MiniGolf.cpp +++ b/src/openrct2/paint/vehicle/Vehicle.MiniGolf.cpp @@ -113,7 +113,7 @@ namespace OpenRCT2 if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; @@ -149,7 +149,7 @@ namespace OpenRCT2 if (ride == nullptr) return; - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr) return; diff --git a/src/openrct2/paint/vehicle/VehiclePaint.cpp b/src/openrct2/paint/vehicle/VehiclePaint.cpp index 67ceb5127b..fbab6a8c50 100644 --- a/src/openrct2/paint/vehicle/VehiclePaint.cpp +++ b/src/openrct2/paint/vehicle/VehiclePaint.cpp @@ -4155,7 +4155,7 @@ static void vehicle_visual_splash1_effect(PaintSession& session, int32_t z, cons return; } int32_t image_id = SPR_SPLASH_EFFECT_1_NE_0 + ((((vehicle->Orientation / 8) + session.CurrentRotation) & 3) * 8) - + ((GetGameState().CurrentTicks / 2) & 7); + + ((getGameState().currentTicks / 2) & 7); PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 0, 0, 0 } }); } @@ -4178,7 +4178,7 @@ static void vehicle_visual_splash2_effect(PaintSession& session, int32_t z, cons return; } int32_t image_id = SPR_SPLASH_EFFECT_3_NE_0 + ((((vehicle->Orientation / 8) + session.CurrentRotation) & 3) * 8) - + ((GetGameState().CurrentTicks / 2) & 7); + + ((getGameState().currentTicks / 2) & 7); PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 0, 0, 0 } }); } @@ -4201,7 +4201,7 @@ static void vehicle_visual_splash3_effect(PaintSession& session, int32_t z, cons return; } int32_t image_id = SPR_SPLASH_EFFECT_1_NE_0 + ((((vehicle->Orientation / 8) + session.CurrentRotation) & 3) * 8) - + ((GetGameState().CurrentTicks / 2) & 7); + + ((getGameState().currentTicks / 2) & 7); PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 0, 0, 0 } }); } @@ -4229,7 +4229,7 @@ static void vehicle_visual_splash4_effect(PaintSession& session, int32_t z, cons return; } int32_t image_id = SPR_SPLASH_EFFECT_5_NE_0 + ((((vehicle->Orientation / 8) + session.CurrentRotation) & 3) * 8) - + ((GetGameState().CurrentTicks / 2) & 7); + + ((getGameState().currentTicks / 2) & 7); PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 1, 1, 0 } }); } @@ -4261,7 +4261,7 @@ static void vehicle_visual_splash5_effect(PaintSession& session, int32_t z, cons return; } int32_t image_id = SPR_SPLASH_EFFECT_5_NE_0 + ((((vehicle->Orientation / 8) + session.CurrentRotation) & 3) * 8) - + ((GetGameState().CurrentTicks / 2) & 7); + + ((getGameState().currentTicks / 2) & 7); PaintAddImageAsChild(session, ImageId(image_id), { 0, 0, z }, { { 0, 0, z }, { 1, 1, 0 } }); } diff --git a/src/openrct2/park/Legacy.cpp b/src/openrct2/park/Legacy.cpp index 938eee64e3..64e3c1ddf6 100644 --- a/src/openrct2/park/Legacy.cpp +++ b/src/openrct2/park/Legacy.cpp @@ -18,6 +18,7 @@ #include "../object/ObjectList.h" #include "../object/ObjectManager.h" #include "../object/PeepAnimationsObject.h" +#include "../rct12/RCT12.h" #include "../rct2/RCT2.h" #include "../ride/Ride.h" #include "../ride/Track.h" @@ -2377,6 +2378,18 @@ void ConvertPeepAnimationTypeToObjects(OpenRCT2::GameState_t& gameState) LOG_INFO("Converted %d peep entities", numConverted); } +static constexpr std::array kClimateObjectIdsByLegacyClimateType = { + "rct2.climate.cool_and_wet", + "rct2.climate.warm", + "rct2.climate.hot_and_dry", + "rct2.climate.cold", +}; + +std::string_view GetClimateObjectIdFromLegacyClimateType(OpenRCT2::RCT12::ClimateType climate) +{ + return kClimateObjectIdsByLegacyClimateType[EnumValue(climate)]; +} + bool TrackTypeMustBeMadeInvisible(ride_type_t rideType, OpenRCT2::TrackElemType trackType, int32_t parkFileVersion) { // Lots of Log Flumes exist where the downward slopes are simulated by using other track diff --git a/src/openrct2/park/Legacy.h b/src/openrct2/park/Legacy.h index ba946017c7..f09e2696e1 100644 --- a/src/openrct2/park/Legacy.h +++ b/src/openrct2/park/Legacy.h @@ -22,6 +22,11 @@ namespace OpenRCT2 enum class TrackElemType : uint16_t; + namespace RCT12 + { + enum class ClimateType : uint8_t; + } + namespace RCT2 { struct FootpathMapping; @@ -43,6 +48,8 @@ void UpdateFootpathsFromMapping( const std::vector& GetLegacyPeepAnimationObjects(); void ConvertPeepAnimationTypeToObjects(OpenRCT2::GameState_t& gameState); +std::string_view GetClimateObjectIdFromLegacyClimateType(OpenRCT2::RCT12::ClimateType); + /** * If new pieces get added to existing ride types, this could cause existing parks to change appearance, * since the formerly unrendered pieces were not explicitly set invisible. diff --git a/src/openrct2/park/ParkFile.cpp b/src/openrct2/park/ParkFile.cpp index 536dca72a8..4dcfb41c64 100644 --- a/src/openrct2/park/ParkFile.cpp +++ b/src/openrct2/park/ParkFile.cpp @@ -47,7 +47,6 @@ #include "../ride/RideManager.hpp" #include "../ride/ShopItem.h" #include "../ride/Vehicle.h" -#include "../scenario/Scenario.h" #include "../scenario/ScenarioRepository.h" #include "../scripting/ScriptEngine.h" #include "../ui/WindowManager.h" @@ -60,6 +59,7 @@ #include "../world/tile_element/SmallSceneryElement.h" #include "../world/tile_element/TrackElement.h" #include "Legacy.h" +#include "ParkPreview.h" #include #include @@ -95,6 +95,7 @@ namespace OpenRCT2 constexpr uint32_t CHEATS = 0x36; constexpr uint32_t RESTRICTED_OBJECTS = 0x37; constexpr uint32_t PLUGIN_STORAGE = 0x38; + constexpr uint32_t PREVIEW = 0x39; constexpr uint32_t PACKED_OBJECTS = 0x80; // clang-format on }; // namespace ParkFileChunkType @@ -130,20 +131,23 @@ namespace OpenRCT2 return targetVersion > kParkFileCurrentVersion; } - void Load(const std::string_view path) + void Load(const std::string_view path, const bool skipObjectCheck) { - FileStream fs(path, FILE_MODE_OPEN); - Load(fs); + FileStream fs(path, FileMode::open); + Load(fs, skipObjectCheck); } - void Load(IStream& stream) + void Load(IStream& stream, const bool skipObjectCheck) { _os = std::make_unique(stream, OrcaStream::Mode::READING); ThrowIfIncompatibleVersion(); RequiredObjects = {}; - ReadWriteObjectsChunk(*_os); - ReadWritePackedObjectsChunk(*_os); + if (!skipObjectCheck) + { + ReadWriteObjectsChunk(*_os); + ReadWritePackedObjectsChunk(*_os); + } } void Import(GameState_t& gameState) @@ -169,7 +173,7 @@ namespace OpenRCT2 } // Initial cash will eventually be removed - gameState.InitialCash = gameState.Cash; + gameState.initialCash = gameState.cash; } void Save(GameState_t& gameState, IStream& stream) @@ -197,12 +201,13 @@ namespace OpenRCT2 ReadWriteCheatsChunk(gameState, os); ReadWriteRestrictedObjectsChunk(gameState, os); ReadWritePluginStorageChunk(gameState, os); + ReadWritePreviewChunk(gameState, os); ReadWritePackedObjectsChunk(os); } void Save(GameState_t& gameState, const std::string_view path) { - FileStream fs(path, FILE_MODE_WRITE); + FileStream fs(path, FileMode::write); Save(gameState, fs); } @@ -211,7 +216,7 @@ namespace OpenRCT2 ScenarioIndexEntry entry{}; auto& os = *_os; os.ReadWriteChunk(ParkFileChunkType::SCENARIO, [&entry](OrcaStream::ChunkStream& cs) { - entry.Category = cs.Read(); + entry.Category = cs.Read(); std::string name; ReadWriteStringTable(cs, name, "en-GB"); @@ -225,9 +230,10 @@ namespace OpenRCT2 ReadWriteStringTable(cs, scenarioDetails, "en-GB"); entry.Details = scenarioDetails; + // wrong order is intentional here due to ReadWriteScenarioChunk writing guests first entry.ObjectiveType = cs.Read(); entry.ObjectiveArg1 = cs.Read(); - entry.ObjectiveArg3 = cs.Read(); + entry.ObjectiveArg3 = cs.Read(); entry.ObjectiveArg2 = cs.Read(); entry.SourceGame = ScenarioSource::Other; @@ -235,6 +241,34 @@ namespace OpenRCT2 return entry; } + ParkPreview ReadPreviewChunk() + { + ParkPreview preview{}; + auto& os = *_os; + os.ReadWriteChunk(ParkFileChunkType::PREVIEW, [&preview](OrcaStream::ChunkStream& cs) { + cs.ReadWrite(preview.parkName); + cs.ReadWrite(preview.parkRating); + cs.ReadWrite(preview.year); + cs.ReadWrite(preview.month); + cs.ReadWrite(preview.day); + cs.ReadWrite(preview.parkUsesMoney); + cs.ReadWrite(preview.cash); + cs.ReadWrite(preview.numRides); + cs.ReadWrite(preview.numGuests); + + cs.ReadWriteVector(preview.images, [&cs](PreviewImage& image) { + cs.ReadWrite(image.type); + cs.ReadWrite(image.width); + cs.ReadWrite(image.height); + cs.ReadWriteArray(image.pixels, [&cs](uint8_t& pixel) { + cs.ReadWrite(pixel); + return true; + }); + }); + }); + return preview; + } + private: static uint8_t GetMinCarsPerTrain(uint8_t value) { @@ -389,6 +423,17 @@ namespace OpenRCT2 AppendRequiredObjects(requiredObjects, ObjectType::peepAnimations, animObjects); } + if (version < kClimateObjectsVersion) + { + RCT12::ClimateType legacyClimate{}; + os.ReadWriteChunk(ParkFileChunkType::CLIMATE, [&legacyClimate](OrcaStream::ChunkStream& cs) { + cs.ReadWrite(legacyClimate); + }); + + auto climateObjId = GetClimateObjectIdFromLegacyClimateType(legacyClimate); + AppendRequiredObjects(requiredObjects, ObjectType::climate, std::vector({ climateObjId })); + } + RequiredObjects = std::move(requiredObjects); } else @@ -434,27 +479,27 @@ namespace OpenRCT2 void ReadWriteScenarioChunk(GameState_t& gameState, OrcaStream& os) { os.ReadWriteChunk(ParkFileChunkType::SCENARIO, [&gameState, &os](OrcaStream::ChunkStream& cs) { - cs.ReadWrite(gameState.ScenarioCategory); - ReadWriteStringTable(cs, gameState.ScenarioName, "en-GB"); - ReadWriteStringTable(cs, gameState.Park.Name, "en-GB"); - ReadWriteStringTable(cs, gameState.ScenarioDetails, "en-GB"); + cs.ReadWrite(gameState.scenarioCategory); + ReadWriteStringTable(cs, gameState.scenarioName, "en-GB"); + ReadWriteStringTable(cs, gameState.park.Name, "en-GB"); + ReadWriteStringTable(cs, gameState.scenarioDetails, "en-GB"); - cs.ReadWrite(gameState.ScenarioObjective.Type); - cs.ReadWrite(gameState.ScenarioObjective.Year); - cs.ReadWrite(gameState.ScenarioObjective.NumGuests); - cs.ReadWrite(gameState.ScenarioObjective.Currency); + cs.ReadWrite(gameState.scenarioObjective.Type); + cs.ReadWrite(gameState.scenarioObjective.Year); + cs.ReadWrite(gameState.scenarioObjective.NumGuests); + cs.ReadWrite(gameState.scenarioObjective.Currency); - cs.ReadWrite(gameState.ScenarioParkRatingWarningDays); + cs.ReadWrite(gameState.scenarioParkRatingWarningDays); - cs.ReadWrite(gameState.ScenarioCompletedCompanyValue); - if (gameState.ScenarioCompletedCompanyValue == kMoney64Undefined - || gameState.ScenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) + cs.ReadWrite(gameState.scenarioCompletedCompanyValue); + if (gameState.scenarioCompletedCompanyValue == kMoney64Undefined + || gameState.scenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) { cs.Write(""); } else { - cs.ReadWrite(gameState.ScenarioCompletedBy); + cs.ReadWrite(gameState.scenarioCompletedBy); } if (cs.GetMode() == OrcaStream::Mode::READING) @@ -472,11 +517,38 @@ namespace OpenRCT2 if (os.GetHeader().TargetVersion >= 1) { - cs.ReadWrite(gameState.ScenarioFileName); + cs.ReadWrite(gameState.scenarioFileName); } }); } + void ReadWritePreviewChunk(GameState_t& gameState, OrcaStream& os) + { + os.ReadWriteChunk(ParkFileChunkType::PREVIEW, [&gameState](OrcaStream::ChunkStream& cs) { + auto preview = OpenRCT2::generatePreviewFromGameState(gameState); + + cs.ReadWrite(preview.parkName); + cs.ReadWrite(preview.parkRating); + cs.ReadWrite(preview.year); + cs.ReadWrite(preview.month); + cs.ReadWrite(preview.day); + cs.ReadWrite(preview.parkUsesMoney); + cs.ReadWrite(preview.cash); + cs.ReadWrite(preview.numRides); + cs.ReadWrite(preview.numGuests); + + cs.ReadWriteVector(preview.images, [&cs](PreviewImage& image) { + cs.ReadWrite(image.type); + cs.ReadWrite(image.width); + cs.ReadWrite(image.height); + cs.ReadWriteArray(image.pixels, [&cs](uint8_t& pixel) { + cs.ReadWrite(pixel); + return true; + }); + }); + }); + } + void ReadWriteGeneralChunk(GameState_t& gameState, OrcaStream& os) { const auto version = os.GetHeader().TargetVersion; @@ -493,14 +565,14 @@ namespace OpenRCT2 const uint8_t isPaused = (gGamePaused & GAME_PAUSED_NORMAL); cs.Write(isPaused); } - cs.ReadWrite(gameState.CurrentTicks); + cs.ReadWrite(gameState.currentTicks); if (cs.GetMode() == OrcaStream::Mode::READING) { uint16_t monthTicks; uint32_t monthsElapsed; cs.ReadWrite(monthTicks); cs.ReadWrite(monthsElapsed); - gameState.Date = Date{ monthsElapsed, monthTicks }; + gameState.date = Date{ monthsElapsed, monthTicks }; } else { @@ -515,31 +587,31 @@ namespace OpenRCT2 cs.ReadWrite(s0); cs.ReadWrite(s1); Random::RCT2::Seed s{ s0, s1 }; - gameState.ScenarioRand.seed(s); + gameState.scenarioRand.seed(s); } else { - auto randState = gameState.ScenarioRand.state(); + auto randState = gameState.scenarioRand.state(); cs.Write(randState.s0); cs.Write(randState.s1); } - cs.ReadWrite(gameState.GuestInitialHappiness); + cs.ReadWrite(gameState.guestInitialHappiness); if (version <= 18) { money16 tempGuestInitialCash{}; cs.ReadWrite(tempGuestInitialCash); - gameState.GuestInitialCash = ToMoney64(tempGuestInitialCash); + gameState.guestInitialCash = ToMoney64(tempGuestInitialCash); } else { - cs.ReadWrite(gameState.GuestInitialCash); + cs.ReadWrite(gameState.guestInitialCash); } - cs.ReadWrite(gameState.GuestInitialHunger); - cs.ReadWrite(gameState.GuestInitialThirst); + cs.ReadWrite(gameState.guestInitialHunger); + cs.ReadWrite(gameState.guestInitialThirst); - cs.ReadWrite(gameState.NextGuestNumber); - cs.ReadWriteVector(gameState.PeepSpawns, [&cs](PeepSpawn& spawn) { + cs.ReadWrite(gameState.nextGuestNumber); + cs.ReadWriteVector(gameState.peepSpawns, [&cs](PeepSpawn& spawn) { cs.ReadWrite(spawn.x); cs.ReadWrite(spawn.y); cs.ReadWrite(spawn.z); @@ -552,18 +624,18 @@ namespace OpenRCT2 money16 tempConstructionRightPrice{}; cs.ReadWrite(tempLandPrice); cs.ReadWrite(tempConstructionRightPrice); - gameState.LandPrice = ToMoney64(tempLandPrice); - gameState.ConstructionRightsPrice = ToMoney64(tempConstructionRightPrice); + gameState.landPrice = ToMoney64(tempLandPrice); + gameState.constructionRightsPrice = ToMoney64(tempConstructionRightPrice); } else { - cs.ReadWrite(gameState.LandPrice); - cs.ReadWrite(gameState.ConstructionRightsPrice); + cs.ReadWrite(gameState.landPrice); + cs.ReadWrite(gameState.constructionRightsPrice); } - cs.ReadWrite(gameState.GrassSceneryTileLoopPosition); - cs.ReadWrite(gameState.WidePathTileLoopPosition); + cs.ReadWrite(gameState.grassSceneryTileLoopPosition); + cs.ReadWrite(gameState.widePathTileLoopPosition); - auto& rideRatings = gameState.RideRatingUpdateStates; + auto& rideRatings = gameState.rideRatingUpdateStates; if (os.GetHeader().TargetVersion >= 21) { cs.ReadWriteArray(rideRatings, [this, &cs](RideRatingUpdateState& calcData) { @@ -616,20 +688,20 @@ namespace OpenRCT2 void ReadWriteInterfaceChunk(GameState_t& gameState, OrcaStream& os) { os.ReadWriteChunk(ParkFileChunkType::INTERFACE, [&gameState](OrcaStream::ChunkStream& cs) { - cs.ReadWrite(gameState.SavedView.x); - cs.ReadWrite(gameState.SavedView.y); + cs.ReadWrite(gameState.savedView.x); + cs.ReadWrite(gameState.savedView.y); if (cs.GetMode() == OrcaStream::Mode::READING) { auto savedZoomlevel = static_cast(cs.Read()); - gameState.SavedViewZoom = std::clamp(savedZoomlevel, ZoomLevel::min(), ZoomLevel::max()); + gameState.savedViewZoom = std::clamp(savedZoomlevel, ZoomLevel::min(), ZoomLevel::max()); } else { - cs.Write(static_cast(gameState.SavedViewZoom)); + cs.Write(static_cast(gameState.savedViewZoom)); } - cs.ReadWrite(gameState.SavedViewRotation); - cs.ReadWrite(gameState.LastEntranceStyle); - cs.ReadWrite(gameState.EditorStep); + cs.ReadWrite(gameState.savedViewRotation); + cs.ReadWrite(gameState.lastEntranceStyle); + cs.ReadWrite(gameState.editorStep); }); } @@ -670,9 +742,9 @@ namespace OpenRCT2 #ifdef ENABLE_SCRIPTING // Dump the plugin storage to JSON (stored in park) auto& scriptEngine = GetContext()->GetScriptEngine(); - gameState.PluginStorage = scriptEngine.GetParkStorageAsJSON(); + gameState.pluginStorage = scriptEngine.GetParkStorageAsJSON(); #endif - if (gameState.PluginStorage.empty() || gameState.PluginStorage == "{}") + if (gameState.pluginStorage.empty() || gameState.pluginStorage == "{}") { // Don't write the chunk if there is no plugin storage return; @@ -680,14 +752,14 @@ namespace OpenRCT2 } os.ReadWriteChunk(ParkFileChunkType::PLUGIN_STORAGE, [&gameState](OrcaStream::ChunkStream& cs) { - cs.ReadWrite(gameState.PluginStorage); + cs.ReadWrite(gameState.pluginStorage); }); if (os.GetMode() == OrcaStream::Mode::READING) { #ifdef ENABLE_SCRIPTING auto& scriptEngine = GetContext()->GetScriptEngine(); - scriptEngine.SetParkStorageFromJSON(gameState.PluginStorage); + scriptEngine.SetParkStorageFromJSON(gameState.pluginStorage); #endif } } @@ -790,11 +862,17 @@ namespace OpenRCT2 void ReadWriteClimateChunk(GameState_t& gameState, OrcaStream& os) { - os.ReadWriteChunk(ParkFileChunkType::CLIMATE, [&gameState](OrcaStream::ChunkStream& cs) { - cs.ReadWrite(gameState.Climate); - cs.ReadWrite(gameState.WeatherUpdateTimer); + os.ReadWriteChunk(ParkFileChunkType::CLIMATE, [&os, &gameState](OrcaStream::ChunkStream& cs) { + auto version = os.GetHeader().TargetVersion; + if (version < kClimateObjectsVersion) + { + // Legacy climate is converted elsewhere, so we can skip it here. + cs.Ignore(); + } - for (auto* cl : { &gameState.WeatherCurrent, &gameState.WeatherNext }) + cs.ReadWrite(gameState.weatherUpdateTimer); + + for (auto* cl : { &gameState.weatherCurrent, &gameState.weatherNext }) { cs.ReadWrite(cl->weatherType); cs.ReadWrite(cl->temperature); @@ -809,27 +887,27 @@ namespace OpenRCT2 { os.ReadWriteChunk( ParkFileChunkType::PARK, [version = os.GetHeader().TargetVersion, &gameState](OrcaStream::ChunkStream& cs) { - cs.ReadWrite(gameState.Park.Name); - cs.ReadWrite(gameState.Cash); - cs.ReadWrite(gameState.BankLoan); - cs.ReadWrite(gameState.MaxBankLoan); - cs.ReadWrite(gameState.BankLoanInterestRate); - cs.ReadWrite(gameState.Park.Flags); + cs.ReadWrite(gameState.park.Name); + cs.ReadWrite(gameState.cash); + cs.ReadWrite(gameState.bankLoan); + cs.ReadWrite(gameState.maxBankLoan); + cs.ReadWrite(gameState.bankLoanInterestRate); + cs.ReadWrite(gameState.park.Flags); if (version <= 18) { money16 tempParkEntranceFee{}; cs.ReadWrite(tempParkEntranceFee); - gameState.Park.EntranceFee = ToMoney64(tempParkEntranceFee); + gameState.park.EntranceFee = ToMoney64(tempParkEntranceFee); } else { - cs.ReadWrite(gameState.Park.EntranceFee); + cs.ReadWrite(gameState.park.EntranceFee); } - cs.ReadWrite(gameState.StaffHandymanColour); - cs.ReadWrite(gameState.StaffMechanicColour); - cs.ReadWrite(gameState.StaffSecurityColour); - cs.ReadWrite(gameState.SamePriceThroughoutPark); + cs.ReadWrite(gameState.staffHandymanColour); + cs.ReadWrite(gameState.staffMechanicColour); + cs.ReadWrite(gameState.staffSecurityColour); + cs.ReadWrite(gameState.samePriceThroughoutPark); // Finances if (cs.GetMode() == OrcaStream::Mode::READING) @@ -840,7 +918,7 @@ namespace OpenRCT2 { for (uint32_t j = 0; j < numTypes; j++) { - gameState.ExpenditureTable[i][j] = cs.Read(); + gameState.expenditureTable[i][j] = cs.Read(); } } } @@ -855,14 +933,14 @@ namespace OpenRCT2 { for (uint32_t j = 0; j < numTypes; j++) { - cs.Write(gameState.ExpenditureTable[i][j]); + cs.Write(gameState.expenditureTable[i][j]); } } } - cs.ReadWrite(gameState.HistoricalProfit); + cs.ReadWrite(gameState.historicalProfit); // Marketing - cs.ReadWriteVector(gameState.MarketingCampaigns, [&cs](MarketingCampaign& campaign) { + cs.ReadWriteVector(gameState.marketingCampaigns, [&cs](MarketingCampaign& campaign) { cs.ReadWrite(campaign.Type); cs.ReadWrite(campaign.WeeksLeft); cs.ReadWrite(campaign.Flags); @@ -870,7 +948,7 @@ namespace OpenRCT2 }); // Awards - auto& currentAwards = gameState.CurrentAwards; + auto& currentAwards = gameState.currentAwards; if (version <= 6) { Award awards[RCT2::Limits::kMaxAwards]{}; @@ -893,35 +971,35 @@ namespace OpenRCT2 cs.ReadWrite(award.Type); }); } - cs.ReadWrite(gameState.Park.Value); - cs.ReadWrite(gameState.CompanyValue); - cs.ReadWrite(gameState.Park.Size); - cs.ReadWrite(gameState.NumGuestsInPark); - cs.ReadWrite(gameState.NumGuestsHeadingForPark); - cs.ReadWrite(gameState.Park.Rating); - cs.ReadWrite(gameState.Park.RatingCasualtyPenalty); - cs.ReadWrite(gameState.CurrentExpenditure); - cs.ReadWrite(gameState.CurrentProfit); - cs.ReadWrite(gameState.WeeklyProfitAverageDividend); - cs.ReadWrite(gameState.WeeklyProfitAverageDivisor); - cs.ReadWrite(gameState.TotalAdmissions); - cs.ReadWrite(gameState.TotalIncomeFromAdmissions); + cs.ReadWrite(gameState.park.Value); + cs.ReadWrite(gameState.companyValue); + cs.ReadWrite(gameState.park.Size); + cs.ReadWrite(gameState.numGuestsInPark); + cs.ReadWrite(gameState.numGuestsHeadingForPark); + cs.ReadWrite(gameState.park.Rating); + cs.ReadWrite(gameState.park.RatingCasualtyPenalty); + cs.ReadWrite(gameState.currentExpenditure); + cs.ReadWrite(gameState.currentProfit); + cs.ReadWrite(gameState.weeklyProfitAverageDividend); + cs.ReadWrite(gameState.weeklyProfitAverageDivisor); + cs.ReadWrite(gameState.totalAdmissions); + cs.ReadWrite(gameState.totalIncomeFromAdmissions); if (version <= 16) { money16 legacyTotalRideValueForMoney = 0; cs.ReadWrite(legacyTotalRideValueForMoney); - gameState.TotalRideValueForMoney = legacyTotalRideValueForMoney; + gameState.totalRideValueForMoney = legacyTotalRideValueForMoney; } else { - cs.ReadWrite(gameState.TotalRideValueForMoney); + cs.ReadWrite(gameState.totalRideValueForMoney); } - cs.ReadWrite(gameState.NumGuestsInParkLastWeek); - cs.ReadWrite(gameState.GuestChangeModifier); - cs.ReadWrite(gameState.GuestGenerationProbability); - cs.ReadWrite(gameState.SuggestedGuestMaximum); + cs.ReadWrite(gameState.numGuestsInParkLastWeek); + cs.ReadWrite(gameState.guestChangeModifier); + cs.ReadWrite(gameState.guestGenerationProbability); + cs.ReadWrite(gameState.suggestedGuestMaximum); - cs.ReadWriteArray(gameState.PeepWarningThrottle, [&cs](uint8_t& value) { + cs.ReadWriteArray(gameState.peepWarningThrottle, [&cs](uint8_t& value) { cs.ReadWrite(value); return true; }); @@ -937,12 +1015,12 @@ namespace OpenRCT2 }); for (int i = 0; i < kParkRatingHistorySize; i++) { - if (smallHistory[i] == RCT12ParkHistoryUndefined) - gameState.Park.RatingHistory[i] = kParkRatingHistoryUndefined; + if (smallHistory[i] == kRCT12ParkHistoryUndefined) + gameState.park.RatingHistory[i] = kParkRatingHistoryUndefined; else { - gameState.Park.RatingHistory[i] = static_cast( - smallHistory[i] * RCT12ParkRatingHistoryFactor); + gameState.park.RatingHistory[i] = static_cast( + smallHistory[i] * kRCT12ParkRatingHistoryFactor); } } } @@ -951,12 +1029,12 @@ namespace OpenRCT2 uint8_t smallHistory[kParkRatingHistorySize]; for (int i = 0; i < kParkRatingHistorySize; i++) { - if (gameState.Park.RatingHistory[i] == kParkRatingHistoryUndefined) - smallHistory[i] = RCT12ParkHistoryUndefined; + if (gameState.park.RatingHistory[i] == kParkRatingHistoryUndefined) + smallHistory[i] = kRCT12ParkHistoryUndefined; else { smallHistory[i] = static_cast( - gameState.Park.RatingHistory[i] / RCT12ParkRatingHistoryFactor); + gameState.park.RatingHistory[i] / kRCT12ParkRatingHistoryFactor); } } cs.ReadWriteArray(smallHistory, [&cs](uint8_t& value) { @@ -967,26 +1045,26 @@ namespace OpenRCT2 } else { - cs.ReadWriteArray(gameState.Park.RatingHistory, [&cs](uint16_t& value) { + cs.ReadWriteArray(gameState.park.RatingHistory, [&cs](uint16_t& value) { cs.ReadWrite(value); return true; }); } - cs.ReadWriteArray(gameState.GuestsInParkHistory, [&cs](uint32_t& value) { + cs.ReadWriteArray(gameState.guestsInParkHistory, [&cs](uint32_t& value) { cs.ReadWrite(value); return true; }); - cs.ReadWriteArray(gameState.CashHistory, [&cs](money64& value) { + cs.ReadWriteArray(gameState.cashHistory, [&cs](money64& value) { cs.ReadWrite(value); return true; }); - cs.ReadWriteArray(gameState.WeeklyProfitHistory, [&cs](money64& value) { + cs.ReadWriteArray(gameState.weeklyProfitHistory, [&cs](money64& value) { cs.ReadWrite(value); return true; }); - cs.ReadWriteArray(gameState.Park.ValueHistory, [&cs](money64& value) { + cs.ReadWriteArray(gameState.park.ValueHistory, [&cs](money64& value) { cs.ReadWrite(value); return true; }); @@ -997,20 +1075,20 @@ namespace OpenRCT2 { os.ReadWriteChunk(ParkFileChunkType::RESEARCH, [&gameState](OrcaStream::ChunkStream& cs) { // Research status - cs.ReadWrite(gameState.ResearchFundingLevel); - cs.ReadWrite(gameState.ResearchPriorities); - cs.ReadWrite(gameState.ResearchProgressStage); - cs.ReadWrite(gameState.ResearchProgress); - cs.ReadWrite(gameState.ResearchExpectedMonth); - cs.ReadWrite(gameState.ResearchExpectedDay); - ReadWriteResearchItem(cs, gameState.ResearchLastItem); - ReadWriteResearchItem(cs, gameState.ResearchNextItem); + cs.ReadWrite(gameState.researchFundingLevel); + cs.ReadWrite(gameState.researchPriorities); + cs.ReadWrite(gameState.researchProgressStage); + cs.ReadWrite(gameState.researchProgress); + cs.ReadWrite(gameState.researchExpectedMonth); + cs.ReadWrite(gameState.researchExpectedDay); + ReadWriteResearchItem(cs, gameState.researchLastItem); + ReadWriteResearchItem(cs, gameState.researchNextItem); // Invention list cs.ReadWriteVector( - gameState.ResearchItemsUninvented, [&cs](ResearchItem& item) { ReadWriteResearchItem(cs, item); }); + gameState.researchItemsUninvented, [&cs](ResearchItem& item) { ReadWriteResearchItem(cs, item); }); cs.ReadWriteVector( - gameState.ResearchItemsInvented, [&cs](ResearchItem& item) { ReadWriteResearchItem(cs, item); }); + gameState.researchItemsInvented, [&cs](ResearchItem& item) { ReadWriteResearchItem(cs, item); }); }); } @@ -1054,35 +1132,22 @@ namespace OpenRCT2 os.ReadWriteChunk(ParkFileChunkType::NOTIFICATIONS, [&gameState](OrcaStream::ChunkStream& cs) { if (cs.GetMode() == OrcaStream::Mode::READING) { - gameState.NewsItems.Clear(); - std::vector recent; cs.ReadWriteVector(recent, [&cs](News::Item& item) { ReadWriteNewsItem(cs, item); }); - for (size_t i = 0; i < std::min(recent.size(), News::ItemHistoryStart); i++) - { - gameState.NewsItems[i] = recent[i]; - } std::vector archived; cs.ReadWriteVector(archived, [&cs](News::Item& item) { ReadWriteNewsItem(cs, item); }); - size_t offset = News::ItemHistoryStart; - for (size_t i = 0; i < std::min(archived.size(), News::MaxItemsArchive); i++) - { - gameState.NewsItems[offset + i] = archived[i]; - } - // Still need to set the correct type to properly terminate the queue - if (archived.size() < News::MaxItemsArchive) - gameState.NewsItems[offset + archived.size()].Type = News::ItemType::Null; + News::importNewsItems(gameState, recent, archived); } else { std::vector recent( - std::begin(gameState.NewsItems.GetRecent()), std::end(gameState.NewsItems.GetRecent())); + std::begin(gameState.newsItems.GetRecent()), std::end(gameState.newsItems.GetRecent())); cs.ReadWriteVector(recent, [&cs](News::Item& item) { ReadWriteNewsItem(cs, item); }); std::vector archived( - std::begin(gameState.NewsItems.GetArchived()), std::end(gameState.NewsItems.GetArchived())); + std::begin(gameState.newsItems.GetArchived()), std::end(gameState.newsItems.GetArchived())); cs.ReadWriteVector(archived, [&cs](News::Item& item) { ReadWriteNewsItem(cs, item); }); } }); @@ -1116,12 +1181,12 @@ namespace OpenRCT2 auto found = os.ReadWriteChunk( ParkFileChunkType::TILES, [pathToSurfaceMap, pathToQueueSurfaceMap, pathToRailingsMap, &os, &gameState](OrcaStream::ChunkStream& cs) { - cs.ReadWrite(gameState.MapSize.x); - cs.ReadWrite(gameState.MapSize.y); + cs.ReadWrite(gameState.mapSize.x); + cs.ReadWrite(gameState.mapSize.y); if (cs.GetMode() == OrcaStream::Mode::READING) { - gameStateInitAll(gameState, gameState.MapSize); + gameStateInitAll(gameState, gameState.mapSize); auto numElements = cs.Read(); @@ -1175,12 +1240,11 @@ namespace OpenRCT2 // Previous formats stored the needs supports flag in the primary colour // We have moved it into a flags field to support extended colour sets bool needsSupports = sceneryElement->GetPrimaryColour() - & RCT12_SMALL_SCENERY_ELEMENT_NEEDS_SUPPORTS_FLAG; + & kRCT12SmallSceneryElementNeedsSupportsFlag; if (needsSupports) { sceneryElement->SetPrimaryColour( - sceneryElement->GetPrimaryColour() - & ~RCT12_SMALL_SCENERY_ELEMENT_NEEDS_SUPPORTS_FLAG); + sceneryElement->GetPrimaryColour() & ~kRCT12SmallSceneryElementNeedsSupportsFlag); sceneryElement->SetNeedsSupports(); } } @@ -1203,10 +1267,10 @@ namespace OpenRCT2 void UpdateTrackElementsRideType() { - auto& gameState = GetGameState(); - for (int32_t y = 0; y < gameState.MapSize.y; y++) + auto& gameState = getGameState(); + for (int32_t y = 0; y < gameState.mapSize.y; y++) { - for (int32_t x = 0; x < gameState.MapSize.x; x++) + for (int32_t x = 0; x < gameState.mapSize.x; x++) { TileElement* tileElement = MapGetFirstElementAt(TileCoordsXY{ x, y }); if (tileElement == nullptr) @@ -1353,12 +1417,12 @@ namespace OpenRCT2 cs.ReadWrite(ride.subtype); cs.ReadWrite(ride.mode); cs.ReadWrite(ride.status); - cs.ReadWrite(ride.depart_flags); - cs.ReadWrite(ride.lifecycle_flags); + cs.ReadWrite(ride.departFlags); + cs.ReadWrite(ride.lifecycleFlags); // Meta - cs.ReadWrite(ride.custom_name); - cs.ReadWrite(ride.default_name_number); + cs.ReadWrite(ride.customName); + cs.ReadWrite(ride.defaultNameNumber); if (version <= 18) { @@ -1379,16 +1443,16 @@ namespace OpenRCT2 } // Colours - cs.ReadWrite(ride.entrance_style); + cs.ReadWrite(ride.entranceStyle); cs.ReadWrite(ride.vehicleColourSettings); - cs.ReadWriteArray(ride.track_colour, [&cs](TrackColour& tc) { + cs.ReadWriteArray(ride.trackColours, [&cs](TrackColour& tc) { cs.ReadWrite(tc.main); cs.ReadWrite(tc.additional); cs.ReadWrite(tc.supports); return true; }); - cs.ReadWriteArray(ride.vehicle_colours, [&cs](VehicleColour& vc) { + cs.ReadWriteArray(ride.vehicleColours, [&cs](VehicleColour& vc) { cs.ReadWrite(vc.Body); cs.ReadWrite(vc.Trim); cs.ReadWrite(vc.Tertiary); @@ -1396,8 +1460,8 @@ namespace OpenRCT2 }); // Stations - cs.ReadWrite(ride.num_stations); - cs.ReadWriteArray(ride.GetStations(), [&cs](RideStation& station) { + cs.ReadWrite(ride.numStations); + cs.ReadWriteArray(ride.getStations(), [&cs](RideStation& station) { cs.ReadWrite(station.Start); cs.ReadWrite(station.Height); cs.ReadWrite(station.Length); @@ -1413,53 +1477,53 @@ namespace OpenRCT2 return true; }); - cs.ReadWrite(ride.overall_view.x); - cs.ReadWrite(ride.overall_view.y); + cs.ReadWrite(ride.overallView.x); + cs.ReadWrite(ride.overallView.y); // Vehicles - cs.ReadWrite(ride.NumTrains); - cs.ReadWrite(ride.num_cars_per_train); - cs.ReadWrite(ride.ProposedNumTrains); - cs.ReadWrite(ride.proposed_num_cars_per_train); - cs.ReadWrite(ride.max_trains); + cs.ReadWrite(ride.numTrains); + cs.ReadWrite(ride.numCarsPerTrain); + cs.ReadWrite(ride.proposedNumTrains); + cs.ReadWrite(ride.proposedNumCarsPerTrain); + cs.ReadWrite(ride.maxTrains); if (version < 0x5) { uint8_t value; cs.ReadWrite(value); - ride.MinCarsPerTrain = GetMinCarsPerTrain(value); - ride.MaxCarsPerTrain = GetMaxCarsPerTrain(value); + ride.minCarsPerTrain = GetMinCarsPerTrain(value); + ride.maxCarsPerTrain = GetMaxCarsPerTrain(value); } else { - cs.ReadWrite(ride.MinCarsPerTrain); - cs.ReadWrite(ride.MaxCarsPerTrain); + cs.ReadWrite(ride.minCarsPerTrain); + cs.ReadWrite(ride.maxCarsPerTrain); } - cs.ReadWrite(ride.min_waiting_time); - cs.ReadWrite(ride.max_waiting_time); + cs.ReadWrite(ride.minWaitingTime); + cs.ReadWrite(ride.maxWaitingTime); cs.ReadWriteArray(ride.vehicles, [&cs](EntityId& v) { cs.ReadWrite(v); return true; }); // Operation - cs.ReadWrite(ride.operation_option); - cs.ReadWrite(ride.lift_hill_speed); - cs.ReadWrite(ride.num_circuits); + cs.ReadWrite(ride.operationOption); + cs.ReadWrite(ride.liftHillSpeed); + cs.ReadWrite(ride.numCircuits); // Special - cs.ReadWrite(ride.boat_hire_return_direction); - cs.ReadWrite(ride.boat_hire_return_position); - cs.ReadWrite(ride.ChairliftBullwheelLocation[0]); - cs.ReadWrite(ride.ChairliftBullwheelLocation[1]); - cs.ReadWrite(ride.chairlift_bullwheel_rotation); - cs.ReadWrite(ride.slide_in_use); - cs.ReadWrite(ride.slide_peep); - cs.ReadWrite(ride.slide_peep_t_shirt_colour); - cs.ReadWrite(ride.spiral_slide_progress); - cs.ReadWrite(ride.race_winner); - cs.ReadWrite(ride.cable_lift); - cs.ReadWrite(ride.CableLiftLoc); + cs.ReadWrite(ride.boatHireReturnDirection); + cs.ReadWrite(ride.boatHireReturnPosition); + cs.ReadWrite(ride.chairliftBullwheelLocation[0]); + cs.ReadWrite(ride.chairliftBullwheelLocation[1]); + cs.ReadWrite(ride.chairliftBullwheelRotation); + cs.ReadWrite(ride.slideInUse); + cs.ReadWrite(ride.slidePeep); + cs.ReadWrite(ride.slidePeepTShirtColour); + cs.ReadWrite(ride.spiralSlideProgress); + cs.ReadWrite(ride.raceWinner); + cs.ReadWrite(ride.cableLift); + cs.ReadWrite(ride.cableLiftLoc); // Stats if (cs.GetMode() == OrcaStream::Mode::READING) @@ -1484,39 +1548,39 @@ namespace OpenRCT2 } } - cs.ReadWrite(ride.special_track_elements); - cs.ReadWrite(ride.max_speed); - cs.ReadWrite(ride.average_speed); - cs.ReadWrite(ride.current_test_segment); - cs.ReadWrite(ride.average_speed_test_timeout); + cs.ReadWrite(ride.specialTrackElements); + cs.ReadWrite(ride.maxSpeed); + cs.ReadWrite(ride.averageSpeed); + cs.ReadWrite(ride.currentTestSegment); + cs.ReadWrite(ride.averageSpeedTestTimeout); - cs.ReadWrite(ride.max_positive_vertical_g); - cs.ReadWrite(ride.max_negative_vertical_g); - cs.ReadWrite(ride.max_lateral_g); - cs.ReadWrite(ride.previous_vertical_g); - cs.ReadWrite(ride.previous_lateral_g); + cs.ReadWrite(ride.maxPositiveVerticalG); + cs.ReadWrite(ride.maxNegativeVerticalG); + cs.ReadWrite(ride.maxLateralG); + cs.ReadWrite(ride.previousVerticalG); + cs.ReadWrite(ride.previousLateralG); - cs.ReadWrite(ride.testing_flags); - cs.ReadWrite(ride.CurTestTrackLocation); + cs.ReadWrite(ride.testingFlags.holder); + cs.ReadWrite(ride.curTestTrackLocation); - cs.ReadWrite(ride.turn_count_default); - cs.ReadWrite(ride.turn_count_banked); - cs.ReadWrite(ride.turn_count_sloped); + cs.ReadWrite(ride.turnCountDefault); + cs.ReadWrite(ride.turnCountBanked); + cs.ReadWrite(ride.turnCountSloped); cs.ReadWrite(ride.inversions); cs.ReadWrite(ride.dropsPoweredLifts); - cs.ReadWrite(ride.start_drop_height); - cs.ReadWrite(ride.highest_drop_height); - cs.ReadWrite(ride.sheltered_length); - cs.ReadWrite(ride.var_11C); - cs.ReadWrite(ride.num_sheltered_sections); + cs.ReadWrite(ride.startDropHeight); + cs.ReadWrite(ride.highestDropHeight); + cs.ReadWrite(ride.shelteredLength); + cs.ReadWrite(ride.var11C); + cs.ReadWrite(ride.numShelteredSections); if (version > 5) { - cs.ReadWrite(ride.sheltered_eighths); + cs.ReadWrite(ride.shelteredEighths); cs.ReadWrite(ride.holes); } - cs.ReadWrite(ride.current_test_station); - cs.ReadWrite(ride.num_block_brakes); + cs.ReadWrite(ride.currentTestStation); + cs.ReadWrite(ride.numBlockBrakes); cs.ReadWrite(ride.totalAirTime); cs.ReadWrite(ride.ratings.excitement); @@ -1529,7 +1593,7 @@ namespace OpenRCT2 cs.ReadWrite(tempRideValue); if (tempRideValue == 0xFFFFu) { - ride.value = RIDE_VALUE_UNDEFINED; + ride.value = kRideValueUndefined; } else { @@ -1542,7 +1606,7 @@ namespace OpenRCT2 cs.ReadWrite(tempRideValue); if (tempRideValue == 0xFFFFu) { - ride.value = RIDE_VALUE_UNDEFINED; + ride.value = kRideValueUndefined; } else { @@ -1554,76 +1618,76 @@ namespace OpenRCT2 cs.ReadWrite(ride.value); } - cs.ReadWrite(ride.num_riders); - cs.ReadWrite(ride.build_date); + cs.ReadWrite(ride.numRiders); + cs.ReadWrite(ride.buildDate); if (version <= 18) { money16 tempUpkeepCost{}; cs.ReadWrite(tempUpkeepCost); - ride.upkeep_cost = ToMoney64(tempUpkeepCost); + ride.upkeepCost = ToMoney64(tempUpkeepCost); } else { - cs.ReadWrite(ride.upkeep_cost); + cs.ReadWrite(ride.upkeepCost); } - cs.ReadWrite(ride.cur_num_customers); - cs.ReadWrite(ride.num_customers_timeout); + cs.ReadWrite(ride.curNumCustomers); + cs.ReadWrite(ride.numCustomersTimeout); - cs.ReadWriteArray(ride.num_customers, [&cs](uint16_t& v) { + cs.ReadWriteArray(ride.numCustomers, [&cs](uint16_t& v) { cs.ReadWrite(v); return true; }); - cs.ReadWrite(ride.total_customers); - cs.ReadWrite(ride.total_profit); + cs.ReadWrite(ride.totalCustomers); + cs.ReadWrite(ride.totalProfit); cs.ReadWrite(ride.popularity); - cs.ReadWrite(ride.popularity_time_out); - cs.ReadWrite(ride.popularity_next); - cs.ReadWrite(ride.guests_favourite); - cs.ReadWrite(ride.no_primary_items_sold); - cs.ReadWrite(ride.no_secondary_items_sold); - cs.ReadWrite(ride.income_per_hour); + cs.ReadWrite(ride.popularityTimeout); + cs.ReadWrite(ride.popularityNext); + cs.ReadWrite(ride.guestsFavourite); + cs.ReadWrite(ride.numPrimaryItemsSold); + cs.ReadWrite(ride.numSecondaryItemsSold); + cs.ReadWrite(ride.incomePerHour); cs.ReadWrite(ride.profit); cs.ReadWrite(ride.satisfaction); - cs.ReadWrite(ride.satisfaction_time_out); - cs.ReadWrite(ride.satisfaction_next); + cs.ReadWrite(ride.satisfactionTimeout); + cs.ReadWrite(ride.satisfactionNext); // Breakdown - cs.ReadWrite(ride.breakdown_reason_pending); - cs.ReadWrite(ride.mechanic_status); + cs.ReadWrite(ride.breakdownReasonPending); + cs.ReadWrite(ride.mechanicStatus); cs.ReadWrite(ride.mechanic); - cs.ReadWrite(ride.inspection_station); - cs.ReadWrite(ride.broken_vehicle); - cs.ReadWrite(ride.broken_car); - cs.ReadWrite(ride.breakdown_reason); - cs.ReadWrite(ride.reliability_subvalue); - cs.ReadWrite(ride.reliability_percentage); - cs.ReadWrite(ride.unreliability_factor); + cs.ReadWrite(ride.inspectionStation); + cs.ReadWrite(ride.brokenTrain); + cs.ReadWrite(ride.brokenCar); + cs.ReadWrite(ride.breakdownReason); + cs.ReadWrite(ride.reliabilitySubvalue); + cs.ReadWrite(ride.reliabilityPercentage); + cs.ReadWrite(ride.unreliabilityFactor); cs.ReadWrite(ride.downtime); - cs.ReadWrite(ride.inspection_interval); - cs.ReadWrite(ride.last_inspection); + cs.ReadWrite(ride.inspectionInterval); + cs.ReadWrite(ride.lastInspection); - cs.ReadWriteArray(ride.downtime_history, [&cs](uint8_t& v) { + cs.ReadWriteArray(ride.downtimeHistory, [&cs](uint8_t& v) { cs.ReadWrite(v); return true; }); - cs.ReadWrite(ride.breakdown_sound_modifier); - cs.ReadWrite(ride.not_fixed_timeout); - cs.ReadWrite(ride.last_crash_type); - cs.ReadWrite(ride.connected_message_throttle); + cs.ReadWrite(ride.breakdownSoundModifier); + cs.ReadWrite(ride.notFixedTimeout); + cs.ReadWrite(ride.lastCrashType); + cs.ReadWrite(ride.connectedMessageThrottle); - cs.ReadWrite(ride.vehicle_change_timeout); + cs.ReadWrite(ride.vehicleChangeTimeout); - cs.ReadWrite(ride.current_issues); - cs.ReadWrite(ride.last_issue_time); + cs.ReadWrite(ride.currentIssues); + cs.ReadWrite(ride.lastIssueTime); // Music cs.ReadWrite(ride.music); - cs.ReadWrite(ride.music_tune_id); - cs.ReadWrite(ride.music_position); + cs.ReadWrite(ride.musicTuneId); + cs.ReadWrite(ride.musicPosition); return true; }); }); @@ -2495,7 +2559,7 @@ namespace OpenRCT2 ReadWriteEntityCommon(cs, fountain); cs.ReadWrite(fountain.NumTicksAlive); cs.ReadWrite(fountain.frame); - cs.ReadWrite(fountain.FountainFlags); + cs.ReadWrite(fountain.fountainFlags.holder); cs.ReadWrite(fountain.TargetX); cs.ReadWrite(fountain.TargetY); cs.ReadWrite(fountain.TargetY); @@ -2702,10 +2766,10 @@ public: { } - ParkLoadResult Load(const u8string& path) override + ParkLoadResult Load(const u8string& path, const bool skipObjectCheck) override { _parkFile = std::make_unique(); - _parkFile->Load(path); + _parkFile->Load(path, skipObjectCheck); auto result = ParkLoadResult(std::move(_parkFile->RequiredObjects)); result.SemiCompatibleVersion = _parkFile->IsSemiCompatibleVersion(result.MinVersion, result.TargetVersion); @@ -2714,19 +2778,19 @@ public: ParkLoadResult LoadSavedGame(const u8string& path, bool skipObjectCheck = false) override { - return Load(path); + return Load(path, skipObjectCheck); } ParkLoadResult LoadScenario(const u8string& path, bool skipObjectCheck = false) override { - return Load(path); + return Load(path, skipObjectCheck); } ParkLoadResult LoadFromStream( OpenRCT2::IStream* stream, bool isScenario, bool skipObjectCheck = false, const u8string& path = {}) override { _parkFile = std::make_unique(); - _parkFile->Load(*stream); + _parkFile->Load(*stream, skipObjectCheck); auto result = ParkLoadResult(std::move(_parkFile->RequiredObjects)); result.SemiCompatibleVersion = _parkFile->IsSemiCompatibleVersion(result.MinVersion, result.TargetVersion); @@ -2740,11 +2804,16 @@ public: GameFixSaveVars(); } - bool GetDetails(ScenarioIndexEntry* dst) override + bool PopulateIndexEntry(ScenarioIndexEntry* dst) override { *dst = _parkFile->ReadScenarioChunk(); return true; } + + ParkPreview GetParkPreview() override + { + return _parkFile->ReadPreviewChunk(); + } }; std::unique_ptr ParkImporter::CreateParkFile(IObjectRepository& objectRepository) diff --git a/src/openrct2/park/ParkFile.h b/src/openrct2/park/ParkFile.h index 9f793bc9a7..b27069f956 100644 --- a/src/openrct2/park/ParkFile.h +++ b/src/openrct2/park/ParkFile.h @@ -1,3 +1,12 @@ +/***************************************************************************** + * Copyright (c) 2014-2025 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + #pragma once #include @@ -11,10 +20,10 @@ namespace OpenRCT2 struct GameState_t; // Current version that is saved. - constexpr uint32_t kParkFileCurrentVersion = 51; + constexpr uint32_t kParkFileCurrentVersion = 53; // The minimum version that is forwards compatible with the current version. - constexpr uint32_t kParkFileMinVersion = 51; + constexpr uint32_t kParkFileMinVersion = 53; // The minimum version that is backwards compatible with the current version. // If this is increased beyond 0, uncomment the checks in ParkFile.cpp and Context.cpp! @@ -39,6 +48,8 @@ namespace OpenRCT2 constexpr uint16_t kExtendedStandUpRollerCoasterVersion = 48; constexpr uint16_t kPeepAnimationObjectsVersion = 49; constexpr uint16_t kDiagonalLongFlatToSteepAndDiveLoopVersion = 50; + constexpr uint16_t kEmbeddedParkPreviewChunk = 52; + constexpr uint16_t kClimateObjectsVersion = 53; } // namespace OpenRCT2 class ParkFileExporter diff --git a/src/openrct2/park/ParkPreview.cpp b/src/openrct2/park/ParkPreview.cpp new file mode 100644 index 0000000000..292559fa6f --- /dev/null +++ b/src/openrct2/park/ParkPreview.cpp @@ -0,0 +1,266 @@ +/***************************************************************************** + * Copyright (c) 2014-2025 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#include "ParkPreview.h" + +#include "../Context.h" +#include "../GameState.h" +#include "../OpenRCT2.h" +#include "../core/Numerics.hpp" +#include "../drawing/Drawing.h" +#include "../drawing/X8DrawingEngine.h" +#include "../interface/Viewport.h" +#include "../interface/Window.h" +#include "../ride/RideManager.hpp" +#include "../world/tile_element/SurfaceElement.h" +#include "../world/tile_element/TileElement.h" + +#include + +namespace OpenRCT2 +{ + static std::optional generatePreviewMap(); + static std::optional generatePreviewScreenshot(); + + ParkPreview generatePreviewFromGameState(const GameState_t& gameState) + { + ParkPreview preview{ + .parkName = gameState.park.Name, + .parkRating = gameState.park.Rating, + .year = gameState.date.GetYear(), + .month = gameState.date.GetMonth(), + .day = gameState.date.GetDay(), + .parkUsesMoney = !(gameState.park.Flags & PARK_FLAGS_NO_MONEY), + .cash = gameState.cash, + .numRides = static_cast(RideManager().size()), + .numGuests = static_cast(gameState.numGuestsInPark), + }; + + if (auto image = generatePreviewMap(); image != std::nullopt) + preview.images.push_back(*image); + + if (auto image = generatePreviewScreenshot(); image != std::nullopt) + preview.images.push_back(*image); + + return preview; + } + + static uint8_t _tileColourIndex = 0; + + static PaletteIndex getPreviewColourByTilePos(const TileCoordsXY& pos) + { + PaletteIndex paletteIndex = PALETTE_INDEX_0; + + auto tileElement = MapGetFirstElementAt(pos); + if (tileElement == nullptr) + return paletteIndex; + + PaletteIndex surfaceColour = paletteIndex; + bool isOutsidePark = false; + do + { + switch (tileElement->GetType()) + { + case TileElementType::Surface: + { + auto* surfaceElement = tileElement->AsSurface(); + if (surfaceElement == nullptr) + { + surfaceColour = paletteIndex = PALETTE_INDEX_0; + break; + } + + if (surfaceElement->GetWaterHeight() > 0) + { + surfaceColour = paletteIndex = PALETTE_INDEX_195; + } + else + { + const auto* surfaceObject = surfaceElement->GetSurfaceObject(); + if (surfaceObject != nullptr) + { + surfaceColour = paletteIndex = surfaceObject->MapColours[_tileColourIndex]; + } + } + + isOutsidePark |= !(surfaceElement->GetOwnership() & OWNERSHIP_OWNED); + break; + } + + case TileElementType::Path: + paletteIndex = PALETTE_INDEX_17; + break; + + case TileElementType::Track: + paletteIndex = PALETTE_INDEX_183; + break; + + case TileElementType::SmallScenery: + case TileElementType::LargeScenery: + paletteIndex = PALETTE_INDEX_99; // 64 + break; + + case TileElementType::Entrance: + paletteIndex = PALETTE_INDEX_186; + break; + + default: + break; + } + } while (!(tileElement++)->IsLastForTile()); + + // Darken every other tile that's outside of the park, unless it's a path + if (isOutsidePark && _tileColourIndex == 1 && paletteIndex != PALETTE_INDEX_17) + paletteIndex = PALETTE_INDEX_10; + // For rides, every other tile should use the surface colour + else if (_tileColourIndex == 1 && paletteIndex == PALETTE_INDEX_183) + paletteIndex = surfaceColour; + + _tileColourIndex = (_tileColourIndex + 1) % 2; + + return paletteIndex; + } + + // 0x0046DB4C + static std::optional generatePreviewMap() + { + const auto& gameState = getGameState(); + const auto drawableMapSize = TileCoordsXY{ gameState.mapSize.x - 2, gameState.mapSize.y - 2 }; + const auto longEdgeSize = std::max(drawableMapSize.x, drawableMapSize.y); + const auto idealPreviewSize = 150; + + auto longEdgeSizeLeft = longEdgeSize; + uint8_t mapSkipFactor = 1; + while (longEdgeSizeLeft > idealPreviewSize) + { + longEdgeSizeLeft -= idealPreviewSize; + mapSkipFactor++; + } + + const uint8_t previewWidth = std::max(1, drawableMapSize.x / mapSkipFactor); + const uint8_t previewHeight = std::max(1, drawableMapSize.y / mapSkipFactor); + + PreviewImage image{ + .type = PreviewImageType::miniMap, + .width = previewWidth, + .height = previewHeight, + }; + + for (auto y = 0u; y < image.height; y++) + { + int32_t mapY = 1 + (y * mapSkipFactor); + if (mapY >= drawableMapSize.y) + break; + + _tileColourIndex = y % 2; + + for (auto x = 0u; x < image.width; x++) + { + int32_t mapX = drawableMapSize.x - (x * mapSkipFactor); + if (mapX < 1) + break; + + image.pixels[y * image.width + x] = getPreviewColourByTilePos({ mapX, mapY }); + } + } + + return image; + } + + static std::optional generatePreviewScreenshot() + { + if (gOpenRCT2NoGraphics) + return std::nullopt; + + const auto& gameState = getGameState(); + const auto mainWindow = WindowGetMain(); + const auto mainViewport = WindowGetViewport(mainWindow); + + CoordsXYZ mapPosXYZ{}; + if (mainViewport != nullptr) + { + const auto centre = mainViewport->viewPos + + ScreenCoordsXY{ mainViewport->ViewWidth() / 2, mainViewport->ViewHeight() / 2 }; + const auto mapPos = ViewportPosToMapPos(centre, 24, mainViewport->rotation); + mapPosXYZ = CoordsXYZ(mapPos.x, mapPos.y, int32_t{ TileElementHeight(mapPos) }); + } + else if (!gameState.park.Entrances.empty()) + { + const auto& entrance = gameState.park.Entrances[0]; + mapPosXYZ = CoordsXYZ{ entrance.x + 16, entrance.y + 16, entrance.z + 32 }; + } + else + return std::nullopt; + + PreviewImage image{ + .type = PreviewImageType::screenshot, + .width = kMaxPreviewImageSize, + .height = kMaxPreviewImageSize / 5 * 4, // 5:4 ratio + }; + + Viewport saveVp{ + .width = image.width, + .height = image.height, + .flags = 0, + .zoom = ZoomLevel{ 1 }, + .rotation = mainViewport->rotation, + }; + + auto viewPos = centre_2d_coordinates(mapPosXYZ, &saveVp); + if (viewPos == std::nullopt) + return std::nullopt; + + saveVp.viewPos = *viewPos; + + auto drawingEngine = std::make_unique(GetContext()->GetUiContext()); + if (!drawingEngine) + return std::nullopt; + + DrawPixelInfo dpi{ + .bits = static_cast(image.pixels), + .x = 0, + .y = 0, + .width = image.width, + .height = image.height, + .pitch = 0, + .zoom_level = saveVp.zoom, + .DrawingEngine = drawingEngine.get(), + }; + + ViewportRender(dpi, &saveVp); + + return image; + } + + void drawPreviewImage(const PreviewImage& image, DrawPixelInfo& dpi, ScreenCoordsXY screenPos) + { + auto* drawingEngine = GetContext()->GetDrawingEngine(); + if (drawingEngine == nullptr) + return; + + const auto imageId = ImageId(0); + auto* g1 = const_cast(GfxGetG1Element(imageId)); + if (g1 != nullptr) + { + // Temporarily substitute a G1 image with the data in the preview image + const auto backupG1 = *g1; + *g1 = {}; + g1->offset = const_cast(image.pixels); + g1->width = image.width; + g1->height = image.height; + drawingEngine->InvalidateImage(imageId.GetIndex()); + + // Draw preview image and restore original G1 image + GfxDrawSprite(dpi, imageId, screenPos); + *g1 = backupG1; + drawingEngine->InvalidateImage(imageId.GetIndex()); + } + } + +} // namespace OpenRCT2 diff --git a/src/openrct2/park/ParkPreview.h b/src/openrct2/park/ParkPreview.h new file mode 100644 index 0000000000..2b875d5f4e --- /dev/null +++ b/src/openrct2/park/ParkPreview.h @@ -0,0 +1,58 @@ +/***************************************************************************** + * Copyright (c) 2014-2025 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#pragma once + +#include "../core/Money.hpp" +#include "../world/Location.hpp" + +#include +#include +#include + +struct DrawPixelInfo; + +namespace OpenRCT2 +{ + constexpr auto kMaxPreviewImageSize = 250; + + enum class PreviewImageType : uint8_t + { + miniMap, + screenshot, + logo, + }; + + struct PreviewImage + { + PreviewImageType type; + uint8_t width; + uint8_t height; + uint8_t pixels[kMaxPreviewImageSize * kMaxPreviewImageSize]{}; + }; + + struct ParkPreview + { + std::string parkName{}; + uint16_t parkRating{}; + int32_t year{}; + int32_t month{}; + int32_t day{}; + bool parkUsesMoney{ true }; + money64 cash{}; + uint16_t numRides{}; + uint16_t numGuests{}; + std::vector images{}; + }; + + struct GameState_t; + + ParkPreview generatePreviewFromGameState(const GameState_t& gameState); + void drawPreviewImage(const PreviewImage& image, DrawPixelInfo& dpi, ScreenCoordsXY screenPos); +} // namespace OpenRCT2 diff --git a/src/openrct2/peep/GuestPathfinding.cpp b/src/openrct2/peep/GuestPathfinding.cpp index 7a27c7aa18..8e7bc7958f 100644 --- a/src/openrct2/peep/GuestPathfinding.cpp +++ b/src/openrct2/peep/GuestPathfinding.cpp @@ -18,7 +18,6 @@ #include "../ride/RideData.h" #include "../ride/Station.h" #include "../ride/Track.h" -#include "../scenario/Scenario.h" #include "../world/Entrance.h" #include "../world/Footpath.h" #include "../world/tile_element/BannerElement.h" @@ -423,7 +422,7 @@ namespace OpenRCT2::PathFinding continue; RideId rideIndex = tileElement->AsTrack()->GetRideIndex(); auto ride = GetRide(rideIndex); - if (ride != nullptr && ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (ride != nullptr && ride->getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) { *outRideIndex = rideIndex; return PathSearchResult::ShopEntrance; @@ -792,7 +791,7 @@ namespace OpenRCT2::PathFinding * tile. */ rideIndex = tileElement->AsTrack()->GetRideIndex(); auto ride = GetRide(rideIndex); - if (ride == nullptr || !ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (ride == nullptr || !ride->getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) continue; found = true; @@ -1298,7 +1297,7 @@ namespace OpenRCT2::PathFinding } while (!(destTileElement++)->IsLastForTile()); // Peep is not on a path. if (!found) - return INVALID_DIRECTION; + return kInvalidDirection; permittedEdges &= 0xF; uint32_t edges = permittedEdges; @@ -1374,7 +1373,7 @@ namespace OpenRCT2::PathFinding // Peep has tried all edges. if (edges == 0) - return INVALID_DIRECTION; + return kInvalidDirection; int32_t chosenEdge = Numerics::bitScanForward(edges); @@ -1418,7 +1417,7 @@ namespace OpenRCT2::PathFinding for (auto& entry : state.history) { entry.location.SetNull(); - entry.direction = INVALID_DIRECTION; + entry.direction = kInvalidDirection; } /* The pathfinding will only use elements @@ -1507,7 +1506,7 @@ namespace OpenRCT2::PathFinding if (bestScore == 0xFFFF) { LogPathfinding(&peep, "Pathfind heuristic search failed."); - return INVALID_DIRECTION; + return kInvalidDirection; } if constexpr (kLogPathfinding) @@ -1573,7 +1572,7 @@ namespace OpenRCT2::PathFinding { std::optional chosenEntrance = std::nullopt; uint16_t nearestDist = 0xFFFF; - for (const auto& parkEntrance : GetGameState().Park.Entrances) + for (const auto& parkEntrance : getGameState().park.Entrances) { auto dist = abs(parkEntrance.x - loc.x) + abs(parkEntrance.y - loc.y); if (dist < nearestDist) @@ -1601,7 +1600,7 @@ namespace OpenRCT2::PathFinding const auto goalPos = TileCoordsXYZ(chosenEntrance.value()); Direction chosenDirection = ChooseDirection(TileCoordsXYZ{ peep.NextLoc }, goalPos, peep, true, RideId::GetNull()); - if (chosenDirection == INVALID_DIRECTION) + if (chosenDirection == kInvalidDirection) return GuestPathfindAimless(peep, edges); return PeepMoveOneTile(chosenDirection, peep); @@ -1611,14 +1610,14 @@ namespace OpenRCT2::PathFinding * Gets the nearest peep spawn relative to point, by using Manhattan distance. * @param x x coordinate of location * @param y y coordinate of location - * @return Index of gameState.PeepSpawns (or 0xFF if no peep spawns exist). + * @return Index of gameState.peepSpawns (or 0xFF if no peep spawns exist). */ static uint8_t GetNearestPeepSpawnIndex(uint16_t x, uint16_t y) { uint8_t chosenSpawn = 0xFF; uint16_t nearestDist = 0xFFFF; uint8_t i = 0; - for (const auto& spawn : GetGameState().PeepSpawns) + for (const auto& spawn : getGameState().peepSpawns) { uint16_t dist = abs(spawn.x - x) + abs(spawn.y - y); if (dist < nearestDist) @@ -1644,7 +1643,7 @@ namespace OpenRCT2::PathFinding if (chosenSpawn == 0xFF) return GuestPathfindAimless(peep, edges); - const auto peepSpawnLoc = GetGameState().PeepSpawns[chosenSpawn].ToTileStart(); + const auto peepSpawnLoc = getGameState().peepSpawns[chosenSpawn].ToTileStart(); Direction direction = peepSpawnLoc.direction; if (peepSpawnLoc.x == peep.NextLoc.x && peepSpawnLoc.y == peep.NextLoc.y) @@ -1654,7 +1653,7 @@ namespace OpenRCT2::PathFinding const auto goalPos = TileCoordsXYZ(peepSpawnLoc); direction = ChooseDirection(TileCoordsXYZ{ peep.NextLoc }, goalPos, peep, true, RideId::GetNull()); - if (direction == INVALID_DIRECTION) + if (direction == kInvalidDirection) return GuestPathfindAimless(peep, edges); return PeepMoveOneTile(direction, peep); @@ -1690,7 +1689,7 @@ namespace OpenRCT2::PathFinding } Direction chosenDirection = ChooseDirection(TileCoordsXYZ{ peep.NextLoc }, entranceGoal, peep, true, RideId::GetNull()); - if (chosenDirection == INVALID_DIRECTION) + if (chosenDirection == kInvalidDirection) return GuestPathfindAimless(peep, edges); return PeepMoveOneTile(chosenDirection, peep); @@ -2041,7 +2040,7 @@ namespace OpenRCT2::PathFinding // Peep is heading for a ride. RideId rideIndex = peep.GuestHeadingToRideId; auto ride = GetRide(rideIndex); - if (ride == nullptr || ride->status != RideStatus::Open) + if (ride == nullptr || ride->status != RideStatus::open) { LogPathfinding(&peep, "Completed CalculateNextDestination - peep is heading to closed ride == aimless."); @@ -2057,13 +2056,13 @@ namespace OpenRCT2::PathFinding int32_t numEntranceStations = 0; BitSet entranceStations = {}; - for (const auto& station : ride->GetStations()) + for (const auto& station : ride->getStations()) { // Skip if stationNum has no entrance (so presumably an exit only station) if (station.Entrance.IsNull()) continue; - const auto stationIndex = ride->GetStationIndex(&station); + const auto stationIndex = ride->getStationIndex(&station); numEntranceStations++; entranceStations[stationIndex.ToUnderlying()] = true; @@ -2082,7 +2081,7 @@ namespace OpenRCT2::PathFinding if (numEntranceStations == 0) closestStationNum = StationIndex::FromUnderlying(0); - if (numEntranceStations > 1 && (ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) + if (numEntranceStations > 1 && (ride->departFlags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) { closestStationNum = GuestPathfindingSelectRandomStation(peep, numEntranceStations, entranceStations); } @@ -2090,7 +2089,7 @@ namespace OpenRCT2::PathFinding if (numEntranceStations == 0) { // closestStationNum is always 0 here. - const auto& closestStation = ride->GetStation(closestStationNum); + const auto& closestStation = ride->getStation(closestStationNum); auto entranceXY = TileCoordsXY(closestStation.Start); loc.x = entranceXY.x; loc.y = entranceXY.y; @@ -2098,7 +2097,7 @@ namespace OpenRCT2::PathFinding } else { - TileCoordsXYZD entranceXYZD = ride->GetStation(closestStationNum).Entrance; + TileCoordsXYZD entranceXYZD = ride->getStation(closestStationNum).Entrance; loc.x = entranceXYZD.x; loc.y = entranceXYZD.y; loc.z = entranceXYZD.z; @@ -2108,7 +2107,7 @@ namespace OpenRCT2::PathFinding direction = ChooseDirection(TileCoordsXYZ{ peep.NextLoc }, loc, peep, true, rideIndex); - if (direction == INVALID_DIRECTION) + if (direction == kInvalidDirection) { /* Heuristic search failed for all directions. * Reset the PathfindGoal - this means that the PathfindHistory diff --git a/src/openrct2/platform/Crash.cpp b/src/openrct2/platform/Crash.cpp index 86c4ae7361..cfdfc981a3 100644 --- a/src/openrct2/platform/Crash.cpp +++ b/src/openrct2/platform/Crash.cpp @@ -41,7 +41,6 @@ #include "../interface/Screenshot.h" #include "../object/ObjectManager.h" #include "../park/ParkFile.h" - #include "../scenario/Scenario.h" #include "Platform.h" #define WSZ(x) L"" x @@ -183,7 +182,7 @@ static bool OnCrash( auto& objManager = ctx->GetObjectManager(); exporter->ExportObjectsList = objManager.GetPackableObjects(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); exporter->Export(gameState, saveFilePathUTF8.c_str()); savedGameDumped = true; } @@ -318,7 +317,7 @@ static bool OnCrash( static std::wstring GetDumpDirectory() { auto env = GetContext()->GetPlatformEnvironment(); - auto crashPath = env->GetDirectoryPath(DIRBASE::USER, DIRID::CRASH); + auto crashPath = env->GetDirectoryPath(DirBase::user, DirId::crashDumps); auto result = String::toWideChar(crashPath); return result; diff --git a/src/openrct2/platform/Platform.Android.cpp b/src/openrct2/platform/Platform.Android.cpp index 7b14f5a407..03197bbaac 100644 --- a/src/openrct2/platform/Platform.Android.cpp +++ b/src/openrct2/platform/Platform.Android.cpp @@ -12,6 +12,7 @@ #include "Platform.h" #include "../Diagnostic.h" + #include "../core/File.h" #include "../core/Guard.hpp" #include "../localisation/Language.h" @@ -34,15 +35,15 @@ static std::shared_ptr acl; namespace OpenRCT2::Platform { - std::string GetFolderPath(SPECIAL_FOLDER folder) + std::string GetFolderPath(SpecialFolder folder) { // Android builds currently only read from /sdcard/openrct2* switch (folder) { - case SPECIAL_FOLDER::USER_CACHE: - case SPECIAL_FOLDER::USER_CONFIG: - case SPECIAL_FOLDER::USER_DATA: - case SPECIAL_FOLDER::USER_HOME: + case SpecialFolder::userCache: + case SpecialFolder::userConfig: + case SpecialFolder::userData: + case SpecialFolder::userHome: return "/sdcard"; default: return std::string(); @@ -165,8 +166,13 @@ namespace OpenRCT2::Platform #ifndef NO_TTF std::string GetFontPath(const TTFFontDescriptor& font) { - STUB(); - return {}; + auto expectedPath = std::string("/system/fonts/") + std::string(font.filename); + if (File::Exists(expectedPath)) + { + return expectedPath; + } + + return ""; } #endif diff --git a/src/openrct2/platform/Platform.Linux.cpp b/src/openrct2/platform/Platform.Linux.cpp index 50c7597a02..379cd8a540 100644 --- a/src/openrct2/platform/Platform.Linux.cpp +++ b/src/openrct2/platform/Platform.Linux.cpp @@ -77,23 +77,23 @@ namespace OpenRCT2::Platform } } - std::string GetFolderPath(SPECIAL_FOLDER folder) + std::string GetFolderPath(SpecialFolder folder) { switch (folder) { - case SPECIAL_FOLDER::USER_CACHE: - case SPECIAL_FOLDER::USER_CONFIG: - case SPECIAL_FOLDER::USER_DATA: + case SpecialFolder::userCache: + case SpecialFolder::userConfig: + case SpecialFolder::userData: { auto path = GetEnvironmentPath("XDG_CONFIG_HOME"); if (path.empty()) { - auto home = GetFolderPath(SPECIAL_FOLDER::USER_HOME); + auto home = GetFolderPath(SpecialFolder::userHome); path = Path::Combine(home, u8".config"); } return path; } - case SPECIAL_FOLDER::USER_HOME: + case SpecialFolder::userHome: return GetHomePath(); default: return std::string(); diff --git a/src/openrct2/platform/Platform.Win32.cpp b/src/openrct2/platform/Platform.Win32.cpp index ed965b0ef1..2aa24c5c5f 100644 --- a/src/openrct2/platform/Platform.Win32.cpp +++ b/src/openrct2/platform/Platform.Win32.cpp @@ -35,6 +35,7 @@ #include "Platform.h" #include + #include #include #include @@ -54,7 +55,8 @@ static constexpr wchar_t SINGLE_INSTANCE_MUTEX_NAME[] = L"RollerCoaster Tycoon 2 namespace OpenRCT2::Platform { static std::string WIN32_GetKnownFolderPath(REFKNOWNFOLDERID rfid); - static std::string WIN32_GetModuleFileNameW(HMODULE hModule); + static std::wstring WIN32_GetModuleFileNameW(HMODULE hModule); + static u8string WIN32_GetModuleFileNameUTF8(HMODULE hModule); std::string GetEnvironmentVariable(std::string_view name) { @@ -88,23 +90,23 @@ namespace OpenRCT2::Platform return result; } - std::string GetFolderPath(SPECIAL_FOLDER folder) + std::string GetFolderPath(SpecialFolder folder) { switch (folder) { // We currently store everything under Documents/OpenRCT2 - case SPECIAL_FOLDER::USER_CACHE: - case SPECIAL_FOLDER::USER_CONFIG: - case SPECIAL_FOLDER::USER_DATA: + case SpecialFolder::userCache: + case SpecialFolder::userConfig: + case SpecialFolder::userData: { auto path = WIN32_GetKnownFolderPath(FOLDERID_Documents); if (path.empty()) { - path = GetFolderPath(SPECIAL_FOLDER::USER_HOME); + path = GetFolderPath(SpecialFolder::userHome); } return path; } - case SPECIAL_FOLDER::USER_HOME: + case SpecialFolder::userHome: { auto path = WIN32_GetKnownFolderPath(FOLDERID_Profile); if (path.empty()) @@ -117,7 +119,7 @@ namespace OpenRCT2::Platform } return path; } - case SPECIAL_FOLDER::RCT2_DISCORD: + case SpecialFolder::rct2Discord: { auto path = WIN32_GetKnownFolderPath(FOLDERID_LocalAppData); if (!path.empty()) @@ -155,7 +157,7 @@ namespace OpenRCT2::Platform std::string GetCurrentExecutablePath() { - return WIN32_GetModuleFileNameW(nullptr); + return WIN32_GetModuleFileNameUTF8(nullptr); } std::string GetDocsPath() @@ -307,18 +309,25 @@ namespace OpenRCT2::Platform return path; } - static std::string WIN32_GetModuleFileNameW(HMODULE hModule) + static std::wstring WIN32_GetModuleFileNameW(HMODULE hModule) { - uint32_t wExePathCapacity = MAX_PATH; - std::unique_ptr wExePath; + uint32_t wExePathCapacity = 128; + std::wstring exePath; + uint32_t size; do { wExePathCapacity *= 2; - wExePath = std::make_unique(wExePathCapacity); - size = GetModuleFileNameW(hModule, wExePath.get(), wExePathCapacity); + exePath.resize(wExePathCapacity); + size = GetModuleFileNameW(hModule, exePath.data(), wExePathCapacity); } while (size >= wExePathCapacity); - return String::toUtf8(wExePath.get()); + exePath.resize(size); + return exePath; + } + + static u8string WIN32_GetModuleFileNameUTF8(HMODULE hModule) + { + return String::toUtf8(WIN32_GetModuleFileNameW(hModule)); } u8string StrDecompToPrecomp(u8string_view input) @@ -364,13 +373,8 @@ namespace OpenRCT2::Platform std::string_view extension, std::string_view fileTypeText, std::string_view commandText, std::string_view commandArgs, const uint32_t iconIndex) { - wchar_t exePathW[MAX_PATH]; - wchar_t dllPathW[MAX_PATH]; - - [[maybe_unused]] int32_t printResult; - - GetModuleFileNameW(nullptr, exePathW, static_cast(std::size(exePathW))); - GetModuleFileNameW(GetDLLModule(), dllPathW, static_cast(std::size(dllPathW))); + const std::wstring& exePathW = WIN32_GetModuleFileNameW(nullptr); + const std::wstring& dllPathW = WIN32_GetModuleFileNameW(GetDLLModule()); auto extensionW = String::toWideChar(extension); auto fileTypeTextW = String::toWideChar(fileTypeText); @@ -410,10 +414,8 @@ namespace OpenRCT2::Platform return false; } // [hRootKey\OpenRCT2.ext\DefaultIcon] - wchar_t szIconW[MAX_PATH]; - printResult = swprintf_s(szIconW, MAX_PATH, L"\"%s\",%d", dllPathW, iconIndex); - assert(printResult >= 0); - if (RegSetValueW(hKey, L"DefaultIcon", REG_SZ, szIconW, 0) != ERROR_SUCCESS) + const std::wstring szIconW = std::format(L"\"{}\",{}", dllPathW, iconIndex); + if (RegSetValueW(hKey, L"DefaultIcon", REG_SZ, szIconW.c_str(), 0) != ERROR_SUCCESS) { RegCloseKey(hKey); RegCloseKey(hRootKey); @@ -437,10 +439,8 @@ namespace OpenRCT2::Platform } // [hRootKey\OpenRCT2.sv6\shell\open\command] - wchar_t szCommandW[MAX_PATH]; - printResult = swprintf_s(szCommandW, MAX_PATH, L"\"%s\" %s", exePathW, commandArgsW.c_str()); - assert(printResult >= 0); - if (RegSetValueW(hKey, L"shell\\open\\command", REG_SZ, szCommandW, 0) != ERROR_SUCCESS) + const std::wstring szCommandW = std::format(L"\"{}\" {}", exePathW, commandArgsW); + if (RegSetValueW(hKey, L"shell\\open\\command", REG_SZ, szCommandW.c_str(), 0) != ERROR_SUCCESS) { RegCloseKey(hKey); RegCloseKey(hRootKey); @@ -857,23 +857,22 @@ namespace OpenRCT2::Platform if (RegSetKeyValueW(hClassKey, nullptr, L"URL Protocol", REG_SZ, "", 0) == ERROR_SUCCESS) { // [hRootKey\openrct2\shell\open\command] - wchar_t exePath[MAX_PATH]; - GetModuleFileNameW(nullptr, exePath, MAX_PATH); - - wchar_t buffer[512]; - swprintf_s(buffer, std::size(buffer), L"\"%s\" handle-uri \"%%1\"", exePath); - if (RegSetValueW(hClassKey, L"shell\\open\\command", REG_SZ, buffer, 0) == ERROR_SUCCESS) + const std::wstring& exePathW = WIN32_GetModuleFileNameW(nullptr); + const std::wstring handle_uri_string = std::format(L"\"{}\" handle-uri \"%1\"", exePathW); + if (RegSetValueW(hClassKey, L"shell\\open\\command", REG_SZ, handle_uri_string.c_str(), 0) + == ERROR_SUCCESS) { // Not compulsory, but gives the application a nicer name // [HKEY_CURRENT_USER\SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache] HKEY hMuiCacheKey; if (RegCreateKeyW(hRootKey, MUI_CACHE, &hMuiCacheKey) == ERROR_SUCCESS) { - swprintf_s(buffer, std::size(buffer), L"%s.FriendlyAppName", exePath); + const std::wstring friendly_apl_name = std::format(L"{}.FriendlyAppName", exePathW); // mingw-w64 used to define RegSetKeyValueW's signature incorrectly // You need at least mingw-w64 5.0 including this commit: // https://sourceforge.net/p/mingw-w64/mingw-w64/ci/da9341980a4b70be3563ac09b5927539e7da21f7/ - RegSetKeyValueW(hMuiCacheKey, nullptr, buffer, REG_SZ, L"OpenRCT2", sizeof(L"OpenRCT2")); + RegSetKeyValueW( + hMuiCacheKey, nullptr, friendly_apl_name.c_str(), REG_SZ, L"OpenRCT2", sizeof(L"OpenRCT2")); } LOG_VERBOSE("URI protocol setup successful"); diff --git a/src/openrct2/platform/Platform.h b/src/openrct2/platform/Platform.h index 470e2989ef..f06423796c 100644 --- a/src/openrct2/platform/Platform.h +++ b/src/openrct2/platform/Platform.h @@ -35,14 +35,14 @@ static_assert( std::endian::native == std::endian::little, "OpenRCT2 is known to be broken on big endian. Proceed with caution!"); -enum class SPECIAL_FOLDER +enum class SpecialFolder { - USER_CACHE, - USER_CONFIG, - USER_DATA, - USER_HOME, + userCache, + userConfig, + userData, + userHome, - RCT2_DISCORD, + rct2Discord, }; struct RealWorldDate; @@ -52,7 +52,7 @@ struct TTFFontDescriptor; namespace OpenRCT2::Platform { std::string GetEnvironmentVariable(std::string_view name); - std::string GetFolderPath(SPECIAL_FOLDER folder); + std::string GetFolderPath(SpecialFolder folder); std::string GetInstallPath(); std::string GetDocsPath(); std::string GetCurrentExecutablePath(); diff --git a/src/openrct2/platform/Platform.macOS.mm b/src/openrct2/platform/Platform.macOS.mm index ace348ec83..80a9edf710 100644 --- a/src/openrct2/platform/Platform.macOS.mm +++ b/src/openrct2/platform/Platform.macOS.mm @@ -30,19 +30,19 @@ namespace OpenRCT2::Platform { - std::string GetFolderPath(SPECIAL_FOLDER folder) + std::string GetFolderPath(SpecialFolder folder) { // macOS stores everything in ~/Library/Application Support/OpenRCT2 switch (folder) { - case SPECIAL_FOLDER::USER_CACHE: - case SPECIAL_FOLDER::USER_CONFIG: - case SPECIAL_FOLDER::USER_DATA: + case SpecialFolder::userCache: + case SpecialFolder::userConfig: + case SpecialFolder::userData: { - auto home = GetFolderPath(SPECIAL_FOLDER::USER_HOME); + auto home = GetFolderPath(SpecialFolder::userHome); return Path::Combine(home, "Library/Application Support"); } - case SPECIAL_FOLDER::USER_HOME: + case SpecialFolder::userHome: return GetHomePath(); default: return std::string(); diff --git a/src/openrct2/profiling/Profiling.cpp b/src/openrct2/profiling/Profiling.cpp index 63ea4ea107..cafb701446 100644 --- a/src/openrct2/profiling/Profiling.cpp +++ b/src/openrct2/profiling/Profiling.cpp @@ -163,7 +163,7 @@ namespace OpenRCT2::Profiling double avg = 0.0; if (func->GetCallCount() > 0) - avg = func->GetTotalTime() / func->GetCallCount(); + avg = func->getTotalTime() / func->GetCallCount(); out << avg << "\n"; } diff --git a/src/openrct2/profiling/Profiling.h b/src/openrct2/profiling/Profiling.h index 0d079d4712..4d09fac4d7 100644 --- a/src/openrct2/profiling/Profiling.h +++ b/src/openrct2/profiling/Profiling.h @@ -38,7 +38,7 @@ namespace OpenRCT2::Profiling virtual std::vector GetTimeSamples() const = 0; // Returns all time accumulated in microseconds. - virtual double GetTotalTime() const = 0; + virtual double getTotalTime() const = 0; // Returns the min. time in microseconds. virtual double GetMinTime() const = 0; @@ -118,7 +118,7 @@ namespace OpenRCT2::Profiling return { Children.begin(), Children.end() }; } - double GetTotalTime() const override + double getTotalTime() const override { std::scoped_lock lock(Mutex); return TotalTimeUs; diff --git a/src/openrct2/rct1/Csg.cpp b/src/openrct2/rct1/Csg.cpp index f115ac71b1..b82d735a47 100644 --- a/src/openrct2/rct1/Csg.cpp +++ b/src/openrct2/rct1/Csg.cpp @@ -80,8 +80,8 @@ bool CsgAtLocationIsUsable(u8string_view path) return false; } - auto fileHeader = FileStream(csg1HeaderPath, FILE_MODE_OPEN); - auto fileData = FileStream(csg1DataPath, FILE_MODE_OPEN); + auto fileHeader = FileStream(csg1HeaderPath, FileMode::open); + auto fileData = FileStream(csg1DataPath, FileMode::open); size_t fileHeaderSize = fileHeader.GetLength(); size_t fileDataSize = fileData.GetLength(); diff --git a/src/openrct2/rct1/RCT1.h b/src/openrct2/rct1/RCT1.h index 0049cb6958..2b70a4d72c 100644 --- a/src/openrct2/rct1/RCT1.h +++ b/src/openrct2/rct1/RCT1.h @@ -240,153 +240,153 @@ namespace OpenRCT2::RCT1 */ struct Ride { - RideType Type; // 0x000 - RCT1::VehicleType VehicleType; // 0x001 - uint16_t LifecycleFlags; // 0x002 - uint8_t OperatingMode; // 0x004 + RideType type; // 0x000 + RCT1::VehicleType vehicleType; // 0x001 + uint16_t lifecycleFlags; // 0x002 + uint8_t operatingMode; // 0x004 VehicleColourSettings vehicleColourSettings; // 0x005 struct { - colour_t Body; - colour_t Trim; - } VehicleColours[Limits::kMaxTrainsPerRide]; // 0x006 - colour_t TrackPrimaryColour; // 0x01E - colour_t TrackSecondaryColour; // 0x01F - colour_t TrackSupportColour; // 0x020 - uint8_t Status; // 0x021 - uint16_t Name; // 0x022 - uint16_t NameArgumentRide; // 0x024 - uint16_t NameArgumentNumber; // 0x026 - RCT12xy8 OverallView; // 0x028 - RCT12xy8 StationStarts[Limits::kMaxStationsPerRide]; // 0x02A - uint8_t StationHeights[Limits::kMaxStationsPerRide]; // 0x032 - uint8_t StationLengths[Limits::kMaxStationsPerRide]; // 0x036 - uint8_t StationLights[Limits::kMaxStationsPerRide]; // 0x03A - uint8_t StationDeparts[Limits::kMaxStationsPerRide]; // 0x03E - RCT12xy8 Entrances[Limits::kMaxStationsPerRide]; // 0x042 - RCT12xy8 Exits[Limits::kMaxStationsPerRide]; // 0x04A - uint16_t LastPeepInQueue[Limits::kMaxStationsPerRide]; // 0x052 - uint8_t NumPeepsInQueue[Limits::kMaxStationsPerRide]; // 0x05A - uint16_t Vehicles[Limits::kMaxTrainsPerRide]; // 0x05E - uint8_t DepartFlags; // 0x076 - uint8_t NumStations; // 0x077 - uint8_t NumTrains; // 0x078 - uint8_t NumCarsPerTrain; // 0x079 - uint8_t ProposedNumTrains; // 0x07A - uint8_t ProposedNumCarsPerTrain; // 0x07B - uint8_t MaxTrains; // 0x07C - uint8_t MinMaxCarsPerTrain; // 0x07D - uint8_t MinWaitingTime; // 0x07E - uint8_t MaxWaitingTime; // 0x07F - uint8_t OperationOption; // 0x080 - uint8_t BoatHireReturnDirection; // 0x081 - RCT12xy8 BoatHireReturnPosition; // 0x082 - uint8_t DataLoggingIndex; // 0x084 - uint8_t SpecialTrackElements; // 0x085 - uint16_t Unk6; // 0x086 - int32_t MaxSpeed; // 0x088 - int32_t AverageSpeed; // 0x08C - uint8_t CurrentTestSegment; // 0x090 - uint8_t AverageSpeedTestTimeout; // 0x091 - uint8_t Pad0E2[0x2]; // 0x092 - int32_t Length[Limits::kMaxStationsPerRide]; // 0x094 - uint16_t Time[Limits::kMaxStationsPerRide]; // 0x0A4 - fixed16_2dp MaxPositiveVerticalG; // 0x0AC - fixed16_2dp MaxNegativeVerticalG; // 0x0AE - fixed16_2dp MaxLateralG; // 0x0B0 - fixed16_2dp PreviousVerticalG; // 0x0B2 - fixed16_2dp PreviousLateralG; // 0x0B4 - uint8_t PadB6[0x2]; // 0x0B6 - uint32_t TestingFlags; // 0x0B8 + colour_t body; + colour_t trim; + } vehicleColours[Limits::kMaxTrainsPerRide]; // 0x006 + colour_t trackPrimaryColour; // 0x01E + colour_t trackSecondaryColour; // 0x01F + colour_t trackSupportColour; // 0x020 + uint8_t status; // 0x021 + uint16_t name; // 0x022 + uint16_t nameArgumentRide; // 0x024 + uint16_t nameArgumentNumber; // 0x026 + RCT12xy8 overallView; // 0x028 + RCT12xy8 stationStarts[Limits::kMaxStationsPerRide]; // 0x02A + uint8_t stationHeights[Limits::kMaxStationsPerRide]; // 0x032 + uint8_t stationLengths[Limits::kMaxStationsPerRide]; // 0x036 + uint8_t stationLights[Limits::kMaxStationsPerRide]; // 0x03A + uint8_t stationDeparts[Limits::kMaxStationsPerRide]; // 0x03E + RCT12xy8 entrances[Limits::kMaxStationsPerRide]; // 0x042 + RCT12xy8 exits[Limits::kMaxStationsPerRide]; // 0x04A + uint16_t lastPeepInQueue[Limits::kMaxStationsPerRide]; // 0x052 + uint8_t numPeepsInQueue[Limits::kMaxStationsPerRide]; // 0x05A + uint16_t vehicles[Limits::kMaxTrainsPerRide]; // 0x05E + uint8_t departFlags; // 0x076 + uint8_t numStations; // 0x077 + uint8_t numTrains; // 0x078 + uint8_t numCarsPerTrain; // 0x079 + uint8_t proposedNumTrains; // 0x07A + uint8_t proposedNumCarsPerTrain; // 0x07B + uint8_t maxTrains; // 0x07C + uint8_t minMaxCarsPerTrain; // 0x07D + uint8_t minWaitingTime; // 0x07E + uint8_t maxWaitingTime; // 0x07F + uint8_t operationOption; // 0x080 + uint8_t boatHireReturnDirection; // 0x081 + RCT12xy8 boatHireReturnPosition; // 0x082 + uint8_t dataLoggingIndex; // 0x084 + uint8_t specialTrackElements; // 0x085 + uint16_t unk6; // 0x086 + int32_t maxSpeed; // 0x088 + int32_t averageSpeed; // 0x08C + uint8_t currentTestSegment; // 0x090 + uint8_t averageSpeedTestTimeout; // 0x091 + uint8_t pad0E2[0x2]; // 0x092 + int32_t length[Limits::kMaxStationsPerRide]; // 0x094 + uint16_t time[Limits::kMaxStationsPerRide]; // 0x0A4 + fixed16_2dp maxPositiveVerticalG; // 0x0AC + fixed16_2dp maxNegativeVerticalG; // 0x0AE + fixed16_2dp maxLateralG; // 0x0B0 + fixed16_2dp previousVerticalG; // 0x0B2 + fixed16_2dp previousLateralG; // 0x0B4 + uint8_t padB6[0x2]; // 0x0B6 + uint32_t testingFlags; // 0x0B8 // x y map location of the current track piece during a test // this is to prevent counting special tracks multiple times - RCT12xy8 CurTestTrackLocation; // 0x0BC + RCT12xy8 curTestTrackLocation; // 0x0BC // Next 3 variables are related (XXXX XYYY ZZZa aaaa) - uint16_t TurnCountDefault; // 0x0BE X = current turn count - uint16_t TurnCountBanked; // 0x0C0 - uint16_t TurnCountSloped; // 0x0C2 X = number turns > 3 elements + uint16_t turnCountDefault; // 0x0BE X = current turn count + uint16_t turnCountBanked; // 0x0C0 + uint16_t turnCountSloped; // 0x0C2 X = number turns > 3 elements union { - uint8_t NumInversions; // 0x0C4 - uint8_t NumHoles; + uint8_t numInversions; // 0x0C4 + uint8_t numHoles; }; - uint8_t NumDrops; // 0x0C5 - uint8_t StartDropHeight; // 0x0C6 - uint8_t HighestDropHeight; // 0x0C7 - int32_t ShelteredLength; // 0x0C8 - uint8_t UnkCC[2]; // 0x0CC - uint8_t NumShelteredSections; // 0x0CE + uint8_t numDrops; // 0x0C5 + uint8_t startDropHeight; // 0x0C6 + uint8_t highestDropHeight; // 0x0C7 + int32_t shelteredLength; // 0x0C8 + uint8_t unkCC[2]; // 0x0CC + uint8_t numShelteredSections; // 0x0CE // see CurTestTrackLocation - uint8_t CurTestTrackZ; // 0x0CF - int16_t UnkD0; // 0x0D0 - int16_t UnkD2; // 0x0D2 + uint8_t curTestTrackZ; // 0x0CF + int16_t unkD0; // 0x0D0 + int16_t unkD2; // 0x0D2 // Customer count in the last 10 * 960 game ticks (sliding window) - uint16_t NumCustomers[Limits::kCustomerHistorySize]; // 0xD4 - money16 Price; // 0x0E8 - RCT12xy8 ChairliftBullwheelLocation[2]; // 0x0EA - uint8_t ChairliftBullwheelZ[2]; // 0x0EE + uint16_t numCustomers[Limits::kCustomerHistorySize]; // 0xD4 + money16 price; // 0x0E8 + RCT12xy8 chairliftBullwheelLocation[2]; // 0x0EA + uint8_t chairliftBullwheelZ[2]; // 0x0EE RatingTuple ratings; // 0x0F0 - money16 Value; // 0x0F6 - uint16_t ChairliftBullwheelRotation; // 0x0F8 - uint8_t Satisfaction; // 0x0FA - uint8_t SatisfactionTimeOut; // 0x0FB - uint8_t SatisfactionNext; // 0x0FC - uint8_t WindowInvalidateFlags; // 0x0FD - uint8_t UnkFE[2]; // 0x0FE - uint32_t TotalCustomers; // 0x100 - money32 TotalProfit; // 0x104 - uint8_t Popularity; // 0x108 - uint8_t PopularityTimeOut; // 0x109 - uint8_t PopularityNext; // 0x10A - uint8_t NumRiders; // 0x10B - uint8_t MusicTuneID; // 0x10C - uint8_t SlideInUse; // 0x10D + money16 value; // 0x0F6 + uint16_t chairliftBullwheelRotation; // 0x0F8 + uint8_t satisfaction; // 0x0FA + uint8_t satisfactionTimeOut; // 0x0FB + uint8_t satisfactionNext; // 0x0FC + uint8_t windowInvalidateFlags; // 0x0FD + uint8_t unkFE[2]; // 0x0FE + uint32_t totalCustomers; // 0x100 + money32 totalProfit; // 0x104 + uint8_t popularity; // 0x108 + uint8_t popularityTimeOut; // 0x109 + uint8_t popularityNext; // 0x10A + uint8_t numRiders; // 0x10B + uint8_t musicTuneID; // 0x10C + uint8_t slideInUse; // 0x10D union { - uint16_t SlidePeep; // 0x10E - uint16_t MazeTiles; // 0x10E + uint16_t slidePeep; // 0x10E + uint16_t mazeTiles; // 0x10E }; - uint8_t Pad110[0xE]; // 0x110 - uint8_t SlidePeepTshirtColour; // 0x11E - uint8_t Pad11F[0x7]; // 0x11F - uint8_t SpiralSlideProgress; // 0x126 - uint8_t Pad127[0x9]; // 0x127 - int16_t BuildDate; // 0x130 - money16 UpkeepCost; // 0x131 - uint16_t RaceWinner; // 0x132 - uint8_t Unk134[2]; // 0x134 - uint32_t MusicPosition; // 0x138 - uint8_t BreakdownReasonPending; // 0x13C - uint8_t MechanicStatus; // 0x13D - uint16_t Mechanic; // 0x13E - uint8_t InspectionStation; // 0x140 - uint8_t BrokenVehicle; // 0x141 - uint8_t BrokenCar; // 0x142 - uint8_t BreakdownReason; // 0x143 - money16 PriceSecondary; // 0x144 + uint8_t pad110[0xE]; // 0x110 + uint8_t slidePeepTshirtColour; // 0x11E + uint8_t pad11F[0x7]; // 0x11F + uint8_t spiralSlideProgress; // 0x126 + uint8_t pad127[0x9]; // 0x127 + int16_t buildDate; // 0x130 + money16 upkeepCost; // 0x131 + uint16_t raceWinner; // 0x132 + uint8_t unk134[2]; // 0x134 + uint32_t musicPosition; // 0x138 + uint8_t breakdownReasonPending; // 0x13C + uint8_t mechanicStatus; // 0x13D + uint16_t mechanic; // 0x13E + uint8_t inspectionStation; // 0x140 + uint8_t brokenTrain; // 0x141 + uint8_t brokenCar; // 0x142 + uint8_t breakdownReason; // 0x143 + money16 priceSecondary; // 0x144 union { struct { - uint8_t ReliabilitySubvalue; // 0x146, 0 - 255, acts like the decimals for ReliabilityPercentage - uint8_t ReliabilityPercentage; // 0x147, Starts at 100 and decreases from there. + uint8_t reliabilitySubvalue; // 0x146, 0 - 255, acts like the decimals for ReliabilityPercentage + uint8_t reliabilityPercentage; // 0x147, Starts at 100 and decreases from there. }; - uint16_t Reliability; // 0x146 + uint16_t reliability; // 0x146 }; - uint8_t UnreliabilityFactor; // 0x148 - uint8_t Downtime; // 0x149 - uint8_t InspectionInterval; // 0x14A - uint8_t LastInspection; // 0x14B - uint8_t Unk14C[20]; // 0x14C - money32 IncomePerHour; // 0x160 - money32 Profit; // 0x164 - uint8_t QueueTime[Limits::kMaxStationsPerRide]; // 0x168 - colour_t TrackColourMain[4]; // 0x16C - colour_t TrackColourAdditional[4]; // 0x170 - colour_t TrackColourSupports[4]; // 0x174 - uint8_t Music; // 0x178 - uint8_t EntranceStyle; // 0x179 - uint8_t Unk17A[230]; // 0x17A + uint8_t unreliabilityFactor; // 0x148 + uint8_t downtime; // 0x149 + uint8_t inspectionInterval; // 0x14A + uint8_t lastInspection; // 0x14B + uint8_t unk14C[20]; // 0x14C + money32 incomePerHour; // 0x160 + money32 profit; // 0x164 + uint8_t queueTime[Limits::kMaxStationsPerRide]; // 0x168 + colour_t trackColourMain[4]; // 0x16C + colour_t trackColourAdditional[4]; // 0x170 + colour_t trackColourSupports[4]; // 0x174 + uint8_t music; // 0x178 + uint8_t entranceStyle; // 0x179 + uint8_t unk17A[230]; // 0x17A }; static_assert(sizeof(Ride) == 0x260); @@ -505,7 +505,7 @@ namespace OpenRCT2::RCT1 uint8_t GetTrackDirection() const { - return TrackTypeAndDirection & RCT12VehicleTrackDirectionMask; + return TrackTypeAndDirection & kRCT12VehicleTrackDirectionMask; } }; @@ -703,7 +703,7 @@ namespace OpenRCT2::RCT1 RCT12EntityLitter Litter; RCT12EntityBalloon Balloon; RCT12EntityDuck Duck; - RCT12EntityJumpingFountain JumpingFountain; + RCT12EntityJumpingFountain JumpingFountain{}; RCT12EntityMoneyEffect MoneyEffect; RCT12EntityCrashedVehicleParticle CrashedVehicleParticle; RCT12EntityCrashSplash CrashSplash; @@ -876,7 +876,7 @@ namespace OpenRCT2::RCT1 uint8_t StaffModes[Limits::kMaxStaff]; uint8_t Unk1F431E[4]; uint8_t Unk1F4322[8]; - uint8_t Climate; + RCT12::ClimateType Climate; uint8_t Unk1F432B; uint16_t WeatherUpdateTimer; uint8_t Weather; @@ -889,7 +889,8 @@ namespace OpenRCT2::RCT1 uint8_t TargetWeatherGloom; uint8_t Rain; uint8_t TargetRain; - RCT12NewsItem Messages[Limits::MaxNewsItems]; + RCT12NewsItem recentMessages[Limits::kMaxRecentNewsItems]; + RCT12NewsItem archivedMessages[Limits::kMaxArchivedNewsItems]; char ScenarioName[62]; uint16_t ScenarioSlotIndex; uint32_t ScenarioFlags; diff --git a/src/openrct2/rct1/S4Importer.cpp b/src/openrct2/rct1/S4Importer.cpp index 1a9741a587..21c1b36cb9 100644 --- a/src/openrct2/rct1/S4Importer.cpp +++ b/src/openrct2/rct1/S4Importer.cpp @@ -52,6 +52,7 @@ #include "../object/PeepAnimationsObject.h" #include "../object/ScenarioTextObject.h" #include "../park/Legacy.h" +#include "../park/ParkPreview.h" #include "../peep/RideUseSystem.h" #include "../rct12/CSStringConverter.h" #include "../rct12/EntryList.h" @@ -62,7 +63,6 @@ #include "../ride/Track.h" #include "../ride/TrainManager.h" #include "../ride/Vehicle.h" -#include "../scenario/Scenario.h" #include "../scenario/ScenarioRepository.h" #include "../scenario/ScenarioSources.h" #include "../world/Climate.h" @@ -145,16 +145,16 @@ namespace OpenRCT2::RCT1 IScenarioRepository* _scenarioRepository = GetScenarioRepository(); public: - ParkLoadResult Load(const u8string& path) override + ParkLoadResult Load(const u8string& path, const bool skipObjectCheck) override { const auto extension = Path::GetExtension(path); if (String::iequals(extension, ".sc4")) { - return LoadScenario(path); + return LoadScenario(path, skipObjectCheck); } if (String::iequals(extension, ".sv4")) { - return LoadSavedGame(path); + return LoadSavedGame(path, skipObjectCheck); } throw std::runtime_error("Invalid RCT1 park extension."); @@ -162,14 +162,14 @@ namespace OpenRCT2::RCT1 ParkLoadResult LoadSavedGame(const u8string& path, bool skipObjectCheck = false) override { - auto fs = FileStream(path, FILE_MODE_OPEN); + auto fs = FileStream(path, FileMode::open); auto result = LoadFromStream(&fs, false, skipObjectCheck, path); return result; } ParkLoadResult LoadScenario(const u8string& path, bool skipObjectCheck = false) override { - auto fs = FileStream(path, FILE_MODE_OPEN); + auto fs = FileStream(path, FileMode::open); auto result = LoadFromStream(&fs, true, skipObjectCheck, path); return result; } @@ -225,7 +225,7 @@ namespace OpenRCT2::RCT1 RestrictAllMiscScenery(); } - bool GetDetails(ScenarioIndexEntry* dst) override + bool PopulateIndexEntry(ScenarioIndexEntry* dst) override { *dst = {}; @@ -272,7 +272,7 @@ namespace OpenRCT2::RCT1 std::lock_guard lock(mtx); // Unload loaded scenario text object, if any. - if (auto* obj = objManager.GetLoadedObject(ObjectType::scenarioText, 0); obj != nullptr) + if (auto* obj = objManager.GetLoadedObject(0); obj != nullptr) objManager.UnloadObjects({ obj->GetDescriptor() }); // Load the one specified @@ -290,6 +290,11 @@ namespace OpenRCT2::RCT1 return true; } + ParkPreview GetParkPreview() override + { + return {}; + } + money64 CorrectRCT1ParkValue(money32 oldParkValue) { if (oldParkValue == kMoney32Undefined) @@ -350,13 +355,13 @@ namespace OpenRCT2::RCT1 uint16_t mapSize = _s4.MapSize == 0 ? Limits::kMaxMapSize : _s4.MapSize; - gameState.ScenarioFileName = GetRCT1ScenarioName(); + gameState.scenarioFileName = GetRCT1ScenarioName(); // Do map initialisation, same kind of stuff done when loading scenario editor gameStateInitAll(gameState, { mapSize, mapSize }); - gameState.EditorStep = EditorStep::ObjectSelection; - gameState.Park.Flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; - gameState.ScenarioCategory = SCENARIO_CATEGORY_OTHER; + gameState.editorStep = EditorStep::ObjectSelection; + gameState.park.Flags |= PARK_FLAGS_SHOW_REAL_GUEST_NAMES; + gameState.scenarioCategory = ScenarioCategory::other; } std::string GetRCT1ScenarioName() @@ -559,12 +564,12 @@ namespace OpenRCT2::RCT1 for (size_t i = 0; i < std::size(_s4.Rides); i++) { auto ride = &_s4.Rides[i]; - if (ride->Type != RideType::Null) + if (ride->type != RideType::Null) { - if (RCT1::RideTypeUsesVehicles(ride->Type)) - AddEntryForVehicleType(ride->Type, ride->VehicleType); + if (RCT1::RideTypeUsesVehicles(ride->type)) + AddEntryForVehicleType(ride->type, ride->vehicleType); else - AddEntryForRideType(ride->Type); + AddEntryForRideType(ride->type); } } } @@ -827,7 +832,7 @@ namespace OpenRCT2::RCT1 { for (int32_t i = 0; i < Limits::kMaxRidesInPark; i++) { - if (_s4.Rides[i].Type != RideType::Null) + if (_s4.Rides[i].type != RideType::Null) { const auto rideId = RideId::FromUnderlying(i); ImportRide(RideAllocateAtIndex(rideId), &_s4.Rides[i], rideId); @@ -841,22 +846,22 @@ namespace OpenRCT2::RCT1 dst->id = rideIndex; // This is a peculiarity of this exact version number, which only Heide-Park seems to use. - if (_s4.GameVersion == 110018 && src->Type == RideType::InvertedRollerCoaster) + if (_s4.GameVersion == 110018 && src->type == RideType::InvertedRollerCoaster) { dst->type = RIDE_TYPE_COMPACT_INVERTED_COASTER; } else { - dst->type = RCT1::GetRideType(src->Type, src->VehicleType); + dst->type = RCT1::GetRideType(src->type, src->vehicleType); } - if (RCT1::RideTypeUsesVehicles(src->Type)) + if (RCT1::RideTypeUsesVehicles(src->type)) { - dst->subtype = _vehicleTypeToRideEntryMap[EnumValue(src->VehicleType)]; + dst->subtype = _vehicleTypeToRideEntryMap[EnumValue(src->vehicleType)]; } else { - dst->subtype = _rideTypeToRideEntryMap[EnumValue(src->Type)]; + dst->subtype = _rideTypeToRideEntryMap[EnumValue(src->type)]; } const auto* rideEntry = GetRideEntryByIndex(dst->subtype); @@ -869,77 +874,77 @@ namespace OpenRCT2::RCT1 } // Ride name - if (IsUserStringID(src->Name)) + if (IsUserStringID(src->name)) { - dst->custom_name = GetUserString(src->Name); + dst->customName = GetUserString(src->name); } - dst->status = static_cast(src->Status); + dst->status = static_cast(src->status); // Flags - dst->lifecycle_flags = src->LifecycleFlags; + dst->lifecycleFlags = src->lifecycleFlags; // These flags were not in the base game if (_gameVersion == FILE_VERSION_RCT1) { - dst->lifecycle_flags &= ~RIDE_LIFECYCLE_MUSIC; - dst->lifecycle_flags &= ~RIDE_LIFECYCLE_INDESTRUCTIBLE; - dst->lifecycle_flags &= ~RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK; + dst->lifecycleFlags &= ~RIDE_LIFECYCLE_MUSIC; + dst->lifecycleFlags &= ~RIDE_LIFECYCLE_INDESTRUCTIBLE; + dst->lifecycleFlags &= ~RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK; } - if (VehicleTypeIsReversed(src->VehicleType)) + if (VehicleTypeIsReversed(src->vehicleType)) { - dst->lifecycle_flags |= RIDE_LIFECYCLE_REVERSED_TRAINS; + dst->lifecycleFlags |= RIDE_LIFECYCLE_REVERSED_TRAINS; } // Station - if (src->OverallView.IsNull()) + if (src->overallView.IsNull()) { - dst->overall_view.SetNull(); + dst->overallView.SetNull(); } else { - dst->overall_view = TileCoordsXY{ src->OverallView.x, src->OverallView.y }.ToCoordsXY(); + dst->overallView = TileCoordsXY{ src->overallView.x, src->overallView.y }.ToCoordsXY(); } for (StationIndex::UnderlyingType i = 0; i < Limits::kMaxStationsPerRide; i++) { - auto& dstStation = dst->GetStation(StationIndex::FromUnderlying(i)); - if (src->StationStarts[i].IsNull()) + auto& dstStation = dst->getStation(StationIndex::FromUnderlying(i)); + if (src->stationStarts[i].IsNull()) { dstStation.Start.SetNull(); } else { - auto tileStartLoc = TileCoordsXY{ src->StationStarts[i].x, src->StationStarts[i].y }; + auto tileStartLoc = TileCoordsXY{ src->stationStarts[i].x, src->stationStarts[i].y }; dstStation.Start = tileStartLoc.ToCoordsXY(); } - dstStation.SetBaseZ(src->StationHeights[i] * Limits::kCoordsZStep); - dstStation.Length = src->StationLengths[i]; - dstStation.Depart = src->StationLights[i]; + dstStation.SetBaseZ(src->stationHeights[i] * Limits::kCoordsZStep); + dstStation.Length = src->stationLengths[i]; + dstStation.Depart = src->stationLights[i]; - dstStation.TrainAtStation = src->StationDeparts[i]; + dstStation.TrainAtStation = src->stationDeparts[i]; // Direction is fixed later. - if (src->Entrances[i].IsNull()) + if (src->entrances[i].IsNull()) dstStation.Entrance.SetNull(); else - dstStation.Entrance = { src->Entrances[i].x, src->Entrances[i].y, src->StationHeights[i] / 2, 0 }; + dstStation.Entrance = { src->entrances[i].x, src->entrances[i].y, src->stationHeights[i] / 2, 0 }; - if (src->Exits[i].IsNull()) + if (src->exits[i].IsNull()) dstStation.Exit.SetNull(); else - dstStation.Exit = { src->Exits[i].x, src->Exits[i].y, src->StationHeights[i] / 2, 0 }; + dstStation.Exit = { src->exits[i].x, src->exits[i].y, src->stationHeights[i] / 2, 0 }; - dstStation.QueueTime = src->QueueTime[i]; - dstStation.LastPeepInQueue = EntityId::FromUnderlying(src->LastPeepInQueue[i]); - dstStation.QueueLength = src->NumPeepsInQueue[i]; + dstStation.QueueTime = src->queueTime[i]; + dstStation.LastPeepInQueue = EntityId::FromUnderlying(src->lastPeepInQueue[i]); + dstStation.QueueLength = src->numPeepsInQueue[i]; - dstStation.SegmentTime = src->Time[i]; - dstStation.SegmentLength = src->Length[i]; + dstStation.SegmentTime = src->time[i]; + dstStation.SegmentLength = src->length[i]; } // All other values take 0 as their default. Since they're already memset to that, no need to do it again. for (int32_t i = Limits::kMaxStationsPerRide; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) { - auto& dstStation = dst->GetStation(StationIndex::FromUnderlying(i)); + auto& dstStation = dst->getStation(StationIndex::FromUnderlying(i)); dstStation.Start.SetNull(); dstStation.TrainAtStation = RideStation::kNoTrain; dstStation.Entrance.SetNull(); @@ -947,38 +952,38 @@ namespace OpenRCT2::RCT1 dstStation.LastPeepInQueue = EntityId::GetNull(); } - dst->num_stations = src->NumStations; + dst->numStations = src->numStations; // Vehicle links (indexes converted later) for (int32_t i = 0; i < Limits::kMaxTrainsPerRide; i++) { - dst->vehicles[i] = EntityId::FromUnderlying(src->Vehicles[i]); + dst->vehicles[i] = EntityId::FromUnderlying(src->vehicles[i]); } for (int32_t i = Limits::kMaxTrainsPerRide; i <= OpenRCT2::Limits::kMaxTrainsPerRide; i++) { dst->vehicles[i] = EntityId::GetNull(); } - dst->NumTrains = src->NumTrains; - dst->num_cars_per_train = src->NumCarsPerTrain + rideEntry->zero_cars; - dst->ProposedNumTrains = src->NumTrains; - dst->max_trains = src->MaxTrains; - dst->proposed_num_cars_per_train = src->NumCarsPerTrain + rideEntry->zero_cars; - dst->special_track_elements = src->SpecialTrackElements; - dst->num_sheltered_sections = src->NumShelteredSections; - dst->sheltered_length = src->ShelteredLength; + dst->numTrains = src->numTrains; + dst->numCarsPerTrain = src->numCarsPerTrain + rideEntry->zero_cars; + dst->proposedNumTrains = src->numTrains; + dst->maxTrains = src->maxTrains; + dst->proposedNumCarsPerTrain = src->numCarsPerTrain + rideEntry->zero_cars; + dst->specialTrackElements = src->specialTrackElements; + dst->numShelteredSections = src->numShelteredSections; + dst->shelteredLength = src->shelteredLength; // Operation - dst->depart_flags = src->DepartFlags; - dst->min_waiting_time = src->MinWaitingTime; - dst->max_waiting_time = src->MaxWaitingTime; - dst->operation_option = src->OperationOption; - dst->num_circuits = 1; - dst->MinCarsPerTrain = rideEntry->min_cars_in_train; - dst->MaxCarsPerTrain = rideEntry->max_cars_in_train; + dst->departFlags = src->departFlags; + dst->minWaitingTime = src->minWaitingTime; + dst->maxWaitingTime = src->maxWaitingTime; + dst->operationOption = src->operationOption; + dst->numCircuits = 1; + dst->minCarsPerTrain = rideEntry->min_cars_in_train; + dst->maxCarsPerTrain = rideEntry->max_cars_in_train; // RCT1 used 5mph / 8 km/h for every lift hill - dst->lift_hill_speed = 5; + dst->liftHillSpeed = 5; dst->music = kObjectEntryIndexNull; if (GetRideTypeDescriptor(dst->type).HasFlag(RtdFlag::allowMusic)) @@ -994,122 +999,122 @@ namespace OpenRCT2::RCT1 // Only merry-go-round and dodgems had music and used // the same flag as synchronise stations for the option to enable it - if (src->Type == RideType::MerryGoRound || src->Type == RideType::Dodgems) + if (src->type == RideType::MerryGoRound || src->type == RideType::Dodgems) { - if (src->DepartFlags & RCT1_RIDE_DEPART_PLAY_MUSIC) + if (src->departFlags & RCT1_RIDE_DEPART_PLAY_MUSIC) { - dst->depart_flags &= ~RCT1_RIDE_DEPART_PLAY_MUSIC; - dst->lifecycle_flags |= RIDE_LIFECYCLE_MUSIC; + dst->departFlags &= ~RCT1_RIDE_DEPART_PLAY_MUSIC; + dst->lifecycleFlags |= RIDE_LIFECYCLE_MUSIC; } } } else { - dst->music = src->Music; + dst->music = src->music; } } - if (src->OperatingMode == RCT1_RIDE_MODE_POWERED_LAUNCH) + if (src->operatingMode == RCT1_RIDE_MODE_POWERED_LAUNCH) { // Launched rides never passed through the station in RCT1. - dst->mode = RideMode::PoweredLaunch; + dst->mode = RideMode::poweredLaunch; } else { - dst->mode = static_cast(src->OperatingMode); + dst->mode = static_cast(src->operatingMode); } SetRideColourScheme(dst, src); // Maintenance - dst->build_date = static_cast(src->BuildDate); - dst->inspection_interval = src->InspectionInterval; - dst->last_inspection = src->LastInspection; - dst->reliability = src->Reliability; - dst->unreliability_factor = src->UnreliabilityFactor; - dst->downtime = src->Downtime; - dst->breakdown_reason = src->BreakdownReason; - dst->mechanic_status = src->MechanicStatus; - dst->mechanic = EntityId::FromUnderlying(src->Mechanic); - dst->breakdown_reason_pending = src->BreakdownReasonPending; - dst->inspection_station = StationIndex::FromUnderlying(src->InspectionStation); - dst->broken_car = src->BrokenCar; - dst->broken_vehicle = src->BrokenVehicle; + dst->buildDate = static_cast(src->buildDate); + dst->inspectionInterval = src->inspectionInterval; + dst->lastInspection = src->lastInspection; + dst->reliability = src->reliability; + dst->unreliabilityFactor = src->unreliabilityFactor; + dst->downtime = src->downtime; + dst->breakdownReason = src->breakdownReason; + dst->mechanicStatus = src->mechanicStatus; + dst->mechanic = EntityId::FromUnderlying(src->mechanic); + dst->breakdownReasonPending = src->breakdownReasonPending; + dst->inspectionStation = StationIndex::FromUnderlying(src->inspectionStation); + dst->brokenCar = src->brokenCar; + dst->brokenTrain = src->brokenTrain; // Measurement data dst->ratings = src->ratings; - dst->max_speed = src->MaxSpeed; - dst->average_speed = src->AverageSpeed; + dst->maxSpeed = src->maxSpeed; + dst->averageSpeed = src->averageSpeed; - dst->max_positive_vertical_g = src->MaxPositiveVerticalG; - dst->max_negative_vertical_g = src->MaxNegativeVerticalG; - dst->max_lateral_g = src->MaxLateralG; - dst->previous_lateral_g = src->PreviousLateralG; - dst->previous_vertical_g = src->PreviousVerticalG; - dst->turn_count_banked = src->TurnCountBanked; - dst->turn_count_default = src->TurnCountDefault; - dst->turn_count_sloped = src->TurnCountSloped; - dst->dropsPoweredLifts = src->NumDrops; - dst->start_drop_height = src->StartDropHeight / 2; - dst->highest_drop_height = src->HighestDropHeight / 2; - if (src->Type == RideType::MiniatureGolf) - dst->holes = src->NumInversions & kRCT12InversionAndHoleMask; + dst->maxPositiveVerticalG = src->maxPositiveVerticalG; + dst->maxNegativeVerticalG = src->maxNegativeVerticalG; + dst->maxLateralG = src->maxLateralG; + dst->previousLateralG = src->previousLateralG; + dst->previousVerticalG = src->previousVerticalG; + dst->turnCountBanked = src->turnCountBanked; + dst->turnCountDefault = src->turnCountDefault; + dst->turnCountSloped = src->turnCountSloped; + dst->dropsPoweredLifts = src->numDrops; + dst->startDropHeight = src->startDropHeight / 2; + dst->highestDropHeight = src->highestDropHeight / 2; + if (src->type == RideType::MiniatureGolf) + dst->holes = src->numInversions & kRCT12InversionAndHoleMask; else - dst->inversions = src->NumInversions & kRCT12InversionAndHoleMask; - dst->sheltered_eighths = src->NumInversions >> 5; - dst->boat_hire_return_direction = src->BoatHireReturnDirection; - dst->boat_hire_return_position = { src->BoatHireReturnPosition.x, src->BoatHireReturnPosition.y }; - dst->chairlift_bullwheel_rotation = src->ChairliftBullwheelRotation; + dst->inversions = src->numInversions & kRCT12InversionAndHoleMask; + dst->shelteredEighths = src->numInversions >> 5; + dst->boatHireReturnDirection = src->boatHireReturnDirection; + dst->boatHireReturnPosition = { src->boatHireReturnPosition.x, src->boatHireReturnPosition.y }; + dst->chairliftBullwheelRotation = src->chairliftBullwheelRotation; for (int i = 0; i < 2; i++) { - dst->ChairliftBullwheelLocation[i] = { src->ChairliftBullwheelLocation[i].x, - src->ChairliftBullwheelLocation[i].y, src->ChairliftBullwheelZ[i] / 2 }; + dst->chairliftBullwheelLocation[i] = { src->chairliftBullwheelLocation[i].x, + src->chairliftBullwheelLocation[i].y, src->chairliftBullwheelZ[i] / 2 }; } - if (src->CurTestTrackLocation.IsNull()) + if (src->curTestTrackLocation.IsNull()) { - dst->CurTestTrackLocation.SetNull(); + dst->curTestTrackLocation.SetNull(); } else { - dst->CurTestTrackLocation = { src->CurTestTrackLocation.x, src->CurTestTrackLocation.y, - src->CurTestTrackZ / 2 }; + dst->curTestTrackLocation = { src->curTestTrackLocation.x, src->curTestTrackLocation.y, + src->curTestTrackZ / 2 }; } - dst->testing_flags = src->TestingFlags; - dst->current_test_segment = src->CurrentTestSegment; - dst->current_test_station = StationIndex::GetNull(); - dst->average_speed_test_timeout = src->AverageSpeedTestTimeout; - dst->slide_in_use = src->SlideInUse; - dst->slide_peep_t_shirt_colour = RCT1::GetColour(src->SlidePeepTshirtColour); - dst->spiral_slide_progress = src->SpiralSlideProgress; - // Doubles as slide_peep - dst->maze_tiles = src->MazeTiles; + dst->testingFlags.holder = src->testingFlags; + dst->currentTestSegment = src->currentTestSegment; + dst->currentTestStation = StationIndex::GetNull(); + dst->averageSpeedTestTimeout = src->averageSpeedTestTimeout; + dst->slideInUse = src->slideInUse; + dst->slidePeepTShirtColour = RCT1::GetColour(src->slidePeepTshirtColour); + dst->spiralSlideProgress = src->spiralSlideProgress; + // Doubles as slidePeep + dst->mazeTiles = src->mazeTiles; // Finance / customers - dst->upkeep_cost = ToMoney64(src->UpkeepCost); - dst->price[0] = src->Price; - dst->price[1] = src->PriceSecondary; - dst->income_per_hour = ToMoney64(src->IncomePerHour); - dst->total_customers = src->TotalCustomers; - dst->profit = ToMoney64(src->Profit); - dst->total_profit = ToMoney64(src->TotalProfit); - dst->value = ToMoney64(src->Value); - for (size_t i = 0; i < std::size(src->NumCustomers); i++) + dst->upkeepCost = ToMoney64(src->upkeepCost); + dst->price[0] = src->price; + dst->price[1] = src->priceSecondary; + dst->incomePerHour = ToMoney64(src->incomePerHour); + dst->totalCustomers = src->totalCustomers; + dst->profit = ToMoney64(src->profit); + dst->totalProfit = ToMoney64(src->totalProfit); + dst->value = ToMoney64(src->value); + for (size_t i = 0; i < std::size(src->numCustomers); i++) { - dst->num_customers[i] = src->NumCustomers[i]; + dst->numCustomers[i] = src->numCustomers[i]; } - dst->satisfaction = src->Satisfaction; - dst->satisfaction_time_out = src->SatisfactionTimeOut; - dst->satisfaction_next = src->SatisfactionNext; - dst->popularity = src->Popularity; - dst->popularity_next = src->PopularityNext; - dst->popularity_time_out = src->PopularityTimeOut; + dst->satisfaction = src->satisfaction; + dst->satisfactionTimeout = src->satisfactionTimeOut; + dst->satisfactionNext = src->satisfactionNext; + dst->popularity = src->popularity; + dst->popularityNext = src->popularityNext; + dst->popularityTimeout = src->popularityTimeOut; - dst->num_riders = src->NumRiders; + dst->numRiders = src->numRiders; - dst->music_tune_id = kTuneIDNull; + dst->musicTuneId = kTuneIDNull; } void SetRideColourScheme(::Ride* dst, RCT1::Ride* src) @@ -1118,105 +1123,105 @@ namespace OpenRCT2::RCT1 dst->vehicleColourSettings = src->vehicleColourSettings; if (_gameVersion == FILE_VERSION_RCT1) { - dst->track_colour[0].main = RCT1::GetColour(src->TrackPrimaryColour); - dst->track_colour[0].additional = RCT1::GetColour(src->TrackSecondaryColour); - dst->track_colour[0].supports = RCT1::GetColour(src->TrackSupportColour); + dst->trackColours[0].main = RCT1::GetColour(src->trackPrimaryColour); + dst->trackColours[0].additional = RCT1::GetColour(src->trackSecondaryColour); + dst->trackColours[0].supports = RCT1::GetColour(src->trackSupportColour); // Balloons were always blue in the original RCT. - if (src->Type == RideType::BalloonStall) + if (src->type == RideType::BalloonStall) { - dst->track_colour[0].main = COLOUR_LIGHT_BLUE; + dst->trackColours[0].main = COLOUR_LIGHT_BLUE; } - else if (src->Type == RideType::RiverRapids) + else if (src->type == RideType::RiverRapids) { - dst->track_colour[0].main = COLOUR_WHITE; + dst->trackColours[0].main = COLOUR_WHITE; } } else { for (int i = 0; i < Limits::kNumColourSchemes; i++) { - dst->track_colour[i].main = RCT1::GetColour(src->TrackColourMain[i]); - dst->track_colour[i].additional = RCT1::GetColour(src->TrackColourAdditional[i]); - dst->track_colour[i].supports = RCT1::GetColour(src->TrackColourSupports[i]); + dst->trackColours[i].main = RCT1::GetColour(src->trackColourMain[i]); + dst->trackColours[i].additional = RCT1::GetColour(src->trackColourAdditional[i]); + dst->trackColours[i].supports = RCT1::GetColour(src->trackColourSupports[i]); } } - dst->entrance_style = kObjectEntryIndexNull; - if (dst->GetRideTypeDescriptor().HasFlag(RtdFlag::hasEntranceAndExit)) + dst->entranceStyle = kObjectEntryIndexNull; + if (dst->getRideTypeDescriptor().HasFlag(RtdFlag::hasEntranceAndExit)) { // Entrance styles were introduced with AA. They correspond directly with those in RCT2. if (_gameVersion == FILE_VERSION_RCT1) { - dst->entrance_style = 0; // plain entrance + dst->entranceStyle = 0; // plain entrance } else { - dst->entrance_style = src->EntranceStyle; + dst->entranceStyle = src->entranceStyle; } } - if (_gameVersion < FILE_VERSION_RCT1_LL && src->Type == RideType::MerryGoRound) + if (_gameVersion < FILE_VERSION_RCT1_LL && src->type == RideType::MerryGoRound) { // The merry-go-round in pre-LL versions was always yellow with red - dst->vehicle_colours[0].Body = COLOUR_YELLOW; - dst->vehicle_colours[0].Trim = COLOUR_BRIGHT_RED; + dst->vehicleColours[0].Body = COLOUR_YELLOW; + dst->vehicleColours[0].Trim = COLOUR_BRIGHT_RED; } else { for (int i = 0; i < Limits::kMaxTrainsPerRide; i++) { // RCT1 had no third colour - const auto colourSchemeCopyDescriptor = GetColourSchemeCopyDescriptor(src->VehicleType); + const auto colourSchemeCopyDescriptor = GetColourSchemeCopyDescriptor(src->vehicleType); if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_1) { - dst->vehicle_colours[i].Body = RCT1::GetColour(src->VehicleColours[i].Body); + dst->vehicleColours[i].Body = RCT1::GetColour(src->vehicleColours[i].body); } else if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_2) { - dst->vehicle_colours[i].Body = RCT1::GetColour(src->VehicleColours[i].Trim); + dst->vehicleColours[i].Body = RCT1::GetColour(src->vehicleColours[i].trim); } else { - dst->vehicle_colours[i].Body = colourSchemeCopyDescriptor.colour1; + dst->vehicleColours[i].Body = colourSchemeCopyDescriptor.colour1; } if (colourSchemeCopyDescriptor.colour2 == COPY_COLOUR_1) { - dst->vehicle_colours[i].Trim = RCT1::GetColour(src->VehicleColours[i].Body); + dst->vehicleColours[i].Trim = RCT1::GetColour(src->vehicleColours[i].body); } else if (colourSchemeCopyDescriptor.colour2 == COPY_COLOUR_2) { - dst->vehicle_colours[i].Trim = RCT1::GetColour(src->VehicleColours[i].Trim); + dst->vehicleColours[i].Trim = RCT1::GetColour(src->vehicleColours[i].trim); } else { - dst->vehicle_colours[i].Trim = colourSchemeCopyDescriptor.colour2; + dst->vehicleColours[i].Trim = colourSchemeCopyDescriptor.colour2; } if (colourSchemeCopyDescriptor.colour3 == COPY_COLOUR_1) { - dst->vehicle_colours[i].Tertiary = RCT1::GetColour(src->VehicleColours[i].Body); + dst->vehicleColours[i].Tertiary = RCT1::GetColour(src->vehicleColours[i].body); } else if (colourSchemeCopyDescriptor.colour3 == COPY_COLOUR_2) { - dst->vehicle_colours[i].Tertiary = RCT1::GetColour(src->VehicleColours[i].Trim); + dst->vehicleColours[i].Tertiary = RCT1::GetColour(src->vehicleColours[i].trim); } else { - dst->vehicle_colours[i].Tertiary = colourSchemeCopyDescriptor.colour3; + dst->vehicleColours[i].Tertiary = colourSchemeCopyDescriptor.colour3; } } } // In RCT1 and AA, the maze was always hedges. // LL has 4 types, like RCT2. For LL, only guard against invalid values. - if (src->Type == RideType::HedgeMaze) + if (src->type == RideType::HedgeMaze) { - if (_gameVersion < FILE_VERSION_RCT1_LL || src->TrackColourSupports[0] > 3) - dst->track_colour[0].supports = MAZE_WALL_TYPE_HEDGE; + if (_gameVersion < FILE_VERSION_RCT1_LL || src->trackColourSupports[0] > 3) + dst->trackColours[0].supports = MazeWallType::hedges; else - dst->track_colour[0].supports = src->TrackColourSupports[0]; + dst->trackColours[0].supports = src->trackColourSupports[0]; } } @@ -1224,7 +1229,7 @@ namespace OpenRCT2::RCT1 { for (const auto& src : _s4.RideMeasurements) { - if (src.RideIndex != RCT12_RIDE_ID_NULL) + if (src.RideIndex != kRCT12RideIdNull) { auto ride = GetRide(RCT12RideIdToOpenRCT2RideId(src.RideIndex)); if (ride != nullptr) @@ -1293,7 +1298,7 @@ namespace OpenRCT2::RCT1 { const auto& srcRide = _s4.Rides[src->Ride]; RCT1::VehicleColourSchemeCopyDescriptor colourSchemeCopyDescriptor = RCT1::GetColourSchemeCopyDescriptor( - srcRide.VehicleType); + srcRide.vehicleType); // RCT1 had no third colour if (colourSchemeCopyDescriptor.colour1 == COPY_COLOUR_1) @@ -1396,7 +1401,7 @@ namespace OpenRCT2::RCT1 dst->PathfindGoal.x = 0xFF; dst->PathfindGoal.y = 0xFF; dst->PathfindGoal.z = 0xFF; - dst->PathfindGoal.direction = INVALID_DIRECTION; + dst->PathfindGoal.direction = kInvalidDirection; } void ImportStaffPatrolArea(Staff* staffmember, uint8_t staffId) @@ -1456,54 +1461,54 @@ namespace OpenRCT2::RCT1 void ImportPeepSpawns(GameState_t& gameState) { - gameState.PeepSpawns.clear(); + gameState.peepSpawns.clear(); for (size_t i = 0; i < Limits::kMaxPeepSpawns; i++) { - if (_s4.PeepSpawn[i].x != RCT12_PEEP_SPAWN_UNDEFINED) + if (_s4.PeepSpawn[i].x != kRCT12PeepSpawnUndefined) { PeepSpawn spawn = { _s4.PeepSpawn[i].x, _s4.PeepSpawn[i].y, _s4.PeepSpawn[i].z * 16, _s4.PeepSpawn[i].direction }; - gameState.PeepSpawns.push_back(spawn); + gameState.peepSpawns.push_back(spawn); } } } void ImportFinance(GameState_t& gameState) { - gameState.Park.EntranceFee = _s4.ParkEntranceFee; - gameState.LandPrice = ToMoney64(_s4.LandPrice); - gameState.ConstructionRightsPrice = ToMoney64(_s4.ConstructionRightsPrice); + gameState.park.EntranceFee = _s4.ParkEntranceFee; + gameState.landPrice = ToMoney64(_s4.LandPrice); + gameState.constructionRightsPrice = ToMoney64(_s4.ConstructionRightsPrice); - gameState.Cash = ToMoney64(_s4.Cash); - gameState.BankLoan = ToMoney64(_s4.Loan); - gameState.MaxBankLoan = ToMoney64(_s4.MaxLoan); + gameState.cash = ToMoney64(_s4.Cash); + gameState.bankLoan = ToMoney64(_s4.Loan); + gameState.maxBankLoan = ToMoney64(_s4.MaxLoan); // It's more like 1.33%, but we can only use integers. Can be fixed once we have our own save format. - gameState.BankLoanInterestRate = 1; - gameState.InitialCash = ToMoney64(_s4.Cash); + gameState.bankLoanInterestRate = 1; + gameState.initialCash = ToMoney64(_s4.Cash); - gameState.CompanyValue = ToMoney64(_s4.CompanyValue); - gameState.Park.Value = CorrectRCT1ParkValue(_s4.ParkValue); - gameState.CurrentProfit = ToMoney64(_s4.Profit); + gameState.companyValue = ToMoney64(_s4.CompanyValue); + gameState.park.Value = CorrectRCT1ParkValue(_s4.ParkValue); + gameState.currentProfit = ToMoney64(_s4.Profit); for (size_t i = 0; i < Limits::kFinanceGraphSize; i++) { - gameState.CashHistory[i] = ToMoney64(_s4.CashHistory[i]); - gameState.Park.ValueHistory[i] = CorrectRCT1ParkValue(_s4.ParkValueHistory[i]); - gameState.WeeklyProfitHistory[i] = ToMoney64(_s4.WeeklyProfitHistory[i]); + gameState.cashHistory[i] = ToMoney64(_s4.CashHistory[i]); + gameState.park.ValueHistory[i] = CorrectRCT1ParkValue(_s4.ParkValueHistory[i]); + gameState.weeklyProfitHistory[i] = ToMoney64(_s4.WeeklyProfitHistory[i]); } for (size_t i = 0; i < Limits::kExpenditureTableMonthCount; i++) { for (size_t j = 0; j < Limits::kExpenditureTypeCount; j++) { - gameState.ExpenditureTable[i][j] = ToMoney64(_s4.Expenditure[i][j]); + gameState.expenditureTable[i][j] = ToMoney64(_s4.Expenditure[i][j]); } } - gameState.CurrentExpenditure = ToMoney64(_s4.TotalExpenditure); + gameState.currentExpenditure = ToMoney64(_s4.TotalExpenditure); - gameState.ScenarioCompletedCompanyValue = RCT12CompletedCompanyValueToOpenRCT2(_s4.CompletedCompanyValue); - gameState.TotalAdmissions = _s4.NumAdmissions; - gameState.TotalIncomeFromAdmissions = ToMoney64(_s4.AdmissionTotalIncome); + gameState.scenarioCompletedCompanyValue = RCT12CompletedCompanyValueToOpenRCT2(_s4.CompletedCompanyValue); + gameState.totalAdmissions = _s4.NumAdmissions; + gameState.totalIncomeFromAdmissions = ToMoney64(_s4.AdmissionTotalIncome); // TODO marketing campaigns not working static_assert( @@ -1524,7 +1529,7 @@ namespace OpenRCT2::RCT1 { campaign.ShopItemType = ShopItem(_s4.MarketingAssoc[i]); } - gameState.MarketingCampaigns.push_back(campaign); + gameState.marketingCampaigns.push_back(campaign); } } } @@ -1562,6 +1567,9 @@ namespace OpenRCT2::RCT1 auto animObjects = GetLegacyPeepAnimationObjects(); AppendRequiredObjects(result, ObjectType::peepAnimations, animObjects); + auto climateObjId = GetClimateObjectIdFromLegacyClimateType(_s4.Climate); + AppendRequiredObjects(result, ObjectType::climate, std::vector({ climateObjId })); + return result; } @@ -1715,7 +1723,7 @@ namespace OpenRCT2::RCT1 auto src2 = src->AsTrack(); const auto* ride = GetRide(RCT12RideIdToOpenRCT2RideId(src2->GetRideIndex())); auto rideType = (ride != nullptr) ? ride->type : kRideTypeNull; - auto rct1RideType = _s4.Rides[src2->GetRideIndex()].Type; + auto rct1RideType = _s4.Rides[src2->GetRideIndex()].type; dst2->SetTrackType(RCT1TrackTypeToOpenRCT2(src2->GetTrackType(), rideType)); dst2->SetRideType(rideType); @@ -2087,41 +2095,41 @@ namespace OpenRCT2::RCT1 { activeResearchTypes |= EnumToFlag(ResearchCategory::SceneryGroup); } - gameState.ResearchPriorities = activeResearchTypes; - gameState.ResearchFundingLevel = _s4.ResearchLevel; + gameState.researchPriorities = activeResearchTypes; + gameState.researchFundingLevel = _s4.ResearchLevel; // This will mark items as researched/unresearched according to the research list. // This needs to be called before importing progress, as it will reset it. ResearchResetCurrentItem(); // Research history - gameState.ResearchProgress = _s4.ResearchProgress; - gameState.ResearchProgressStage = _s4.ResearchProgressStage; - gameState.ResearchExpectedDay = _s4.NextResearchExpectedDay; - gameState.ResearchExpectedMonth = _s4.NextResearchExpectedMonth; + gameState.researchProgress = _s4.ResearchProgress; + gameState.researchProgressStage = _s4.ResearchProgressStage; + gameState.researchExpectedDay = _s4.NextResearchExpectedDay; + gameState.researchExpectedMonth = _s4.NextResearchExpectedMonth; if (_s4.LastResearchFlags == 0xFF) { - gameState.ResearchLastItem = std::nullopt; + gameState.researchLastItem = std::nullopt; } else { ::ResearchItem researchItem = {}; ConvertResearchEntry(&researchItem, _s4.LastResearchItem, _s4.LastResearchType); - gameState.ResearchLastItem = researchItem; + gameState.researchLastItem = researchItem; } if (_s4.NextResearchFlags == 0xFF) { - gameState.ResearchNextItem = std::nullopt; - gameState.ResearchProgressStage = RESEARCH_STAGE_INITIAL_RESEARCH; - gameState.ResearchProgress = 0; + gameState.researchNextItem = std::nullopt; + gameState.researchProgressStage = RESEARCH_STAGE_INITIAL_RESEARCH; + gameState.researchProgress = 0; } else { ::ResearchItem researchItem = {}; ConvertResearchEntry(&researchItem, _s4.NextResearchItem, _s4.NextResearchType); - gameState.ResearchNextItem = researchItem; + gameState.researchNextItem = researchItem; } } @@ -2180,38 +2188,78 @@ namespace OpenRCT2::RCT1 } } - auto& park = gameState.Park; + auto& park = gameState.park; park.Name = std::move(parkName); } + std::vector convertNewsQueue(const RCT12NewsItem* queue, size_t size) + { + std::vector output{}; + const RCT12NewsItem* src = queue; + + for (uint8_t i = 0; i < size; i++) + { + News::Item dst{}; + + if (src->Type == 0) + break; + + dst.Type = static_cast(src->Type); + dst.Flags = src->Flags; + dst.Ticks = src->Ticks; + dst.MonthYear = src->MonthYear; + dst.Day = src->Day; + dst.Text = ConvertFormattedStringToOpenRCT2(std::string_view(src->Text, sizeof(src->Text))); + + if (dst.Type == News::ItemType::Research) + { + uint8_t researchItem = src->Assoc & 0x000000FF; + uint8_t researchType = (src->Assoc & 0x00FF0000) >> 16; + + ::ResearchItem tmpResearchItem = {}; + ConvertResearchEntry(&tmpResearchItem, researchItem, researchType); + dst.Assoc = tmpResearchItem.rawValue; + } + else + { + dst.Assoc = src->Assoc; + } + + output.emplace_back(dst); + src++; + } + + return output; + } + void ImportParkFlags(GameState_t& gameState) { // Date and srand - gameState.CurrentTicks = _s4.Ticks; + gameState.currentTicks = _s4.Ticks; ScenarioRandSeed(_s4.RandomA, _s4.RandomB); - gameState.Date = Date{ _s4.Month, _s4.Day }; + gameState.date = Date{ _s4.Month, _s4.Day }; // Park rating - gameState.Park.Rating = _s4.ParkRating; + gameState.park.Rating = _s4.ParkRating; Park::ResetHistories(gameState); for (size_t i = 0; i < std::size(_s4.ParkRatingHistory); i++) { - if (_s4.ParkRatingHistory[i] != RCT12ParkHistoryUndefined) + if (_s4.ParkRatingHistory[i] != kRCT12ParkHistoryUndefined) { - gameState.Park.RatingHistory[i] = _s4.ParkRatingHistory[i] * RCT12ParkRatingHistoryFactor; + gameState.park.RatingHistory[i] = _s4.ParkRatingHistory[i] * kRCT12ParkRatingHistoryFactor; } } for (size_t i = 0; i < std::size(_s4.GuestsInParkHistory); i++) { - if (_s4.GuestsInParkHistory[i] != RCT12ParkHistoryUndefined) + if (_s4.GuestsInParkHistory[i] != kRCT12ParkHistoryUndefined) { - gameState.GuestsInParkHistory[i] = _s4.GuestsInParkHistory[i] * RCT12GuestsInParkHistoryFactor; + gameState.guestsInParkHistory[i] = _s4.GuestsInParkHistory[i] * kRCT12GuestsInParkHistoryFactor; } } // Awards - auto& currentAwards = gameState.CurrentAwards; + auto& currentAwards = gameState.currentAwards; for (auto& src : _s4.Awards) { if (src.Time != 0) @@ -2222,74 +2270,51 @@ namespace OpenRCT2::RCT1 // Number of guests history std::fill( - std::begin(gameState.GuestsInParkHistory), std::end(gameState.GuestsInParkHistory), + std::begin(gameState.guestsInParkHistory), std::end(gameState.guestsInParkHistory), std::numeric_limits::max()); for (size_t i = 0; i < std::size(_s4.GuestsInParkHistory); i++) { if (_s4.GuestsInParkHistory[i] != std::numeric_limits::max()) { - gameState.GuestsInParkHistory[i] = _s4.GuestsInParkHistory[i] * 20; + gameState.guestsInParkHistory[i] = _s4.GuestsInParkHistory[i] * 20; } } // News items - for (size_t i = 0; i < Limits::MaxNewsItems; i++) - { - const RCT12NewsItem* src = &_s4.Messages[i]; - News::Item* dst = &gameState.NewsItems[i]; - - dst->Type = static_cast(src->Type); - dst->Flags = src->Flags; - dst->Ticks = src->Ticks; - dst->MonthYear = src->MonthYear; - dst->Day = src->Day; - dst->Text = ConvertFormattedStringToOpenRCT2(std::string_view(src->Text, sizeof(src->Text))); - - if (dst->Type == News::ItemType::Research) - { - uint8_t researchItem = src->Assoc & 0x000000FF; - uint8_t researchType = (src->Assoc & 0x00FF0000) >> 16; - - ::ResearchItem tmpResearchItem = {}; - ConvertResearchEntry(&tmpResearchItem, researchItem, researchType); - dst->Assoc = tmpResearchItem.rawValue; - } - else - { - dst->Assoc = src->Assoc; - } - } + auto recentMessages = convertNewsQueue(_s4.recentMessages, std::size(_s4.recentMessages)); + auto archivedMessages = convertNewsQueue(_s4.archivedMessages, std::size(_s4.archivedMessages)); + News::importNewsItems(gameState, recentMessages, archivedMessages); // Initial guest status - gameState.GuestInitialCash = ToMoney64(_s4.GuestInitialCash); - gameState.GuestInitialHunger = _s4.GuestInitialHunger; - gameState.GuestInitialThirst = _s4.GuestInitialThirst; - gameState.GuestInitialHappiness = _s4.GuestInitialHappiness; + gameState.guestInitialCash = ToMoney64(_s4.GuestInitialCash); + gameState.guestInitialHunger = _s4.GuestInitialHunger; + gameState.guestInitialThirst = _s4.GuestInitialThirst; + gameState.guestInitialHappiness = _s4.GuestInitialHappiness; - gameState.GuestGenerationProbability = _s4.GuestGenerationProbability; + gameState.guestGenerationProbability = _s4.GuestGenerationProbability; // Staff colours - gameState.StaffHandymanColour = RCT1::GetColour(_s4.HandymanColour); - gameState.StaffMechanicColour = RCT1::GetColour(_s4.MechanicColour); - gameState.StaffSecurityColour = RCT1::GetColour(_s4.SecurityGuardColour); + gameState.staffHandymanColour = RCT1::GetColour(_s4.HandymanColour); + gameState.staffMechanicColour = RCT1::GetColour(_s4.MechanicColour); + gameState.staffSecurityColour = RCT1::GetColour(_s4.SecurityGuardColour); // Flags - gameState.Park.Flags = _s4.ParkFlags; - gameState.Park.Flags &= ~PARK_FLAGS_ANTI_CHEAT_DEPRECATED; - gameState.Park.Flags |= PARK_FLAGS_RCT1_INTEREST; + gameState.park.Flags = _s4.ParkFlags; + gameState.park.Flags &= ~PARK_FLAGS_ANTI_CHEAT_DEPRECATED; + gameState.park.Flags |= PARK_FLAGS_RCT1_INTEREST; // Loopy Landscape parks can set a flag to lock the entry price to free. // If this flag is not set, the player can ask money for both rides and entry. if (!(_s4.ParkFlags & RCT1_PARK_FLAGS_PARK_ENTRY_LOCKED_AT_FREE)) { - gameState.Park.Flags |= PARK_FLAGS_UNLOCK_ALL_PRICES; + gameState.park.Flags |= PARK_FLAGS_UNLOCK_ALL_PRICES; } - gameState.Park.Size = _s4.ParkSize; - gameState.TotalRideValueForMoney = _s4.TotalRideValueForMoney; - gameState.SamePriceThroughoutPark = 0; + gameState.park.Size = _s4.ParkSize; + gameState.totalRideValueForMoney = _s4.TotalRideValueForMoney; + gameState.samePriceThroughoutPark = 0; if (_gameVersion == FILE_VERSION_RCT1_LL) { - gameState.SamePriceThroughoutPark = _s4.SamePriceThroughout; + gameState.samePriceThroughoutPark = _s4.SamePriceThroughout; } } @@ -2351,16 +2376,15 @@ namespace OpenRCT2::RCT1 void ImportClimate(GameState_t& gameState) { - gameState.Climate = ClimateType{ _s4.Climate }; - gameState.WeatherUpdateTimer = _s4.WeatherUpdateTimer; - gameState.WeatherCurrent = { + gameState.weatherUpdateTimer = _s4.WeatherUpdateTimer; + gameState.weatherCurrent = { .weatherType = WeatherType{ _s4.Weather }, .temperature = static_cast(_s4.Temperature), .weatherEffect = WeatherEffectType::None, .weatherGloom = _s4.WeatherGloom, .level = static_cast(_s4.Rain), }; - gameState.WeatherNext = { + gameState.weatherNext = { .weatherType = WeatherType{ _s4.TargetWeather }, .temperature = static_cast(_s4.TargetTemperature), .weatherEffect = WeatherEffectType::None, @@ -2387,7 +2411,7 @@ namespace OpenRCT2::RCT1 std::lock_guard lock(mtx); // Unload loaded scenario text object, if any. - if (auto* obj = objManager.GetLoadedObject(ObjectType::scenarioText, 0); obj != nullptr) + if (auto* obj = objManager.GetLoadedObject(0); obj != nullptr) objManager.UnloadObjects({ obj->GetDescriptor() }); // Load the one specified @@ -2401,39 +2425,39 @@ namespace OpenRCT2::RCT1 } } - gameState.ScenarioName = std::move(name); - gameState.ScenarioDetails = std::move(details); + gameState.scenarioName = std::move(name); + gameState.scenarioDetails = std::move(details); if (_isScenario && !parkName.empty()) { - auto& park = GetGameState().Park; + auto& park = getGameState().park; park.Name = std::move(parkName); } } void ImportScenarioObjective(GameState_t& gameState) { - gameState.ScenarioObjective.Type = _s4.ScenarioObjectiveType; - gameState.ScenarioObjective.Year = _s4.ScenarioObjectiveYears; - gameState.ScenarioObjective.NumGuests = _s4.ScenarioObjectiveNumGuests; + gameState.scenarioObjective.Type = _s4.ScenarioObjectiveType; + gameState.scenarioObjective.Year = _s4.ScenarioObjectiveYears; + gameState.scenarioObjective.NumGuests = _s4.ScenarioObjectiveNumGuests; // RCT1 used a different way of calculating the park value. // This is corrected here, but since scenario_objective_currency doubles as minimum excitement rating, // we need to check the goal to avoid affecting scenarios like Volcania. if (_s4.ScenarioObjectiveType == OBJECTIVE_PARK_VALUE_BY) - gameState.ScenarioObjective.Currency = CorrectRCT1ParkValue(_s4.ScenarioObjectiveCurrency); + gameState.scenarioObjective.Currency = CorrectRCT1ParkValue(_s4.ScenarioObjectiveCurrency); else - gameState.ScenarioObjective.Currency = ToMoney64(_s4.ScenarioObjectiveCurrency); + gameState.scenarioObjective.Currency = ToMoney64(_s4.ScenarioObjectiveCurrency); // This does not seem to be saved in the objective arguments, so look up the ID from the available rides instead. if (_s4.ScenarioObjectiveType == OBJECTIVE_BUILD_THE_BEST) - gameState.ScenarioObjective.RideId = GetBuildTheBestRideId(); + gameState.scenarioObjective.RideId = GetBuildTheBestRideId(); } void ImportSavedView(GameState_t& gameState) { - gameState.SavedView = ScreenCoordsXY{ _s4.ViewX, _s4.ViewY }; - gameState.SavedViewZoom = ZoomLevel{ static_cast(_s4.ViewZoom) }; - gameState.SavedViewRotation = _s4.ViewRotation; + gameState.savedView = ScreenCoordsXY{ _s4.ViewX, _s4.ViewY }; + gameState.savedViewZoom = ZoomLevel{ static_cast(_s4.ViewZoom) }; + gameState.savedViewRotation = _s4.ViewRotation; } void ConvertWall(const int32_t& type, colour_t* colourA, colour_t* colourB) @@ -2499,10 +2523,10 @@ namespace OpenRCT2::RCT1 void FixEntrancePositions(GameState_t& gameState) { - gameState.Park.Entrances.clear(); + gameState.park.Entrances.clear(); TileElementIterator it; TileElementIteratorBegin(&it); - while (TileElementIteratorNext(&it) && gameState.Park.Entrances.size() < Limits::kMaxParkEntrances) + while (TileElementIteratorNext(&it) && gameState.park.Entrances.size() < Limits::kMaxParkEntrances) { TileElement* element = it.element; @@ -2514,7 +2538,7 @@ namespace OpenRCT2::RCT1 continue; CoordsXYZD entrance = { TileCoordsXY(it.x, it.y).ToCoordsXY(), element->GetBaseZ(), element->GetDirection() }; - gameState.Park.Entrances.push_back(entrance); + gameState.park.Entrances.push_back(entrance); } } @@ -2583,7 +2607,7 @@ namespace OpenRCT2::RCT1 nextGuestNumber = std::max(nextGuestNumber, peep->PeepId); } - gameState.NextGuestNumber = nextGuestNumber + 1; + gameState.nextGuestNumber = nextGuestNumber + 1; } /** @@ -2623,7 +2647,7 @@ namespace OpenRCT2::RCT1 auto ride = GetRide(rideIndex); if (ride != nullptr) { - ride->num_block_brakes++; + ride->numBlockBrakes++; } } } while (!(tileElement++)->IsLastForTile()); @@ -2639,9 +2663,9 @@ namespace OpenRCT2::RCT1 { for (auto& ride : GetRideManager()) { - if (ride.custom_name.empty()) + if (ride.customName.empty()) { - ride.SetNameToDefault(); + ride.setNameToDefault(); } } } @@ -2744,7 +2768,7 @@ namespace OpenRCT2::RCT1 return; const auto& rct1Ride = _s4.Rides[src->Ride]; - uint8_t vehicleEntryIndex = RCT1::GetVehicleSubEntryIndex(rct1Ride.VehicleType, src->CarType); + uint8_t vehicleEntryIndex = RCT1::GetVehicleSubEntryIndex(rct1Ride.vehicleType, src->CarType); dst->ride = RideId::FromUnderlying(src->Ride); dst->ride_subtype = RCTEntryIndexToOpenRCT2EntryIndex(ride->subtype); @@ -2819,7 +2843,7 @@ namespace OpenRCT2::RCT1 dst->TrackSubposition = VehicleTrackSubposition{ src->TrackSubposition }; dst->TrackLocation = { src->TrackX, src->TrackY, src->TrackZ }; dst->current_station = StationIndex::FromUnderlying(src->CurrentStation); - if (src->BoatLocation.IsNull() || ride->mode != RideMode::BoatHire || statusSrc != ::Vehicle::Status::TravellingBoat) + if (src->BoatLocation.IsNull() || ride->mode != RideMode::boatHire || statusSrc != ::Vehicle::Status::TravellingBoat) { dst->BoatLocation.SetNull(); dst->SetTrackDirection(src->GetTrackDirection()); @@ -2851,7 +2875,7 @@ namespace OpenRCT2::RCT1 } dst->BlockBrakeSpeed = kRCT2DefaultBlockBrakeSpeed; - if (VehicleTypeIsReversed(rct1Ride.VehicleType)) + if (VehicleTypeIsReversed(rct1Ride.vehicleType)) { dst->SetFlag(VehicleFlags::CarIsReversed); } @@ -2920,7 +2944,7 @@ namespace OpenRCT2::RCT1 auto srcThought = &src->Thoughts[i]; auto dstThought = &dst->Thoughts[i]; dstThought->type = static_cast(srcThought->Type); - if (srcThought->Item == RCT12PeepThoughtItemNone) + if (srcThought->Item == kRCT12PeepThoughtItemNone) dstThought->item = kPeepThoughtItemNone; else dstThought->item = srcThought->Item; @@ -3065,7 +3089,7 @@ namespace OpenRCT2::RCT1 dst->frame = src->Frame; dst->FountainType = fountainType; dst->NumTicksAlive = src->NumTicksAlive; - dst->FountainFlags = src->FountainFlags; + dst->fountainFlags = src->fountainFlags; dst->TargetX = src->TargetX; dst->TargetY = src->TargetY; dst->Iteration = src->Iteration; diff --git a/src/openrct2/rct1/T4Importer.cpp b/src/openrct2/rct1/T4Importer.cpp index 29a3ed1370..dc2bfdcb17 100644 --- a/src/openrct2/rct1/T4Importer.cpp +++ b/src/openrct2/rct1/T4Importer.cpp @@ -47,7 +47,7 @@ namespace OpenRCT2::RCT1 if (String::iequals(extension, ".td4")) { _name = GetNameFromTrackPath(path); - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::open); return LoadFromStream(&fs); } @@ -115,7 +115,7 @@ namespace OpenRCT2::RCT1 // Mazes were only hedges if (td4.Type == RideType::HedgeMaze) { - td->appearance.trackColours[i].supports = MAZE_WALL_TYPE_HEDGE; + td->appearance.trackColours[i].supports = MazeWallType::hedges; } else if (td4.Type == RideType::RiverRapids) { @@ -135,7 +135,7 @@ namespace OpenRCT2::RCT1 td->operation.rideMode = static_cast(td4Base.Mode); if (td4Base.Mode == RCT1_RIDE_MODE_POWERED_LAUNCH) { - td->operation.rideMode = RideMode::PoweredLaunch; + td->operation.rideMode = RideMode::poweredLaunch; } std::string_view vehicleObject; diff --git a/src/openrct2/rct12/Limits.h b/src/openrct2/rct12/Limits.h index ee21b87462..2d5e8d6c00 100644 --- a/src/openrct2/rct12/Limits.h +++ b/src/openrct2/rct12/Limits.h @@ -16,7 +16,8 @@ namespace OpenRCT2::RCT12::Limits constexpr uint8_t kMaxRidesInPark = 255; constexpr uint8_t kMaxAwards = 4; - constexpr uint8_t MaxNewsItems = 61; + constexpr uint8_t kMaxRecentNewsItems = 11; + constexpr uint8_t kMaxArchivedNewsItems = 50; constexpr uint8_t kMaxStationsPerRide = 4; constexpr uint8_t kMaxPeepSpawns = 2; constexpr uint8_t kMaxParkEntrances = 4; diff --git a/src/openrct2/rct12/RCT12.cpp b/src/openrct2/rct12/RCT12.cpp index 6d6195cd4b..ba9e66eb5f 100644 --- a/src/openrct2/rct12/RCT12.cpp +++ b/src/openrct2/rct12/RCT12.cpp @@ -83,7 +83,7 @@ uint8_t RCT12SurfaceElement::GetSlope() const uint32_t RCT12SurfaceElement::GetSurfaceStyle() const { uint32_t retVal = (Terrain >> 5) & 7; - retVal |= (Type & RCT12_SURFACE_ELEMENT_TYPE_SURFACE_MASK) << 3; + retVal |= (Type & kRCT12SurfaceElementTypeSurfaceMask) << 3; return retVal; } @@ -107,7 +107,7 @@ uint8_t RCT12SurfaceElement::GetOwnership() const uint32_t RCT12SurfaceElement::GetWaterHeight() const { - return (Terrain & RCT12_TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK) * kWaterHeightStep; + return (Terrain & kRCT12SurfaceElementWaterHeightMask) * kWaterHeightStep; } uint8_t RCT12SurfaceElement::GetParkFences() const @@ -234,7 +234,7 @@ uint8_t RCT12TrackElement::GetStationIndex() const bool RCT12TrackElement::HasChain() const { - return Type & RCT12_TRACK_ELEMENT_TYPE_FLAG_CHAIN_LIFT; + return Type & kRCT12TrackElementTypeFlagChainLift; } bool RCT12TrackElement::HasCableLift() const @@ -260,7 +260,7 @@ bool RCT12TrackElement::HasGreenLight() const { if (TrackTypeIsStation(TrackType)) { - return (Sequence & MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT) != 0; + return (Sequence & kRCT12TrackElementSequenceGreenLight) != 0; } return false; } @@ -316,22 +316,22 @@ uint8_t RCT12SmallSceneryElement::GetSceneryQuadrant() const colour_t RCT12SmallSceneryElement::GetPrimaryColour() const { - return Colour1 & RCT12_TILE_ELEMENT_COLOUR_MASK; + return Colour1 & kRCT12TileElementColourMask; } colour_t RCT12SmallSceneryElement::GetSecondaryColour() const { - return Colour2 & RCT12_TILE_ELEMENT_COLOUR_MASK; + return Colour2 & kRCT12TileElementColourMask; } bool RCT12SmallSceneryElement::NeedsSupports() const { - return Colour1 & RCT12_SMALL_SCENERY_ELEMENT_NEEDS_SUPPORTS_FLAG; + return Colour1 & kRCT12SmallSceneryElementNeedsSupportsFlag; } uint32_t RCT12LargeSceneryElement::GetEntryIndex() const { - return EntryIndex & RCT12_TILE_ELEMENT_LARGE_TYPE_MASK; + return EntryIndex & kRCT12TileElementLargeTypeMask; } uint16_t RCT12LargeSceneryElement::GetSequenceIndex() const @@ -340,18 +340,18 @@ uint16_t RCT12LargeSceneryElement::GetSequenceIndex() const } colour_t RCT12LargeSceneryElement::GetPrimaryColour() const { - return Colour[0] & RCT12_TILE_ELEMENT_COLOUR_MASK; + return Colour[0] & kRCT12TileElementColourMask; } colour_t RCT12LargeSceneryElement::GetSecondaryColour() const { - return Colour[1] & RCT12_TILE_ELEMENT_COLOUR_MASK; + return Colour[1] & kRCT12TileElementColourMask; } uint8_t RCT12LargeSceneryElement::GetBannerIndex() const { - return (Type & 0xC0) | (((Colour[0]) & ~RCT12_TILE_ELEMENT_COLOUR_MASK) >> 2) - | (((Colour[1]) & ~RCT12_TILE_ELEMENT_COLOUR_MASK) >> 5); + return (Type & 0xC0) | (((Colour[0]) & ~kRCT12TileElementColourMask) >> 2) + | (((Colour[1]) & ~kRCT12TileElementColourMask) >> 5); } uint8_t RCT12WallElement::GetEntryIndex() const @@ -366,19 +366,19 @@ uint8_t RCT12WallElement::GetSlope() const colour_t RCT12WallElement::GetPrimaryColour() const { - return Colour1 & RCT12_TILE_ELEMENT_COLOUR_MASK; + return Colour1 & kRCT12TileElementColourMask; } colour_t RCT12WallElement::GetSecondaryColour() const { - uint8_t secondaryColour = (Colour1 & ~RCT12_TILE_ELEMENT_COLOUR_MASK) >> 5; + uint8_t secondaryColour = (Colour1 & ~kRCT12TileElementColourMask) >> 5; secondaryColour |= (Flags & 0x60) >> 2; return secondaryColour; } colour_t RCT12WallElement::GetTertiaryColour() const { - return Colour3 & RCT12_TILE_ELEMENT_COLOUR_MASK; + return Colour3 & kRCT12TileElementColourMask; } uint8_t RCT12WallElement::GetAnimationFrame() const @@ -496,17 +496,17 @@ bool RCT12TrackElement::BlockBrakeClosed() const bool RCT12ResearchItem::IsInventedEndMarker() const { - return RawValue == RCT12_RESEARCHED_ITEMS_SEPARATOR; + return RawValue == kRCT12ResearchedItemsSeparator; } bool RCT12ResearchItem::IsUninventedEndMarker() const { - return RawValue == RCT12_RESEARCHED_ITEMS_END; + return RawValue == kRCT12ResearchedItemsEnd; } bool RCT12ResearchItem::IsRandomEndMarker() const { - return RawValue == RCT12_RESEARCHED_ITEMS_END_2; + return RawValue == kRCT12ResearchedItemsEnd2; } ObjectEntryIndex RCTEntryIndexToOpenRCT2EntryIndex(const RCT12ObjectEntryIndex index) @@ -519,7 +519,7 @@ ObjectEntryIndex RCTEntryIndexToOpenRCT2EntryIndex(const RCT12ObjectEntryIndex i RideId RCT12RideIdToOpenRCT2RideId(const RCT12RideId rideId) { - if (rideId == RCT12_RIDE_ID_NULL) + if (rideId == kRCT12RideIdNull) return RideId::GetNull(); return RideId::FromUnderlying(rideId); @@ -527,11 +527,11 @@ RideId RCT12RideIdToOpenRCT2RideId(const RCT12RideId rideId) static bool RCT12IsFormatChar(codepoint_t c) { - if (c >= RCT2_STRING_FORMAT_ARG_START && c <= RCT2_STRING_FORMAT_ARG_END) + if (c >= kRCT12StringFormatArgStart && c <= kRCT12StringFormatArgEnd) { return true; } - if (c >= RCT2_STRING_FORMAT_COLOUR_START && c <= RCT2_STRING_FORMAT_COLOUR_END) + if (c >= kRCT12StringFormatColourStart && c <= kRCT12StringFormatColourEnd) { return true; } diff --git a/src/openrct2/rct12/RCT12.h b/src/openrct2/rct12/RCT12.h index 96d449e5ff..c59b49bd0f 100644 --- a/src/openrct2/rct12/RCT12.h +++ b/src/openrct2/rct12/RCT12.h @@ -12,7 +12,9 @@ // Structures shared between both RCT1 and RCT2. #include "../core/EnumUtils.hpp" +#include "../core/FlagHolder.hpp" #include "../core/Money.hpp" +#include "../entity/Fountain.h" #include "../management/Research.h" #include "../object/Object.h" #include "../ride/RideTypes.h" @@ -32,6 +34,15 @@ namespace OpenRCT2 } namespace OpenRCT2::RCT12 { + enum class ClimateType : uint8_t + { + coolAndWet, + warm, + hotAndDry, + cold, + count + }; + class EntryList; enum class TrackElemType : uint8_t @@ -309,54 +320,54 @@ namespace OpenRCT2::RCT12 }; } // namespace OpenRCT2::RCT12 -enum -{ - MAP_ELEM_TRACK_SEQUENCE_GREEN_LIGHT = (1 << 7), -}; +constexpr uint8_t kRCT12StringFormatArgStart = 123; +constexpr uint8_t kRCT12StringFormatArgEnd = 141; +constexpr uint8_t kRCT12StringFormatColourStart = 142; +constexpr uint8_t kRCT12StringFormatColourEnd = 156; -constexpr uint8_t RCT2_STRING_FORMAT_ARG_START = 123; -constexpr uint8_t RCT2_STRING_FORMAT_ARG_END = 141; -constexpr uint8_t RCT2_STRING_FORMAT_COLOUR_START = 142; -constexpr uint8_t RCT2_STRING_FORMAT_COLOUR_END = 156; - -constexpr uint8_t RCT12_SOUND_ID_NULL = 0xFF; +constexpr uint8_t kRCT12SoundIdNull = 0xFF; using RCT12RideId = uint8_t; -constexpr RCT12RideId RCT12_RIDE_ID_NULL = 255; +constexpr RCT12RideId kRCT12RideIdNull = 255; -constexpr uint8_t RCT12_BANNER_INDEX_NULL = std::numeric_limits::max(); +constexpr uint8_t kRCT12BannerIndexNull = std::numeric_limits::max(); -constexpr uint8_t RCT12_TILE_ELEMENT_SURFACE_EDGE_STYLE_MASK = 0xE0; // in RCT12TileElement.properties.surface.slope -constexpr uint8_t RCT12_TILE_ELEMENT_SURFACE_WATER_HEIGHT_MASK = 0x1F; // in RCT12TileElement.properties.surface.terrain -constexpr uint8_t RCT12_TILE_ELEMENT_SURFACE_TERRAIN_MASK = 0xE0; // in RCT12TileElement.properties.surface.terrain +constexpr uint8_t kRCT12SurfaceElementEdgeStyleMask = 0xE0; // in RCT12TileElement.properties.surface.slope +constexpr uint8_t kRCT12SurfaceElementWaterHeightMask = 0x1F; // in RCT12TileElement.properties.surface.terrain +constexpr uint8_t kRCT12SurfaceElementTerrainMask = 0xE0; // in RCT12TileElement.properties.surface.terrain +constexpr uint8_t kRCT12SurfaceElementTypeSurfaceMask = 0b00000011; // in RCT12TileElement.properties.surface.type +constexpr uint8_t kRCT12SurfaceElementTypeEdgeMask = 0b01000000; // in RCT12TileElement.properties.surface.type -constexpr uint8_t RCT12_SMALL_SCENERY_ELEMENT_NEEDS_SUPPORTS_FLAG = 0x20; -constexpr uint8_t RCT12_TILE_ELEMENT_COLOUR_MASK = 0b0001'1111; +constexpr uint8_t kRCT12SmallSceneryElementNeedsSupportsFlag = 0x20; +constexpr uint8_t kRCT12TileElementColourMask = 0b0001'1111; -constexpr uint16_t RCT12_TILE_ELEMENT_LARGE_TYPE_MASK = 0x3FF; +constexpr uint16_t kRCT12TileElementLargeTypeMask = 0x3FF; -constexpr uint16_t const RCT12_XY8_UNDEFINED = 0xFFFF; +constexpr uint8_t kRCT12TrackElementTypeFlagChainLift = 1 << 7; +constexpr uint8_t kRCT12TrackElementSequenceGreenLight = 1 << 7; + +constexpr uint16_t const kRCT12xy8Undefined = 0xFFFF; using RCT12ObjectEntryIndex = uint8_t; constexpr RCT12ObjectEntryIndex kRCT12ObjectEntryIndexNull = 255; // Everything before this point has been researched -constexpr uint32_t RCT12_RESEARCHED_ITEMS_SEPARATOR = 0xFFFFFFFF; +constexpr uint32_t kRCT12ResearchedItemsSeparator = 0xFFFFFFFF; // Everything before this point and after separator still requires research -constexpr uint32_t RCT12_RESEARCHED_ITEMS_END = 0xFFFFFFFE; +constexpr uint32_t kRCT12ResearchedItemsEnd = 0xFFFFFFFE; // Extra end of list entry. Leftover from RCT1. -constexpr uint32_t RCT12_RESEARCHED_ITEMS_END_2 = 0xFFFFFFFD; +constexpr uint32_t kRCT12ResearchedItemsEnd2 = 0xFFFFFFFD; -constexpr uint16_t RCT12_PEEP_SPAWN_UNDEFINED = 0xFFFF; +constexpr uint16_t kRCT12PeepSpawnUndefined = 0xFFFF; -constexpr uint16_t RCT12VehicleTrackDirectionMask = 0b0000000000000011; -constexpr uint16_t RCT12VehicleTrackTypeMask = 0b1111111111111100; +constexpr uint16_t kRCT12VehicleTrackDirectionMask = 0b0000000000000011; +constexpr uint16_t kRCT12VehicleTrackTypeMask = 0b1111111111111100; -constexpr uint8_t RCT12PeepThoughtItemNone = std::numeric_limits::max(); +constexpr uint8_t kRCT12PeepThoughtItemNone = std::numeric_limits::max(); -constexpr uint8_t RCT12GuestsInParkHistoryFactor = 20; -constexpr uint8_t RCT12ParkRatingHistoryFactor = 4; -constexpr uint8_t RCT12ParkHistoryUndefined = std::numeric_limits::max(); +constexpr uint8_t kRCT12GuestsInParkHistoryFactor = 20; +constexpr uint8_t kRCT12ParkRatingHistoryFactor = 4; +constexpr uint8_t kRCT12ParkHistoryUndefined = std::numeric_limits::max(); constexpr uint8_t kTD46RatingsMultiplier = 10; constexpr uint8_t kTD46GForcesMultiplier = 32; @@ -376,12 +387,6 @@ enum class RCT12TrackDesignVersion : uint8_t unknown }; -enum -{ - RCT12_SURFACE_ELEMENT_TYPE_SURFACE_MASK = 0b00000011, - RCT12_SURFACE_ELEMENT_TYPE_EDGE_MASK = 0b01000000, -}; - enum { RCT12_TILE_ELEMENT_FLAG_GHOST = (1 << 4), @@ -393,11 +398,6 @@ enum RCT12_TILE_ELEMENT_FLAG_LAST_TILE = (1 << 7) }; -enum -{ - RCT12_TRACK_ELEMENT_TYPE_FLAG_CHAIN_LIFT = 1 << 7, -}; - enum { RCT12_TRACK_ELEMENT_SEQUENCE_STATION_INDEX_MASK = 0b01110000, @@ -495,12 +495,12 @@ struct RCT12xy8 bool IsNull() const { - return xy == RCT12_XY8_UNDEFINED; + return xy == kRCT12xy8Undefined; } void SetNull() { - xy = RCT12_XY8_UNDEFINED; + xy = kRCT12xy8Undefined; } }; static_assert(sizeof(RCT12xy8) == 2); @@ -1107,9 +1107,9 @@ struct RCT12EntityJumpingFountain : RCT12EntityBase uint8_t NumTicksAlive; // 0x26 uint8_t Frame; // 0x27 uint8_t Pad28[0x2F - 0x28]; - uint8_t FountainFlags; // 0x2F - int16_t TargetX; // 0x30 - int16_t TargetY; // 0x32 + OpenRCT2::FountainFlags fountainFlags{}; // 0x2F + int16_t TargetX; // 0x30 + int16_t TargetY; // 0x32 uint8_t Pad34[0x46 - 0x34]; uint16_t Iteration; // 0x46 }; diff --git a/src/openrct2/rct12/SawyerChunk.cpp b/src/openrct2/rct12/SawyerChunk.cpp index 4ba7a16811..bb5ec1dfcc 100644 --- a/src/openrct2/rct12/SawyerChunk.cpp +++ b/src/openrct2/rct12/SawyerChunk.cpp @@ -13,7 +13,7 @@ namespace OpenRCT2 { - SawyerChunk::SawyerChunk(SAWYER_ENCODING encoding, MemoryStream&& data) + SawyerChunk::SawyerChunk(SawyerEncoding encoding, MemoryStream&& data) : _data(std::move(data)) , _encoding(encoding) { diff --git a/src/openrct2/rct12/SawyerChunk.h b/src/openrct2/rct12/SawyerChunk.h index 10029e3939..38c7cfb509 100644 --- a/src/openrct2/rct12/SawyerChunk.h +++ b/src/openrct2/rct12/SawyerChunk.h @@ -18,12 +18,12 @@ namespace OpenRCT2 /** * The type of encoding / compression for a sawyer encoded chunk. */ - enum class SAWYER_ENCODING : uint8_t + enum class SawyerEncoding : uint8_t { - NONE, - RLE, - RLECOMPRESSED, - ROTATE, + none, + rle, + rleCompressed, + rotate, }; /** @@ -33,7 +33,7 @@ namespace OpenRCT2 { private: OpenRCT2::MemoryStream _data; - SAWYER_ENCODING _encoding = SAWYER_ENCODING::NONE; + SawyerEncoding _encoding = SawyerEncoding::none; public: const void* GetData() const @@ -44,11 +44,11 @@ namespace OpenRCT2 { return _data.GetLength(); } - SAWYER_ENCODING GetEncoding() const + SawyerEncoding GetEncoding() const { return _encoding; } - SawyerChunk(SAWYER_ENCODING encoding, OpenRCT2::MemoryStream&& data); + SawyerChunk(SawyerEncoding encoding, OpenRCT2::MemoryStream&& data); }; } // namespace OpenRCT2 diff --git a/src/openrct2/rct12/SawyerChunkReader.cpp b/src/openrct2/rct12/SawyerChunkReader.cpp index d6ceef14df..e6cf481417 100644 --- a/src/openrct2/rct12/SawyerChunkReader.cpp +++ b/src/openrct2/rct12/SawyerChunkReader.cpp @@ -75,7 +75,7 @@ namespace OpenRCT2 throw SawyerChunkException(EXCEPTION_MSG_ZERO_SIZED_CHUNK); } - return std::make_shared(static_cast(header.encoding), std::move(buffer)); + return std::make_shared(static_cast(header.encoding), std::move(buffer)); } default: throw SawyerChunkException(EXCEPTION_MSG_INVALID_CHUNK_ENCODING); @@ -114,7 +114,7 @@ namespace OpenRCT2 { throw SawyerChunkException(EXCEPTION_MSG_ZERO_SIZED_CHUNK); } - return std::make_shared(SAWYER_ENCODING::RLE, std::move(buffer)); + return std::make_shared(SawyerEncoding::rle, std::move(buffer)); } catch (const std::exception&) { diff --git a/src/openrct2/rct12/SawyerChunkWriter.cpp b/src/openrct2/rct12/SawyerChunkWriter.cpp index cb97865f40..df12cf9e0a 100644 --- a/src/openrct2/rct12/SawyerChunkWriter.cpp +++ b/src/openrct2/rct12/SawyerChunkWriter.cpp @@ -28,7 +28,7 @@ namespace OpenRCT2 WriteChunk(chunk->GetData(), chunk->GetLength(), chunk->GetEncoding()); } - void SawyerChunkWriter::WriteChunk(const void* src, size_t length, SAWYER_ENCODING encoding) + void SawyerChunkWriter::WriteChunk(const void* src, size_t length, SawyerEncoding encoding) { SawyerCoding::ChunkHeader header; header.encoding = static_cast(encoding); diff --git a/src/openrct2/rct12/SawyerChunkWriter.h b/src/openrct2/rct12/SawyerChunkWriter.h index 8147ef5f9c..6c194a4a94 100644 --- a/src/openrct2/rct12/SawyerChunkWriter.h +++ b/src/openrct2/rct12/SawyerChunkWriter.h @@ -39,7 +39,7 @@ namespace OpenRCT2 * @param src The source buffer. * @param length The size of the source buffer. */ - void WriteChunk(const void* src, size_t length, SAWYER_ENCODING encoding); + void WriteChunk(const void* src, size_t length, SawyerEncoding encoding); /** * Writes a track chunk to the stream containing the given buffer. @@ -52,7 +52,7 @@ namespace OpenRCT2 * Writes a chunk to the stream containing the given type. */ template - void WriteChunk(const T* src, SAWYER_ENCODING encoding) + void WriteChunk(const T* src, SawyerEncoding encoding) { WriteChunk(src, sizeof(T), encoding); } diff --git a/src/openrct2/rct12/ScenarioPatcher.cpp b/src/openrct2/rct12/ScenarioPatcher.cpp index 12a43e2e27..a51ba2e460 100644 --- a/src/openrct2/rct12/ScenarioPatcher.cpp +++ b/src/openrct2/rct12/ScenarioPatcher.cpp @@ -170,12 +170,12 @@ static Direction GetDirection(const json_t& parameters) { if (!parameters.contains(_directionKey)) { - return INVALID_DIRECTION; + return kInvalidDirection; } else if (!parameters[_directionKey].is_number()) { OpenRCT2::Guard::Assert(0, "Fix direction must be a number"); - return INVALID_DIRECTION; + return kInvalidDirection; } Direction direction = OpenRCT2::Json::GetNumber(parameters[_directionKey]); @@ -183,7 +183,7 @@ static Direction GetDirection(const json_t& parameters) if (direction > 3) { OpenRCT2::Guard::Assert(0, "Direction must be between 0 and 3"); - return INVALID_DIRECTION; + return kInvalidDirection; } return direction; @@ -515,7 +515,7 @@ static void SwapRideEntranceAndExit(RideId rideId) // Now, swap the entrance and exit. if (ride != nullptr) { - auto& station = ride->GetStation(); + auto& station = ride->getStation(); auto entranceCoords = station.Exit; auto exitCoords = station.Entrance; station.Entrance = entranceCoords; @@ -654,7 +654,7 @@ static void ApplyPathFixes(const json_t& scenarioPatch) for (auto coordinate : coordinates) { - auto slope = direction != INVALID_DIRECTION ? direction + 4 : 0; + auto slope = direction != kInvalidDirection ? direction + 4 : 0; auto footpathPlaceAction = FootpathPlaceAction( coordinate.ToCoordsXYZ(), slope, surfaceObjIndex, railingsObjIndex, direction, constructionFlags); auto result = footpathPlaceAction.Execute(); @@ -683,7 +683,7 @@ static u8string getScenarioSHA256(u8string_view scenarioPath) static u8string GetPatchFileName(u8string_view scenarioHash) { auto env = OpenRCT2::GetContext()->GetPlatformEnvironment(); - auto scenarioPatches = env->GetDirectoryPath(OpenRCT2::DIRBASE::OPENRCT2, OpenRCT2::DIRID::SCENARIO_PATCHES); + auto scenarioPatches = env->GetDirectoryPath(OpenRCT2::DirBase::openrct2, OpenRCT2::DirId::scenarioPatches); auto scenarioPatchFile = OpenRCT2::Path::WithExtension(scenarioHash.substr(0, 7), ".parkpatch"); return OpenRCT2::Path::Combine(scenarioPatches, scenarioPatchFile); } diff --git a/src/openrct2/rct2/RCT2.cpp b/src/openrct2/rct2/RCT2.cpp index 57abcc4de1..a89326cc5a 100644 --- a/src/openrct2/rct2/RCT2.cpp +++ b/src/openrct2/rct2/RCT2.cpp @@ -87,14 +87,14 @@ namespace OpenRCT2::RCT2 } } - uint8_t Ride::GetMinCarsPerTrain() const + uint8_t Ride::getMinCarsPerTrain() const { - return MinMaxCarsPerTrain >> 4; + return minMaxCarsPerTrain >> 4; } - uint8_t Ride::GetMaxCarsPerTrain() const + uint8_t Ride::getMaxCarsPerTrain() const { - return MinMaxCarsPerTrain & 0xF; + return minMaxCarsPerTrain & 0xF; } OpenRCT2::TrackElemType RCT2TrackTypeToOpenRCT2( diff --git a/src/openrct2/rct2/RCT2.h b/src/openrct2/rct2/RCT2.h index c8b74202dd..c5b7261547 100644 --- a/src/openrct2/rct2/RCT2.h +++ b/src/openrct2/rct2/RCT2.h @@ -23,6 +23,7 @@ struct RideObjectEntry; class ObjectList; enum class EditorStep : uint8_t; enum class VehicleColourSettings : uint8_t; +enum class ScenarioCategory : uint8_t; namespace OpenRCT2::RCT2 { @@ -71,213 +72,213 @@ namespace OpenRCT2::RCT2 */ struct Ride { - uint8_t Type; // 0x000 + uint8_t type; // 0x000 // pointer to static info. for example, wild mouse type is 0x36, subtype is // 0x4c. - RCT12ObjectEntryIndex Subtype; // 0x001 - uint16_t Pad002; // 0x002 - uint8_t Mode; // 0x004 + RCT12ObjectEntryIndex subtype; // 0x001 + uint16_t pad002; // 0x002 + uint8_t mode; // 0x004 VehicleColourSettings vehicleColourSettings; // 0x005 - RCT12VehicleColour VehicleColours[Limits::kMaxVehicleColours]; // 0x006 - uint8_t Pad046[0x03]; // 0x046, Used to be track colours in RCT1 without expansions + RCT12VehicleColour vehicleColours[Limits::kMaxVehicleColours]; // 0x006 + uint8_t pad046[0x03]; // 0x046, Used to be track colours in RCT1 without expansions // 0 = closed, 1 = open, 2 = test - uint8_t Status; // 0x049 - StringId Name; // 0x04A + uint8_t status; // 0x049 + StringId name; // 0x04A union { - uint32_t NameArguments; // 0x04C + uint32_t nameArguments; // 0x04C struct { - StringId NameArgumentsTypeName; // 0x04C - uint16_t NameArgumentsNumber; // 0x04E + StringId nameArgumentsTypeName; // 0x04C + uint16_t nameArgumentsNumber; // 0x04E }; }; - RCT12xy8 OverallView; // 0x050 - RCT12xy8 StationStarts[Limits::kMaxStationsPerRide]; // 0x052 - uint8_t StationHeights[Limits::kMaxStationsPerRide]; // 0x05A - uint8_t StationLength[Limits::kMaxStationsPerRide]; // 0x05E - uint8_t StationDepart[Limits::kMaxStationsPerRide]; // 0x062 + RCT12xy8 overallView; // 0x050 + RCT12xy8 stationStarts[Limits::kMaxStationsPerRide]; // 0x052 + uint8_t stationHeights[Limits::kMaxStationsPerRide]; // 0x05A + uint8_t stationLength[Limits::kMaxStationsPerRide]; // 0x05E + uint8_t stationDepart[Limits::kMaxStationsPerRide]; // 0x062 // ride->vehicle index for current train waiting for passengers // at station - uint8_t TrainAtStation[Limits::kMaxStationsPerRide]; // 0x066 - RCT12xy8 Entrances[Limits::kMaxStationsPerRide]; // 0x06A - RCT12xy8 Exits[Limits::kMaxStationsPerRide]; // 0x072 - uint16_t LastPeepInQueue[Limits::kMaxStationsPerRide]; // 0x07A - uint8_t Pad082[Limits::kMaxStationsPerRide]; // 0x082, Used to be number of peeps in queue in RCT1, but this + uint8_t trainAtStation[Limits::kMaxStationsPerRide]; // 0x066 + RCT12xy8 entrances[Limits::kMaxStationsPerRide]; // 0x06A + RCT12xy8 exits[Limits::kMaxStationsPerRide]; // 0x072 + uint16_t lastPeepInQueue[Limits::kMaxStationsPerRide]; // 0x07A + uint8_t pad082[Limits::kMaxStationsPerRide]; // 0x082, Used to be number of peeps in queue in RCT1, but this // has moved. - uint16_t Vehicles[Limits::kMaxTrainsPerRide]; // 0x086, Points to the first car in the train - uint8_t DepartFlags; // 0x0C6 + uint16_t vehicles[Limits::kMaxTrainsPerRide]; // 0x086, Points to the first car in the train + uint8_t departFlags; // 0x0C6 // Not sure if these should be uint or sint. - uint8_t NumStations; // 0x0C7 - uint8_t NumTrains; // 0x0C8 - uint8_t NumCarsPerTrain; // 0x0C9 - uint8_t ProposedNumTrains; // 0x0CA - uint8_t ProposedNumCarsPerTrain; // 0x0CB - uint8_t MaxTrains; // 0x0CC - uint8_t MinMaxCarsPerTrain; // 0x0CD - uint8_t MinWaitingTime; // 0x0CE - uint8_t MaxWaitingTime; // 0x0CF + uint8_t numStations; // 0x0C7 + uint8_t numTrains; // 0x0C8 + uint8_t numCarsPerTrain; // 0x0C9 + uint8_t proposedNumTrains; // 0x0CA + uint8_t proposedNumCarsPerTrain; // 0x0CB + uint8_t maxTrains; // 0x0CC + uint8_t minMaxCarsPerTrain; // 0x0CD + uint8_t minWaitingTime; // 0x0CE + uint8_t maxWaitingTime; // 0x0CF union { - uint8_t OperationOption; // 0x0D0 - uint8_t TimeLimit; // 0x0D0 - uint8_t NumLaps; // 0x0D0 - uint8_t LaunchSpeed; // 0x0D0 - uint8_t Speed; // 0x0D0 - uint8_t Rotations; // 0x0D0 + uint8_t operationOption; // 0x0D0 + uint8_t timeLimit; // 0x0D0 + uint8_t numLaps; // 0x0D0 + uint8_t launchSpeed; // 0x0D0 + uint8_t speed; // 0x0D0 + uint8_t rotations; // 0x0D0 }; - uint8_t BoatHireReturnDirection; // 0x0D1 - RCT12xy8 BoatHireReturnPosition; // 0x0D2 - uint8_t MeasurementIndex; // 0x0D4 + uint8_t boatHireReturnDirection; // 0x0D1 + RCT12xy8 boatHireReturnPosition; // 0x0D2 + uint8_t measurementIndex; // 0x0D4 // bits 0 through 4 are the number of helix sections // bit 5: spinning tunnel, water splash, or rapids // bit 6: log reverser, waterfall // bit 7: whirlpool - uint8_t SpecialTrackElements; // 0x0D5 - uint8_t Pad0D6[2]; // 0x0D6 + uint8_t specialTrackElements; // 0x0D5 + uint8_t pad0D6[2]; // 0x0D6 // Use ToHumanReadableSpeed if converting to display - int32_t MaxSpeed; // 0x0D8 - int32_t AverageSpeed; // 0x0DC - uint8_t CurrentTestSegment; // 0x0E0 - uint8_t AverageSpeedTestTimeout; // 0x0E1 - uint8_t Pad0E2[0x2]; // 0x0E2 - int32_t Length[Limits::kMaxStationsPerRide]; // 0x0E4 - uint16_t Time[Limits::kMaxStationsPerRide]; // 0x0F4 - fixed16_2dp MaxPositiveVerticalG; // 0x0FC - fixed16_2dp MaxNegativeVerticalG; // 0x0FE - fixed16_2dp MaxLateralG; // 0x100 - fixed16_2dp PreviousVerticalG; // 0x102 - fixed16_2dp PreviousLateralG; // 0x104 - uint8_t Pad106[0x2]; // 0x106 - uint32_t TestingFlags; // 0x108 + int32_t maxSpeed; // 0x0D8 + int32_t averageSpeed; // 0x0DC + uint8_t currentTestSegment; // 0x0E0 + uint8_t averageSpeedTestTimeout; // 0x0E1 + uint8_t pad0E2[0x2]; // 0x0E2 + int32_t length[Limits::kMaxStationsPerRide]; // 0x0E4 + uint16_t time[Limits::kMaxStationsPerRide]; // 0x0F4 + fixed16_2dp maxPositiveVerticalG; // 0x0FC + fixed16_2dp maxNegativeVerticalG; // 0x0FE + fixed16_2dp maxLateralG; // 0x100 + fixed16_2dp previousVerticalG; // 0x102 + fixed16_2dp previousLateralG; // 0x104 + uint8_t pad106[0x2]; // 0x106 + uint32_t testingFlags; // 0x108 // x y map location of the current track piece during a test // this is to prevent counting special tracks multiple times - RCT12xy8 CurTestTrackLocation; // 0x10C + RCT12xy8 curTestTrackLocation; // 0x10C // Next 3 variables are related (XXXX XYYY ZZZa aaaa) - uint16_t TurnCountDefault; // 0x10E X = current turn count - uint16_t TurnCountBanked; // 0x110 - uint16_t TurnCountSloped; // 0x112 X = number turns > 3 elements + uint16_t turnCountDefault; // 0x10E X = current turn count + uint16_t turnCountBanked; // 0x110 + uint16_t turnCountSloped; // 0x112 X = number turns > 3 elements union { - uint8_t Inversions; // 0x114 (???X XXXX) - uint8_t Holes; // 0x114 (???X XXXX) + uint8_t inversions; // 0x114 (???X XXXX) + uint8_t holes; // 0x114 (???X XXXX) // This is a very rough approximation of how much of the ride is undercover. // It reaches the maximum value of 7 at about 50% undercover and doesn't increase beyond that. - uint8_t ShelteredEighths; // 0x114 (XXX?-????) + uint8_t shelteredEighths; // 0x114 (XXX?-????) }; // Y is number of powered lifts, X is drops - uint8_t Drops; // 0x115 (YYXX XXXX) - uint8_t StartDropHeight; // 0x116 - uint8_t HighestDropHeight; // 0x117 - int32_t ShelteredLength; // 0x118 + uint8_t drops; // 0x115 (YYXX XXXX) + uint8_t startDropHeight; // 0x116 + uint8_t highestDropHeight; // 0x117 + int32_t shelteredLength; // 0x118 // Unused always 0? Should affect nausea - uint16_t Var11C; // 0x11C - uint8_t NumShelteredSections; // 0x11E (?abY YYYY) + uint16_t var11C; // 0x11C + uint8_t numShelteredSections; // 0x11E (?abY YYYY) // see CurTestTrackLocation - uint8_t CurTestTrackZ; // 0x11F + uint8_t curTestTrackZ; // 0x11F // Customer counter in the current 960 game tick (about 30 seconds) interval - uint16_t CurNumCustomers; // 0x120 + uint16_t curNumCustomers; // 0x120 // Counts ticks to update customer intervals, resets each 960 game ticks. - uint16_t NumCustomersTimeout; // 0x122 + uint16_t numCustomersTimeout; // 0x122 // Customer count in the last 10 * 960 game ticks (sliding window) - uint16_t NumCustomers[Limits::kCustomerHistorySize]; // 0x124 - money16 Price; // 0x138 - RCT12xy8 ChairliftBullwheelLocation[2]; // 0x13A - uint8_t ChairliftBullwheelZ[2]; // 0x13E + uint16_t numCustomers[Limits::kCustomerHistorySize]; // 0x124 + money16 price; // 0x138 + RCT12xy8 chairliftBullwheelLocation[2]; // 0x13A + uint8_t chairliftBullwheelZ[2]; // 0x13E RatingTuple ratings; // 0x140 - money16 Value; // 0x146 - uint16_t ChairliftBullwheelRotation; // 0x148 - uint8_t Satisfaction; // 0x14A - uint8_t SatisfactionTimeOut; // 0x14B - uint8_t SatisfactionNext; // 0x14C + money16 value; // 0x146 + uint16_t chairliftBullwheelRotation; // 0x148 + uint8_t satisfaction; // 0x14A + uint8_t satisfactionTimeOut; // 0x14B + uint8_t satisfactionNext; // 0x14C // Various flags stating whether a window needs to be refreshed - uint8_t WindowInvalidateFlags; // 0x14D - uint8_t Pad14E[0x02]; // 0x14E - uint32_t TotalCustomers; // 0x150 - money32 TotalProfit; // 0x154 - uint8_t Popularity; // 0x158 - uint8_t PopularityTimeOut; // 0x159 Updated every purchase and ?possibly by time? - uint8_t PopularityNext; // 0x15A When timeout reached this will be the next popularity - uint8_t NumRiders; // 0x15B - uint8_t MusicTuneId; // 0x15C - uint8_t SlideInUse; // 0x15D + uint8_t windowInvalidateFlags; // 0x14D + uint8_t pad14E[0x02]; // 0x14E + uint32_t totalCustomers; // 0x150 + money32 totalProfit; // 0x154 + uint8_t popularity; // 0x158 + uint8_t popularityTimeOut; // 0x159 Updated every purchase and ?possibly by time? + uint8_t popularityNext; // 0x15A When timeout reached this will be the next popularity + uint8_t numRiders; // 0x15B + uint8_t musicTuneId; // 0x15C + uint8_t slideInUse; // 0x15D union { - uint16_t SlidePeep; // 0x15E - uint16_t MazeTiles; // 0x15E + uint16_t slidePeep; // 0x15E + uint16_t mazeTiles; // 0x15E }; - uint8_t Pad160[0xE]; // 0x160 - uint8_t SlidePeepTShirtColour; // 0x16E - uint8_t Pad16F[0x7]; // 0x16F - uint8_t SpiralSlideProgress; // 0x176 - uint8_t Pad177[0x9]; // 0x177 - int16_t BuildDate; // 0x180 - money16 UpkeepCost; // 0x182 - uint16_t RaceWinner; // 0x184 - uint8_t Pad186[0x02]; // 0x186 - uint32_t MusicPosition; // 0x188 - uint8_t BreakdownReasonPending; // 0x18C - uint8_t MechanicStatus; // 0x18D - uint16_t Mechanic; // 0x18E - uint8_t InspectionStation; // 0x190 - uint8_t BrokenVehicle; // 0x191 - uint8_t BrokenCar; // 0x192 - uint8_t BreakdownReason; // 0x193 - money16 PriceSecondary; // 0x194 + uint8_t pad160[0xE]; // 0x160 + uint8_t slidePeepTShirtColour; // 0x16E + uint8_t pad16F[0x7]; // 0x16F + uint8_t spiralSlideProgress; // 0x176 + uint8_t pad177[0x9]; // 0x177 + int16_t buildDate; // 0x180 + money16 upkeepCost; // 0x182 + uint16_t raceWinner; // 0x184 + uint8_t pad186[0x02]; // 0x186 + uint32_t musicPosition; // 0x188 + uint8_t breakdownReasonPending; // 0x18C + uint8_t mechanicStatus; // 0x18D + uint16_t mechanic; // 0x18E + uint8_t inspectionStation; // 0x190 + uint8_t brokenTrain; // 0x191 + uint8_t brokenCar; // 0x192 + uint8_t breakdownReason; // 0x193 + money16 priceSecondary; // 0x194 union { struct { - uint8_t ReliabilitySubvalue; // 0x196, 0 - 255, acts like the decimals for reliability_percentage - uint8_t ReliabilityPercentage; // 0x197, Starts at 100 and decreases from there. + uint8_t reliabilitySubvalue; // 0x196, 0 - 255, acts like the decimals for reliabilityPercentage + uint8_t reliabilityPercentage; // 0x197, Starts at 100 and decreases from there. }; - uint16_t Reliability; // 0x196 + uint16_t reliability; // 0x196 }; // Small constant used to increase the unreliability as the game continues, // making breakdowns more and more likely. - uint8_t UnreliabilityFactor; // 0x198 + uint8_t unreliabilityFactor; // 0x198 // Range from [0, 100] - uint8_t Downtime; // 0x199 - uint8_t InspectionInterval; // 0x19A - uint8_t LastInspection; // 0x19B - uint8_t DowntimeHistory[Limits::kDowntimeHistorySize]; // 0x19C - uint32_t NoPrimaryItemsSold; // 0x1A4 - uint32_t NoSecondaryItemsSold; // 0x1A8 - uint8_t BreakdownSoundModifier; // 0x1AC + uint8_t downtime; // 0x199 + uint8_t inspectionInterval; // 0x19A + uint8_t lastInspection; // 0x19B + uint8_t downtimeHistory[Limits::kDowntimeHistorySize]; // 0x19C + uint32_t numPrimaryItemsSold; // 0x1A4 + uint32_t numSecondaryItemsSold; // 0x1A8 + uint8_t breakdownSoundModifier; // 0x1AC // Used to oscillate the sound when ride breaks down. // 0 = no change, 255 = max change - uint8_t NotFixedTimeout; // 0x1AD - uint8_t LastCrashType; // 0x1AE - uint8_t ConnectedMessageThrottle; // 0x1AF - money32 IncomePerHour; // 0x1B0 - money32 Profit; // 0x1B4 - uint8_t QueueTime[Limits::kMaxStationsPerRide]; // 0x1B8 - uint8_t TrackColourMain[Limits::kNumColourSchemes]; // 0x1BC - uint8_t TrackColourAdditional[Limits::kNumColourSchemes]; // 0x1C0 - uint8_t TrackColourSupports[Limits::kNumColourSchemes]; // 0x1C4 - uint8_t Music; // 0x1C8 - uint8_t EntranceStyle; // 0x1C9 - uint16_t VehicleChangeTimeout; // 0x1CA - uint8_t NumBlockBrakes; // 0x1CC - uint8_t LiftHillSpeed; // 0x1CD - uint16_t GuestsFavourite; // 0x1CE - uint32_t LifecycleFlags; // 0x1D0 - uint8_t VehicleColoursExtended[Limits::kMaxVehicleColours]; // 0x1D4 - uint16_t TotalAirTime; // 0x1F4 - uint8_t CurrentTestStation; // 0x1F6 - uint8_t NumCircuits; // 0x1F7 - int16_t CableLiftX; // 0x1F8 - int16_t CableLiftY; // 0x1FA - uint8_t CableLiftZ; // 0x1FC - uint8_t Pad1FD; // 0x1FD - uint16_t CableLift; // 0x1FE - uint16_t QueueLength[Limits::kMaxStationsPerRide]; // 0x200 - uint8_t Pad208[0x58]; // 0x208 + uint8_t notFixedTimeout; // 0x1AD + uint8_t lastCrashType; // 0x1AE + uint8_t connectedMessageThrottle; // 0x1AF + money32 incomePerHour; // 0x1B0 + money32 profit; // 0x1B4 + uint8_t queueTime[Limits::kMaxStationsPerRide]; // 0x1B8 + uint8_t trackColourMain[Limits::kNumColourSchemes]; // 0x1BC + uint8_t trackColourAdditional[Limits::kNumColourSchemes]; // 0x1C0 + uint8_t trackColourSupports[Limits::kNumColourSchemes]; // 0x1C4 + uint8_t music; // 0x1C8 + uint8_t entranceStyle; // 0x1C9 + uint16_t vehicleChangeTimeout; // 0x1CA + uint8_t numBlockBrakes; // 0x1CC + uint8_t liftHillSpeed; // 0x1CD + uint16_t guestsFavourite; // 0x1CE + uint32_t lifecycleFlags; // 0x1D0 + uint8_t vehicleColoursExtended[Limits::kMaxVehicleColours]; // 0x1D4 + uint16_t totalAirTime; // 0x1F4 + uint8_t currentTestStation; // 0x1F6 + uint8_t numCircuits; // 0x1F7 + int16_t cableLiftX; // 0x1F8 + int16_t cableLiftY; // 0x1FA + uint8_t cableLiftZ; // 0x1FC + uint8_t pad1FD; // 0x1FD + uint16_t cableLift; // 0x1FE + uint16_t queueLength[Limits::kMaxStationsPerRide]; // 0x200 + uint8_t pad208[0x58]; // 0x208 - uint8_t GetMinCarsPerTrain() const; - uint8_t GetMaxCarsPerTrain() const; + uint8_t getMinCarsPerTrain() const; + uint8_t getMaxCarsPerTrain() const; }; static_assert(sizeof(Ride) == 0x260); @@ -313,7 +314,6 @@ namespace OpenRCT2::RCT2 uint8_t SecondaryColour; // 0x15 colour_t getTertiaryWallColour() const; - void setTertiaryWallColour(colour_t colour); }; static_assert(sizeof(TD6SceneryElement) == 0x16); @@ -393,7 +393,7 @@ namespace OpenRCT2::RCT2 int8_t ObjectiveType; int8_t ObjectiveArg1; int32_t objectiveArg2; - int16_t objectiveArg3; + uint16_t objectiveArg3; char Name[64]; char Details[256]; int32_t Flags; @@ -510,19 +510,19 @@ namespace OpenRCT2::RCT2 } uint8_t GetTrackDirection() const { - return TrackTypeAndDirection & RCT12VehicleTrackDirectionMask; + return TrackTypeAndDirection & kRCT12VehicleTrackDirectionMask; } void SetTrackType(OpenRCT2::RCT12::TrackElemType trackType) { // set the upper 14 bits to 0 - TrackTypeAndDirection &= ~RCT12VehicleTrackTypeMask; + TrackTypeAndDirection &= ~kRCT12VehicleTrackTypeMask; TrackTypeAndDirection |= EnumValue(trackType) << 2; } void SetTrackDirection(uint8_t trackDirection) { // set the lower 2 bits only - TrackTypeAndDirection &= ~RCT12VehicleTrackDirectionMask; - TrackTypeAndDirection |= trackDirection & RCT12VehicleTrackDirectionMask; + TrackTypeAndDirection &= ~kRCT12VehicleTrackDirectionMask; + TrackTypeAndDirection |= trackDirection & kRCT12VehicleTrackDirectionMask; } }; static_assert(sizeof(Vehicle) == 0xDA); @@ -707,7 +707,7 @@ namespace OpenRCT2::RCT2 RCT12EntityLitter Litter; RCT12EntityBalloon Balloon; RCT12EntityDuck Duck; - RCT12EntityJumpingFountain JumpingFountain; + RCT12EntityJumpingFountain JumpingFountain{}; RCT12EntityMoneyEffect MoneyEffect; RCT12EntityCrashedVehicleParticle CrashedVehicleParticle; RCT12EntityCrashSplash CrashSplash; @@ -758,11 +758,11 @@ namespace OpenRCT2::RCT2 struct S6Info { ::EditorStep EditorStep; - uint8_t Category; // 0x01 - uint8_t ObjectiveType; // 0x02 - uint8_t ObjectiveArg1; // 0x03 - int32_t ObjectiveArg2; // 0x04 - int16_t ObjectiveArg3; // 0x08 + ScenarioCategory Category; // 0x01 + uint8_t ObjectiveType; // 0x02 + uint8_t ObjectiveArg1; // 0x03 + int32_t ObjectiveArg2; // 0x04 + uint16_t ObjectiveArg3; // 0x08 uint8_t Pad00A[0x3E]; char Name[64]; // 0x48 char Details[256]; // 0x88 @@ -977,7 +977,7 @@ namespace OpenRCT2::RCT2 uint8_t Byte13CA740; uint8_t Pad13CA741; uint8_t Byte13CA742[4]; // unused - uint8_t Climate; + RCT12::ClimateType Climate; uint8_t Pad013CA747; uint16_t WeatherUpdateTimer; uint8_t CurrentWeather; @@ -990,7 +990,8 @@ namespace OpenRCT2::RCT2 uint8_t NextWeatherGloom; uint8_t CurrentWeatherLevel; uint8_t NextWeatherLevel; - RCT12NewsItem NewsItems[Limits::MaxNewsItems]; + RCT12NewsItem recentMessages[Limits::kMaxRecentNewsItems]; + RCT12NewsItem archivedMessages[Limits::kMaxArchivedNewsItems]; char RCT1ScenarioName[62]; // Unused in RCT2 uint16_t RCT1ScenarioSlotIndex; // Unused in RCT2 uint32_t RCT1ScenarioFlags; // Unused in RCT2 diff --git a/src/openrct2/rct2/S6Importer.cpp b/src/openrct2/rct2/S6Importer.cpp index ef2c1b8ffd..767cef9a87 100644 --- a/src/openrct2/rct2/S6Importer.cpp +++ b/src/openrct2/rct2/S6Importer.cpp @@ -52,6 +52,7 @@ #include "../object/ScenarioTextObject.h" #include "../object/WallSceneryEntry.h" #include "../park/Legacy.h" +#include "../park/ParkPreview.h" #include "../peep/RideUseSystem.h" #include "../rct12/CSStringConverter.h" #include "../rct12/EntryList.h" @@ -67,7 +68,6 @@ #include "../ride/Track.h" #include "../ride/TrainManager.h" #include "../ride/Vehicle.h" -#include "../scenario/Scenario.h" #include "../scenario/ScenarioRepository.h" #include "../scenario/ScenarioSources.h" #include "../world/Climate.h" @@ -123,16 +123,16 @@ namespace OpenRCT2::RCT2 { } - ParkLoadResult Load(const u8string& path) override + ParkLoadResult Load(const u8string& path, const bool skipObjectCheck) override { const auto extension = Path::GetExtension(path); if (String::iequals(extension, ".sc6")) { - return LoadScenario(path); + return LoadScenario(path, skipObjectCheck); } if (String::iequals(extension, ".sv6")) { - return LoadSavedGame(path); + return LoadSavedGame(path, skipObjectCheck); } throw std::runtime_error("Invalid RCT2 park extension."); @@ -140,7 +140,7 @@ namespace OpenRCT2::RCT2 ParkLoadResult LoadSavedGame(const u8string& path, bool skipObjectCheck = false) override { - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::open); auto result = LoadFromStream(&fs, false, skipObjectCheck); _s6Path = path; return result; @@ -148,15 +148,14 @@ namespace OpenRCT2::RCT2 ParkLoadResult LoadScenario(const u8string& path, bool skipObjectCheck = false) override { - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::open); auto result = LoadFromStream(&fs, true, skipObjectCheck); _s6Path = path; return result; } ParkLoadResult LoadFromStream( - OpenRCT2::IStream* stream, bool isScenario, [[maybe_unused]] bool skipObjectCheck = false, - const u8string& path = {}) override + OpenRCT2::IStream* stream, bool isScenario, bool skipObjectCheck = false, const u8string& path = {}) override { auto chunkReader = SawyerChunkReader(stream); chunkReader.ReadChunk(&_s6.Header, sizeof(_s6.Header)); @@ -188,9 +187,12 @@ namespace OpenRCT2::RCT2 // Read packed objects // TODO try to contain this more and not store objects until later - for (uint16_t i = 0; i < _s6.Header.NumPackedObjects; i++) + if (!skipObjectCheck) { - _objectRepository.ExportPackedObject(stream); + for (uint16_t i = 0; i < _s6.Header.NumPackedObjects; i++) + { + _objectRepository.ExportPackedObject(stream); + } } if (!path.empty()) @@ -243,7 +245,7 @@ namespace OpenRCT2::RCT2 stream.Read(&_s6.EntityListsHead, postEntitiesSize); } - bool GetDetails(ScenarioIndexEntry* dst) override + bool PopulateIndexEntry(ScenarioIndexEntry* dst) override { *dst = {}; @@ -278,7 +280,7 @@ namespace OpenRCT2::RCT2 { dst->ScenarioId = SC_UNIDENTIFIED; dst->SourceIndex = -1; - if (dst->Category == SCENARIO_CATEGORY_REAL) + if (dst->Category == ScenarioCategory::real) { dst->SourceGame = ScenarioSource::Real; } @@ -300,7 +302,7 @@ namespace OpenRCT2::RCT2 std::lock_guard lock(mtx); // Unload loaded scenario text object, if any. - if (auto* obj = objManager.GetLoadedObject(ObjectType::scenarioText, 0); obj != nullptr) + if (auto* obj = objManager.GetLoadedObject(0); obj != nullptr) objManager.UnloadObjects({ obj->GetDescriptor() }); // Load the one specified @@ -315,12 +317,49 @@ namespace OpenRCT2::RCT2 return true; } + ParkPreview GetParkPreview() override + { + return {}; + } + + std::vector convertNewsQueue(const RCT12NewsItem* queue, size_t size) + { + std::vector output{}; + const RCT12NewsItem* src = queue; + + for (uint8_t i = 0; i < size; i++) + { + if (src->Type == 0) + break; + + if (src->Type >= News::ItemTypeCount) + { + LOG_ERROR("Invalid news type 0x%x for news item %d, ignoring remaining news items", src->Type, i); + break; + } + + News::Item dst{}; + dst.Type = static_cast(src->Type); + dst.Flags = src->Flags; + dst.Assoc = src->Assoc; + dst.Ticks = src->Ticks; + dst.MonthYear = src->MonthYear; + dst.Day = src->Day; + dst.Text = ConvertFormattedStringToOpenRCT2(std::string_view(src->Text, sizeof(src->Text))); + + output.emplace_back(dst); + src++; + } + + return output; + } + void Import(GameState_t& gameState) override { Initialise(gameState); - gameState.EditorStep = _s6.Info.EditorStep; - gameState.ScenarioCategory = static_cast(_s6.Info.Category); + gameState.editorStep = _s6.Info.EditorStep; + gameState.scenarioCategory = _s6.Info.Category; // Some scenarios have their scenario details in UTF-8, due to earlier bugs in OpenRCT2. auto loadMaybeUTF8 = [](std::string_view str) -> std::string { @@ -329,18 +368,18 @@ namespace OpenRCT2::RCT2 if (_s6.Header.Type == S6_TYPE_SCENARIO) { - gameState.ScenarioName = loadMaybeUTF8(_s6.Info.Name); - gameState.ScenarioDetails = loadMaybeUTF8(_s6.Info.Details); + gameState.scenarioName = loadMaybeUTF8(_s6.Info.Name); + gameState.scenarioDetails = loadMaybeUTF8(_s6.Info.Details); } else { // Saved games do not have an info chunk - gameState.ScenarioName = loadMaybeUTF8(_s6.ScenarioName); - gameState.ScenarioDetails = loadMaybeUTF8(_s6.ScenarioDescription); + gameState.scenarioName = loadMaybeUTF8(_s6.ScenarioName); + gameState.scenarioDetails = loadMaybeUTF8(_s6.ScenarioDescription); } - gameState.Date = OpenRCT2::Date{ _s6.ElapsedMonths, _s6.CurrentDay }; - gameState.CurrentTicks = _s6.GameTicks1; + gameState.date = OpenRCT2::Date{ _s6.ElapsedMonths, _s6.CurrentDay }; + gameState.currentTicks = _s6.GameTicks1; ScenarioRandSeed(_s6.ScenarioSrand0, _s6.ScenarioSrand1); @@ -349,21 +388,21 @@ namespace OpenRCT2::RCT2 ImportEntities(); ConvertPeepAnimationTypeToObjects(gameState); - gameState.InitialCash = ToMoney64(_s6.InitialCash); - gameState.BankLoan = ToMoney64(_s6.CurrentLoan); + gameState.initialCash = ToMoney64(_s6.InitialCash); + gameState.bankLoan = ToMoney64(_s6.CurrentLoan); - gameState.Park.Flags = _s6.ParkFlags & ~PARK_FLAGS_NO_MONEY_SCENARIO; + gameState.park.Flags = _s6.ParkFlags & ~PARK_FLAGS_NO_MONEY_SCENARIO; // RCT2 used a different flag for `no money` when the park is a scenario if (_s6.Header.Type == S6_TYPE_SCENARIO) { if (_s6.ParkFlags & PARK_FLAGS_NO_MONEY_SCENARIO) - gameState.Park.Flags |= PARK_FLAGS_NO_MONEY; + gameState.park.Flags |= PARK_FLAGS_NO_MONEY; else - gameState.Park.Flags &= ~PARK_FLAGS_NO_MONEY; + gameState.park.Flags &= ~PARK_FLAGS_NO_MONEY; } - gameState.Park.EntranceFee = _s6.ParkEntranceFee; + gameState.park.EntranceFee = _s6.ParkEntranceFee; // rct1_park_entranceX // rct1_park_entrance_y // Pad013573EE @@ -371,108 +410,108 @@ namespace OpenRCT2::RCT2 ImportPeepSpawns(gameState); - gameState.GuestChangeModifier = _s6.GuestCountChangeModifier; - gameState.ResearchFundingLevel = _s6.CurrentResearchLevel; + gameState.guestChangeModifier = _s6.GuestCountChangeModifier; + gameState.researchFundingLevel = _s6.CurrentResearchLevel; // Pad01357400 // _s6.ResearchedTrackTypesA // _s6.ResearchedTrackTypesB - gameState.NumGuestsInPark = _s6.GuestsInPark; - gameState.NumGuestsHeadingForPark = _s6.GuestsHeadingForPark; + gameState.numGuestsInPark = _s6.GuestsInPark; + gameState.numGuestsHeadingForPark = _s6.GuestsHeadingForPark; for (size_t i = 0; i < Limits::kExpenditureTableMonthCount; i++) { for (size_t j = 0; j < Limits::kExpenditureTypeCount; j++) { - gameState.ExpenditureTable[i][j] = ToMoney64(_s6.ExpenditureTable[i][j]); + gameState.expenditureTable[i][j] = ToMoney64(_s6.ExpenditureTable[i][j]); } } - gameState.NumGuestsInParkLastWeek = _s6.LastGuestsInPark; + gameState.numGuestsInParkLastWeek = _s6.LastGuestsInPark; // Pad01357BCA - gameState.StaffHandymanColour = _s6.HandymanColour; - gameState.StaffMechanicColour = _s6.MechanicColour; - gameState.StaffSecurityColour = _s6.SecurityColour; + gameState.staffHandymanColour = _s6.HandymanColour; + gameState.staffMechanicColour = _s6.MechanicColour; + gameState.staffSecurityColour = _s6.SecurityColour; - gameState.Park.Rating = _s6.ParkRating; + gameState.park.Rating = _s6.ParkRating; Park::ResetHistories(gameState); for (size_t i = 0; i < std::size(_s6.ParkRatingHistory); i++) { - if (_s6.ParkRatingHistory[i] != RCT12ParkHistoryUndefined) + if (_s6.ParkRatingHistory[i] != kRCT12ParkHistoryUndefined) { - gameState.Park.RatingHistory[i] = _s6.ParkRatingHistory[i] * RCT12ParkRatingHistoryFactor; + gameState.park.RatingHistory[i] = _s6.ParkRatingHistory[i] * kRCT12ParkRatingHistoryFactor; } } for (size_t i = 0; i < std::size(_s6.GuestsInParkHistory); i++) { - if (_s6.GuestsInParkHistory[i] != RCT12ParkHistoryUndefined) + if (_s6.GuestsInParkHistory[i] != kRCT12ParkHistoryUndefined) { - gameState.GuestsInParkHistory[i] = _s6.GuestsInParkHistory[i] * RCT12GuestsInParkHistoryFactor; + gameState.guestsInParkHistory[i] = _s6.GuestsInParkHistory[i] * kRCT12GuestsInParkHistoryFactor; } } - gameState.ResearchPriorities = _s6.ActiveResearchTypes; - gameState.ResearchProgressStage = _s6.ResearchProgressStage; - if (_s6.LastResearchedItemSubject != RCT12_RESEARCHED_ITEMS_SEPARATOR) - gameState.ResearchLastItem = RCT12ResearchItem{ _s6.LastResearchedItemSubject, + gameState.researchPriorities = _s6.ActiveResearchTypes; + gameState.researchProgressStage = _s6.ResearchProgressStage; + if (_s6.LastResearchedItemSubject != kRCT12ResearchedItemsSeparator) + gameState.researchLastItem = RCT12ResearchItem{ _s6.LastResearchedItemSubject, EnumValue(ResearchCategory::Transport) } .ToResearchItem(); else - gameState.ResearchLastItem = std::nullopt; + gameState.researchLastItem = std::nullopt; // Pad01357CF8 - if (_s6.NextResearchItem != RCT12_RESEARCHED_ITEMS_SEPARATOR) - gameState.ResearchNextItem = RCT12ResearchItem{ _s6.NextResearchItem, _s6.NextResearchCategory } + if (_s6.NextResearchItem != kRCT12ResearchedItemsSeparator) + gameState.researchNextItem = RCT12ResearchItem{ _s6.NextResearchItem, _s6.NextResearchCategory } .ToResearchItem(); else - gameState.ResearchNextItem = std::nullopt; + gameState.researchNextItem = std::nullopt; - gameState.ResearchProgress = _s6.ResearchProgress; - gameState.ResearchExpectedDay = _s6.NextResearchExpectedDay; - gameState.ResearchExpectedMonth = _s6.NextResearchExpectedMonth; - gameState.GuestInitialHappiness = _s6.GuestInitialHappiness; - gameState.Park.Size = _s6.ParkSize; - gameState.GuestGenerationProbability = _s6.GuestGenerationProbability; - gameState.TotalRideValueForMoney = _s6.TotalRideValueForMoney; - gameState.MaxBankLoan = ToMoney64(_s6.MaximumLoan); - gameState.GuestInitialCash = ToMoney64(_s6.GuestInitialCash); - gameState.GuestInitialHunger = _s6.GuestInitialHunger; - gameState.GuestInitialThirst = _s6.GuestInitialThirst; - gameState.ScenarioObjective.Type = _s6.ObjectiveType; - gameState.ScenarioObjective.Year = _s6.ObjectiveYear; + gameState.researchProgress = _s6.ResearchProgress; + gameState.researchExpectedDay = _s6.NextResearchExpectedDay; + gameState.researchExpectedMonth = _s6.NextResearchExpectedMonth; + gameState.guestInitialHappiness = _s6.GuestInitialHappiness; + gameState.park.Size = _s6.ParkSize; + gameState.guestGenerationProbability = _s6.GuestGenerationProbability; + gameState.totalRideValueForMoney = _s6.TotalRideValueForMoney; + gameState.maxBankLoan = ToMoney64(_s6.MaximumLoan); + gameState.guestInitialCash = ToMoney64(_s6.GuestInitialCash); + gameState.guestInitialHunger = _s6.GuestInitialHunger; + gameState.guestInitialThirst = _s6.GuestInitialThirst; + gameState.scenarioObjective.Type = _s6.ObjectiveType; + gameState.scenarioObjective.Year = _s6.ObjectiveYear; // Pad013580FA - gameState.ScenarioObjective.Currency = _s6.ObjectiveCurrency; + gameState.scenarioObjective.Currency = _s6.ObjectiveCurrency; // In RCT2, the ride string IDs start at index STR_0002 and are directly mappable. // This is not always the case in OpenRCT2, so we use the actual ride ID. - if (gameState.ScenarioObjective.Type == OBJECTIVE_BUILD_THE_BEST) - gameState.ScenarioObjective.RideId = _s6.ObjectiveGuests - kRCT2RideStringStart; + if (gameState.scenarioObjective.Type == OBJECTIVE_BUILD_THE_BEST) + gameState.scenarioObjective.RideId = _s6.ObjectiveGuests - kRCT2RideStringStart; else - gameState.ScenarioObjective.NumGuests = _s6.ObjectiveGuests; + gameState.scenarioObjective.NumGuests = _s6.ObjectiveGuests; ImportMarketingCampaigns(); - gameState.CurrentExpenditure = ToMoney64(_s6.CurrentExpenditure); - gameState.CurrentProfit = ToMoney64(_s6.CurrentProfit); - gameState.WeeklyProfitAverageDividend = ToMoney64(_s6.WeeklyProfitAverageDividend); - gameState.WeeklyProfitAverageDivisor = _s6.WeeklyProfitAverageDivisor; + gameState.currentExpenditure = ToMoney64(_s6.CurrentExpenditure); + gameState.currentProfit = ToMoney64(_s6.CurrentProfit); + gameState.weeklyProfitAverageDividend = ToMoney64(_s6.WeeklyProfitAverageDividend); + gameState.weeklyProfitAverageDivisor = _s6.WeeklyProfitAverageDivisor; // Pad0135833A - gameState.Park.Value = ToMoney64(_s6.ParkValue); + gameState.park.Value = ToMoney64(_s6.ParkValue); for (size_t i = 0; i < Limits::kFinanceGraphSize; i++) { - gameState.CashHistory[i] = ToMoney64(_s6.BalanceHistory[i]); - gameState.WeeklyProfitHistory[i] = ToMoney64(_s6.WeeklyProfitHistory[i]); - gameState.Park.ValueHistory[i] = ToMoney64(_s6.ParkValueHistory[i]); + gameState.cashHistory[i] = ToMoney64(_s6.BalanceHistory[i]); + gameState.weeklyProfitHistory[i] = ToMoney64(_s6.WeeklyProfitHistory[i]); + gameState.park.ValueHistory[i] = ToMoney64(_s6.ParkValueHistory[i]); } - gameState.ScenarioCompletedCompanyValue = RCT12CompletedCompanyValueToOpenRCT2(_s6.CompletedCompanyValue); - gameState.TotalAdmissions = _s6.TotalAdmissions; - gameState.TotalIncomeFromAdmissions = ToMoney64(_s6.IncomeFromAdmissions); - gameState.CompanyValue = ToMoney64(_s6.CompanyValue); - std::memcpy(gameState.PeepWarningThrottle, _s6.PeepWarningThrottle, sizeof(_s6.PeepWarningThrottle)); + gameState.scenarioCompletedCompanyValue = RCT12CompletedCompanyValueToOpenRCT2(_s6.CompletedCompanyValue); + gameState.totalAdmissions = _s6.TotalAdmissions; + gameState.totalIncomeFromAdmissions = ToMoney64(_s6.IncomeFromAdmissions); + gameState.companyValue = ToMoney64(_s6.CompanyValue); + std::memcpy(gameState.peepWarningThrottle, _s6.PeepWarningThrottle, sizeof(_s6.PeepWarningThrottle)); // Awards - auto& currentAwards = gameState.CurrentAwards; + auto& currentAwards = gameState.currentAwards; for (auto& src : _s6.Awards) { if (src.Time != 0) @@ -481,34 +520,34 @@ namespace OpenRCT2::RCT2 } } - gameState.LandPrice = ToMoney64(_s6.LandPrice); - gameState.ConstructionRightsPrice = ToMoney64(_s6.ConstructionRightsPrice); + gameState.landPrice = ToMoney64(_s6.LandPrice); + gameState.constructionRightsPrice = ToMoney64(_s6.ConstructionRightsPrice); // unk_01358774 // Pad01358776 // _s6.CdKey _gameVersion = _s6.GameVersionNumber; - gameState.ScenarioCompanyValueRecord = _s6.CompletedCompanyValueRecord; + gameState.scenarioCompanyValueRecord = _s6.CompletedCompanyValueRecord; // _s6.LoanHash; // Pad013587CA - gameState.HistoricalProfit = ToMoney64(_s6.HistoricalProfit); + gameState.historicalProfit = ToMoney64(_s6.HistoricalProfit); // Pad013587D4 - gameState.ScenarioCompletedBy = std::string_view(_s6.ScenarioCompletedName, sizeof(_s6.ScenarioCompletedName)); - gameState.Cash = ToMoney64(DECRYPT_MONEY(_s6.Cash)); + gameState.scenarioCompletedBy = std::string_view(_s6.ScenarioCompletedName, sizeof(_s6.ScenarioCompletedName)); + gameState.cash = ToMoney64(DECRYPT_MONEY(_s6.Cash)); // Pad013587FC - gameState.Park.RatingCasualtyPenalty = _s6.ParkRatingCasualtyPenalty; - gameState.MapSize = { _s6.MapSize, _s6.MapSize }; - gameState.SamePriceThroughoutPark = _s6.SamePriceThroughout + gameState.park.RatingCasualtyPenalty = _s6.ParkRatingCasualtyPenalty; + gameState.mapSize = { _s6.MapSize, _s6.MapSize }; + gameState.samePriceThroughoutPark = _s6.SamePriceThroughout | (static_cast(_s6.SamePriceThroughoutExtended) << 32); - gameState.SuggestedGuestMaximum = _s6.SuggestedMaxGuests; - gameState.ScenarioParkRatingWarningDays = _s6.ParkRatingWarningDays; - gameState.LastEntranceStyle = _s6.LastEntranceStyle; + gameState.suggestedGuestMaximum = _s6.SuggestedMaxGuests; + gameState.scenarioParkRatingWarningDays = _s6.ParkRatingWarningDays; + gameState.lastEntranceStyle = _s6.LastEntranceStyle; // rct1_water_colour // Pad01358842 ImportResearchList(gameState); - gameState.BankLoanInterestRate = _s6.CurrentInterestRate; + gameState.bankLoanInterestRate = _s6.CurrentInterestRate; // Pad0135934B // Preserve compatibility with vanilla RCT2's save format. - gameState.Park.Entrances.clear(); + gameState.park.Entrances.clear(); for (uint8_t i = 0; i < Limits::kMaxParkEntrances; i++) { if (_s6.ParkEntranceX[i] != kLocationNull) @@ -518,48 +557,48 @@ namespace OpenRCT2::RCT2 entrance.y = _s6.ParkEntranceY[i]; entrance.z = _s6.ParkEntranceZ[i]; entrance.direction = _s6.ParkEntranceDirection[i]; - gameState.Park.Entrances.push_back(entrance); + gameState.park.Entrances.push_back(entrance); } } if (_s6.Header.Type == S6_TYPE_SCENARIO) { // _s6.ScenarioFilename is wrong for some RCT2 expansion scenarios, so we use the real filename - gameState.ScenarioFileName = Path::GetFileName(_s6Path); + gameState.scenarioFileName = Path::GetFileName(_s6Path); } else { // For savegames the filename can be arbitrary, so we have no choice but to rely on the name provided - gameState.ScenarioFileName = std::string( + gameState.scenarioFileName = std::string( String::toStringView(_s6.ScenarioFilename, std::size(_s6.ScenarioFilename))); } gCurrentRealTimeTicks = 0; ImportRides(); - gameState.SavedView = ScreenCoordsXY{ _s6.SavedViewX, _s6.SavedViewY }; - gameState.SavedViewZoom = ZoomLevel{ static_cast(_s6.SavedViewZoom) }; - gameState.SavedViewRotation = _s6.SavedViewRotation; + gameState.savedView = ScreenCoordsXY{ _s6.SavedViewX, _s6.SavedViewY }; + gameState.savedViewZoom = ZoomLevel{ static_cast(_s6.SavedViewZoom) }; + gameState.savedViewRotation = _s6.SavedViewRotation; ImportRideRatingsCalcData(); ImportRideMeasurements(); - gameState.NextGuestNumber = _s6.NextGuestIndex; - gameState.GrassSceneryTileLoopPosition = _s6.GrassAndSceneryTilepos; + gameState.nextGuestNumber = _s6.NextGuestIndex; + gameState.grassSceneryTileLoopPosition = _s6.GrassAndSceneryTilepos; // unk_13CA73E // Pad13CA73F // unk_13CA740 - gameState.Climate = ClimateType{ _s6.Climate }; + // gameState.climate = ClimateType{ _s6.Climate }; // Pad13CA741; // Byte13CA742 // Pad013CA747 - gameState.WeatherUpdateTimer = _s6.WeatherUpdateTimer; - gameState.WeatherCurrent = { + gameState.weatherUpdateTimer = _s6.WeatherUpdateTimer; + gameState.weatherCurrent = { .weatherType = WeatherType{ _s6.CurrentWeather }, .temperature = static_cast(_s6.Temperature), .weatherEffect = WeatherEffectType{ _s6.CurrentWeatherEffect }, .weatherGloom = _s6.CurrentWeatherGloom, .level = static_cast(_s6.CurrentWeatherLevel), }; - gameState.WeatherNext = { + gameState.weatherNext = { .weatherType = WeatherType{ _s6.NextWeather }, .temperature = static_cast(_s6.NextTemperature), .weatherEffect = WeatherEffectType{ _s6.NextWeatherEffect }, @@ -568,34 +607,13 @@ namespace OpenRCT2::RCT2 }; // News items - News::InitQueue(); - for (size_t i = 0; i < Limits::MaxNewsItems; i++) - { - const RCT12NewsItem* src = &_s6.NewsItems[i]; - News::Item* dst = &gameState.NewsItems[i]; - if (src->Type < News::ItemTypeCount) - { - dst->Type = static_cast(src->Type); - dst->Flags = src->Flags; - dst->Assoc = src->Assoc; - dst->Ticks = src->Ticks; - dst->MonthYear = src->MonthYear; - dst->Day = src->Day; - dst->Text = ConvertFormattedStringToOpenRCT2(std::string_view(src->Text, sizeof(src->Text))); - } - else - { - // In case where news item type is broken, consider all remaining news items invalid. - LOG_ERROR("Invalid news type 0x%x for news item %d, ignoring remaining news items", src->Type, i); - // Still need to set the correct type to properly terminate the queue - dst->Type = News::ItemType::Null; - break; - } - } + auto recentMessages = convertNewsQueue(_s6.recentMessages, std::size(_s6.recentMessages)); + auto archivedMessages = convertNewsQueue(_s6.archivedMessages, std::size(_s6.archivedMessages)); + News::importNewsItems(gameState, recentMessages, archivedMessages); // Pad13CE730 // rct1_scenario_flags - gameState.WidePathTileLoopPosition = { _s6.WidePathTileLoopX, _s6.WidePathTileLoopY }; + gameState.widePathTileLoopPosition = { _s6.WidePathTileLoopX, _s6.WidePathTileLoopY }; // Pad13CE778 // Fix and set dynamic variables @@ -603,7 +621,7 @@ namespace OpenRCT2::RCT2 ConvertScenarioStringsToUTF8(gameState); DetermineRideEntranceAndExitLocations(); - gameState.Park.Name = GetUserString(_s6.ParkName); + gameState.park.Name = GetUserString(_s6.ParkName); if (_isScenario) { @@ -629,9 +647,9 @@ namespace OpenRCT2::RCT2 void ConvertScenarioStringsToUTF8(GameState_t& gameState) { // Scenario details - gameState.ScenarioCompletedBy = RCT2StringToUTF8(gameState.ScenarioCompletedBy, RCT2LanguageId::EnglishUK); - gameState.ScenarioName = RCT2StringToUTF8(gameState.ScenarioName, RCT2LanguageId::EnglishUK); - gameState.ScenarioDetails = RCT2StringToUTF8(gameState.ScenarioDetails, RCT2LanguageId::EnglishUK); + gameState.scenarioCompletedBy = RCT2StringToUTF8(gameState.scenarioCompletedBy, RCT2LanguageId::EnglishUK); + gameState.scenarioName = RCT2StringToUTF8(gameState.scenarioName, RCT2LanguageId::EnglishUK); + gameState.scenarioDetails = RCT2StringToUTF8(gameState.scenarioDetails, RCT2LanguageId::EnglishUK); } void ImportRides() @@ -639,7 +657,7 @@ namespace OpenRCT2::RCT2 for (uint8_t index = 0; index < Limits::kMaxRidesInPark; index++) { auto src = &_s6.Rides[index]; - if (src->Type != kRideTypeNull) + if (src->type != kRideTypeNull) { const auto rideId = RideId::FromUnderlying(index); auto dst = RideAllocateAtIndex(rideId); @@ -665,13 +683,13 @@ namespace OpenRCT2::RCT2 for (uint8_t index = 0; index < Limits::kMaxRidesInPark; index++) { auto src = &_s6.Rides[index]; - if (src->Type == kRideTypeNull) + if (src->type == kRideTypeNull) continue; - auto subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->Subtype); + auto subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->subtype); auto* rideEntry = GetRideEntryByIndex(subtype); // If the ride is tracked, we don’t need to check the vehicle any more. - if (!GetRideTypeDescriptor(src->Type).HasFlag(RtdFlag::isFlatRide)) + if (!GetRideTypeDescriptor(src->type).HasFlag(RtdFlag::isFlatRide)) { _isFlatRide[index] = false; continue; @@ -679,7 +697,7 @@ namespace OpenRCT2::RCT2 // We have established the ride type is a flat ride, which means the vehicle now determines whether it is a // true flat ride (scenario 4) or a tracked ride with an invisibility hack (scenario 2). - ObjectEntryIndex originalRideType = src->Type; + ObjectEntryIndex originalRideType = src->type; if (rideEntry != nullptr) { originalRideType = rideEntry->GetFirstNonNullRideType(); @@ -691,7 +709,7 @@ namespace OpenRCT2::RCT2 bool IsFlatRide(const uint8_t rct12RideIndex) { - if (rct12RideIndex == RCT12_RIDE_ID_NULL) + if (rct12RideIndex == kRCT12RideIdNull) return false; return _isFlatRide[rct12RideIndex]; } @@ -701,14 +719,14 @@ namespace OpenRCT2::RCT2 *dst = {}; dst->id = rideIndex; - auto rideType = src->Type; - auto subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->Subtype); - if (RCT2RideTypeNeedsConversion(src->Type)) + auto rideType = src->type; + auto subtype = RCTEntryIndexToOpenRCT2EntryIndex(src->subtype); + if (RCT2RideTypeNeedsConversion(src->type)) { auto* rideEntry = GetRideEntryByIndex(subtype); if (rideEntry != nullptr) { - rideType = RCT2RideTypeToOpenRCT2RideType(src->Type, *rideEntry); + rideType = RCT2RideTypeToOpenRCT2RideType(src->type, *rideEntry); } } @@ -720,82 +738,82 @@ namespace OpenRCT2::RCT2 dst->type = rideType; dst->subtype = subtype; // Pad002; - dst->mode = static_cast(src->Mode); + dst->mode = static_cast(src->mode); dst->vehicleColourSettings = src->vehicleColourSettings; for (uint8_t i = 0; i < Limits::kMaxVehicleColours; i++) { - dst->vehicle_colours[i].Body = src->VehicleColours[i].BodyColour; - dst->vehicle_colours[i].Trim = src->VehicleColours[i].TrimColour; + dst->vehicleColours[i].Body = src->vehicleColours[i].BodyColour; + dst->vehicleColours[i].Trim = src->vehicleColours[i].TrimColour; } // Pad046; - dst->status = static_cast(src->Status); + dst->status = static_cast(src->status); - dst->default_name_number = src->NameArgumentsNumber; - if (IsUserStringID(src->Name)) + dst->defaultNameNumber = src->nameArgumentsNumber; + if (IsUserStringID(src->name)) { - dst->custom_name = GetUserString(src->Name); + dst->customName = GetUserString(src->name); } else { - dst->default_name_number = src->NameArgumentsNumber; + dst->defaultNameNumber = src->nameArgumentsNumber; } - if (src->OverallView.IsNull()) + if (src->overallView.IsNull()) { - dst->overall_view.SetNull(); + dst->overallView.SetNull(); } else { - auto tileLoc = TileCoordsXY(src->OverallView.x, src->OverallView.y); - dst->overall_view = tileLoc.ToCoordsXY(); + auto tileLoc = TileCoordsXY(src->overallView.x, src->overallView.y); + dst->overallView = tileLoc.ToCoordsXY(); } for (StationIndex::UnderlyingType i = 0; i < Limits::kMaxStationsPerRide; i++) { StationIndex stationIndex = StationIndex::FromUnderlying(i); - auto& destStation = dst->GetStation(stationIndex); + auto& destStation = dst->getStation(stationIndex); - if (src->StationStarts[i].IsNull()) + if (src->stationStarts[i].IsNull()) { destStation.Start.SetNull(); } else { - auto tileStartLoc = TileCoordsXY(src->StationStarts[i].x, src->StationStarts[i].y); + auto tileStartLoc = TileCoordsXY(src->stationStarts[i].x, src->stationStarts[i].y); destStation.Start = tileStartLoc.ToCoordsXY(); } - destStation.Height = src->StationHeights[i]; - destStation.Length = src->StationLength[i]; - destStation.Depart = src->StationDepart[i]; - destStation.TrainAtStation = src->TrainAtStation[i]; + destStation.Height = src->stationHeights[i]; + destStation.Length = src->stationLength[i]; + destStation.Depart = src->stationDepart[i]; + destStation.TrainAtStation = src->trainAtStation[i]; // Direction is fixed later. - if (src->Entrances[i].IsNull()) + if (src->entrances[i].IsNull()) destStation.Entrance.SetNull(); else - destStation.Entrance = { src->Entrances[i].x, src->Entrances[i].y, src->StationHeights[i], 0 }; + destStation.Entrance = { src->entrances[i].x, src->entrances[i].y, src->stationHeights[i], 0 }; - if (src->Exits[i].IsNull()) + if (src->exits[i].IsNull()) destStation.Exit.SetNull(); else - destStation.Exit = { src->Exits[i].x, src->Exits[i].y, src->StationHeights[i], 0 }; + destStation.Exit = { src->exits[i].x, src->exits[i].y, src->stationHeights[i], 0 }; - destStation.LastPeepInQueue = EntityId::FromUnderlying(src->LastPeepInQueue[i]); + destStation.LastPeepInQueue = EntityId::FromUnderlying(src->lastPeepInQueue[i]); - destStation.SegmentLength = src->Length[i]; - destStation.SegmentTime = src->Time[i]; + destStation.SegmentLength = src->length[i]; + destStation.SegmentTime = src->time[i]; - destStation.QueueTime = src->QueueTime[i]; + destStation.QueueTime = src->queueTime[i]; - destStation.QueueLength = src->QueueLength[i]; + destStation.QueueLength = src->queueLength[i]; } // All other values take 0 as their default. Since they're already memset to that, no need to do it again. for (int32_t i = Limits::kMaxStationsPerRide; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) { StationIndex stationIndex = StationIndex::FromUnderlying(i); - auto& destStation = dst->GetStation(stationIndex); + auto& destStation = dst->getStation(stationIndex); destStation.Start.SetNull(); destStation.TrainAtStation = RideStation::kNoTrain; @@ -806,161 +824,161 @@ namespace OpenRCT2::RCT2 for (int32_t i = 0; i < Limits::kMaxTrainsPerRide; i++) { - dst->vehicles[i] = EntityId::FromUnderlying(src->Vehicles[i]); + dst->vehicles[i] = EntityId::FromUnderlying(src->vehicles[i]); } for (int32_t i = Limits::kMaxTrainsPerRide - 1; i <= OpenRCT2::Limits::kMaxTrainsPerRide; i++) { dst->vehicles[i] = EntityId::GetNull(); } - dst->depart_flags = src->DepartFlags; + dst->departFlags = src->departFlags; - dst->num_stations = src->NumStations; - dst->NumTrains = src->NumTrains; - dst->num_cars_per_train = src->NumCarsPerTrain; - dst->ProposedNumTrains = src->ProposedNumTrains; - dst->proposed_num_cars_per_train = src->ProposedNumCarsPerTrain; - dst->max_trains = src->MaxTrains; - dst->MinCarsPerTrain = src->GetMinCarsPerTrain(); - dst->MaxCarsPerTrain = src->GetMaxCarsPerTrain(); - dst->min_waiting_time = src->MinWaitingTime; - dst->max_waiting_time = src->MaxWaitingTime; + dst->numStations = src->numStations; + dst->numTrains = src->numTrains; + dst->numCarsPerTrain = src->numCarsPerTrain; + dst->proposedNumTrains = src->proposedNumTrains; + dst->proposedNumCarsPerTrain = src->proposedNumCarsPerTrain; + dst->maxTrains = src->maxTrains; + dst->minCarsPerTrain = src->getMinCarsPerTrain(); + dst->maxCarsPerTrain = src->getMaxCarsPerTrain(); + dst->minWaitingTime = src->minWaitingTime; + dst->maxWaitingTime = src->maxWaitingTime; - // Includes time_limit, NumLaps, launch_speed, speed, rotations - dst->operation_option = src->OperationOption; + // Includes timeLimit, NumLaps, launchSpeed, speed, rotations + dst->operationOption = src->operationOption; - dst->boat_hire_return_direction = src->BoatHireReturnDirection; - dst->boat_hire_return_position = { src->BoatHireReturnPosition.x, src->BoatHireReturnPosition.y }; + dst->boatHireReturnDirection = src->boatHireReturnDirection; + dst->boatHireReturnPosition = { src->boatHireReturnPosition.x, src->boatHireReturnPosition.y }; - dst->special_track_elements = src->SpecialTrackElements; + dst->specialTrackElements = src->specialTrackElements; // Pad0D6[2]; - dst->max_speed = src->MaxSpeed; - dst->average_speed = src->AverageSpeed; - dst->current_test_segment = src->CurrentTestSegment; - dst->average_speed_test_timeout = src->AverageSpeedTestTimeout; + dst->maxSpeed = src->maxSpeed; + dst->averageSpeed = src->averageSpeed; + dst->currentTestSegment = src->currentTestSegment; + dst->averageSpeedTestTimeout = src->averageSpeedTestTimeout; // Pad0E2[0x2]; - dst->max_positive_vertical_g = src->MaxPositiveVerticalG; - dst->max_negative_vertical_g = src->MaxNegativeVerticalG; - dst->max_lateral_g = src->MaxLateralG; - dst->previous_vertical_g = src->PreviousVerticalG; - dst->previous_lateral_g = src->PreviousLateralG; + dst->maxPositiveVerticalG = src->maxPositiveVerticalG; + dst->maxNegativeVerticalG = src->maxNegativeVerticalG; + dst->maxLateralG = src->maxLateralG; + dst->previousVerticalG = src->previousVerticalG; + dst->previousLateralG = src->previousLateralG; // Pad106[0x2]; - dst->testing_flags = src->TestingFlags; + dst->testingFlags.holder = src->testingFlags; - if (src->CurTestTrackLocation.IsNull()) + if (src->curTestTrackLocation.IsNull()) { - dst->CurTestTrackLocation.SetNull(); + dst->curTestTrackLocation.SetNull(); } else { - dst->CurTestTrackLocation = { src->CurTestTrackLocation.x, src->CurTestTrackLocation.y, src->CurTestTrackZ }; + dst->curTestTrackLocation = { src->curTestTrackLocation.x, src->curTestTrackLocation.y, src->curTestTrackZ }; } - dst->turn_count_default = src->TurnCountDefault; - dst->turn_count_banked = src->TurnCountBanked; - dst->turn_count_sloped = src->TurnCountSloped; - if (src->Type == RIDE_TYPE_MINI_GOLF) - dst->holes = src->Inversions & kRCT12InversionAndHoleMask; + dst->turnCountDefault = src->turnCountDefault; + dst->turnCountBanked = src->turnCountBanked; + dst->turnCountSloped = src->turnCountSloped; + if (src->type == RIDE_TYPE_MINI_GOLF) + dst->holes = src->inversions & kRCT12InversionAndHoleMask; else - dst->inversions = src->Inversions & kRCT12InversionAndHoleMask; - dst->sheltered_eighths = src->Inversions >> 5; - dst->dropsPoweredLifts = src->Drops; - dst->start_drop_height = src->StartDropHeight; - dst->highest_drop_height = src->HighestDropHeight; - dst->sheltered_length = src->ShelteredLength; - dst->var_11C = src->Var11C; - dst->num_sheltered_sections = src->NumShelteredSections; + dst->inversions = src->inversions & kRCT12InversionAndHoleMask; + dst->shelteredEighths = src->inversions >> 5; + dst->dropsPoweredLifts = src->drops; + dst->startDropHeight = src->startDropHeight; + dst->highestDropHeight = src->highestDropHeight; + dst->shelteredLength = src->shelteredLength; + dst->var11C = src->var11C; + dst->numShelteredSections = src->numShelteredSections; - dst->cur_num_customers = src->CurNumCustomers; - dst->num_customers_timeout = src->NumCustomersTimeout; + dst->curNumCustomers = src->curNumCustomers; + dst->numCustomersTimeout = src->numCustomersTimeout; for (uint8_t i = 0; i < Limits::kCustomerHistorySize; i++) { - dst->num_customers[i] = src->NumCustomers[i]; + dst->numCustomers[i] = src->numCustomers[i]; } - dst->price[0] = src->Price; + dst->price[0] = src->price; for (uint8_t i = 0; i < 2; i++) { - dst->ChairliftBullwheelLocation[i] = { src->ChairliftBullwheelLocation[i].x, - src->ChairliftBullwheelLocation[i].y, src->ChairliftBullwheelZ[i] }; + dst->chairliftBullwheelLocation[i] = { src->chairliftBullwheelLocation[i].x, + src->chairliftBullwheelLocation[i].y, src->chairliftBullwheelZ[i] }; } dst->ratings = src->ratings; - dst->value = ToMoney64(src->Value); + dst->value = ToMoney64(src->value); - dst->chairlift_bullwheel_rotation = src->ChairliftBullwheelRotation; + dst->chairliftBullwheelRotation = src->chairliftBullwheelRotation; - dst->satisfaction = src->Satisfaction; - dst->satisfaction_time_out = src->SatisfactionTimeOut; - dst->satisfaction_next = src->SatisfactionNext; + dst->satisfaction = src->satisfaction; + dst->satisfactionTimeout = src->satisfactionTimeOut; + dst->satisfactionNext = src->satisfactionNext; - dst->window_invalidate_flags = src->WindowInvalidateFlags; + dst->windowInvalidateFlags = src->windowInvalidateFlags; // Pad14E[0x02]; - dst->total_customers = src->TotalCustomers; - dst->total_profit = ToMoney64(src->TotalProfit); - dst->popularity = src->Popularity; - dst->popularity_time_out = src->PopularityTimeOut; - dst->popularity_next = src->PopularityNext; + dst->totalCustomers = src->totalCustomers; + dst->totalProfit = ToMoney64(src->totalProfit); + dst->popularity = src->popularity; + dst->popularityTimeout = src->popularityTimeOut; + dst->popularityNext = src->popularityNext; ImportNumRiders(dst, rideIndex); - dst->music_tune_id = src->MusicTuneId; - dst->slide_in_use = src->SlideInUse; - // Includes maze_tiles - dst->slide_peep = EntityId::FromUnderlying(src->SlidePeep); + dst->musicTuneId = src->musicTuneId; + dst->slideInUse = src->slideInUse; + // Includes mazeTiles + dst->slidePeep = EntityId::FromUnderlying(src->slidePeep); // Pad160[0xE]; - dst->slide_peep_t_shirt_colour = src->SlidePeepTShirtColour; + dst->slidePeepTShirtColour = src->slidePeepTShirtColour; // Pad16F[0x7]; - dst->spiral_slide_progress = src->SpiralSlideProgress; + dst->spiralSlideProgress = src->spiralSlideProgress; // Pad177[0x9]; - dst->build_date = static_cast(src->BuildDate); - dst->upkeep_cost = ToMoney64(src->UpkeepCost); - dst->race_winner = EntityId::FromUnderlying(src->RaceWinner); + dst->buildDate = static_cast(src->buildDate); + dst->upkeepCost = ToMoney64(src->upkeepCost); + dst->raceWinner = EntityId::FromUnderlying(src->raceWinner); // Pad186[0x02]; - dst->music_position = src->MusicPosition; + dst->musicPosition = src->musicPosition; - dst->breakdown_reason_pending = src->BreakdownReasonPending; - dst->mechanic_status = src->MechanicStatus; - dst->mechanic = EntityId::FromUnderlying(src->Mechanic); - dst->inspection_station = StationIndex::FromUnderlying(src->InspectionStation); - dst->broken_vehicle = src->BrokenVehicle; - dst->broken_car = src->BrokenCar; - dst->breakdown_reason = src->BreakdownReason; + dst->breakdownReasonPending = src->breakdownReasonPending; + dst->mechanicStatus = src->mechanicStatus; + dst->mechanic = EntityId::FromUnderlying(src->mechanic); + dst->inspectionStation = StationIndex::FromUnderlying(src->inspectionStation); + dst->brokenTrain = src->brokenTrain; + dst->brokenCar = src->brokenCar; + dst->breakdownReason = src->breakdownReason; - dst->price[1] = src->PriceSecondary; + dst->price[1] = src->priceSecondary; - dst->reliability = src->Reliability; - dst->unreliability_factor = src->UnreliabilityFactor; - dst->downtime = src->Downtime; - dst->inspection_interval = src->InspectionInterval; - dst->last_inspection = src->LastInspection; + dst->reliability = src->reliability; + dst->unreliabilityFactor = src->unreliabilityFactor; + dst->downtime = src->downtime; + dst->inspectionInterval = src->inspectionInterval; + dst->lastInspection = src->lastInspection; for (uint8_t i = 0; i < Limits::kDowntimeHistorySize; i++) { - dst->downtime_history[i] = src->DowntimeHistory[i]; + dst->downtimeHistory[i] = src->downtimeHistory[i]; } - dst->no_primary_items_sold = src->NoPrimaryItemsSold; - dst->no_secondary_items_sold = src->NoSecondaryItemsSold; + dst->numPrimaryItemsSold = src->numPrimaryItemsSold; + dst->numSecondaryItemsSold = src->numSecondaryItemsSold; - dst->breakdown_sound_modifier = src->BreakdownSoundModifier; - dst->not_fixed_timeout = src->NotFixedTimeout; - dst->last_crash_type = src->LastCrashType; - dst->connected_message_throttle = src->ConnectedMessageThrottle; + dst->breakdownSoundModifier = src->breakdownSoundModifier; + dst->notFixedTimeout = src->notFixedTimeout; + dst->lastCrashType = src->lastCrashType; + dst->connectedMessageThrottle = src->connectedMessageThrottle; - dst->income_per_hour = ToMoney64(src->IncomePerHour); - dst->profit = ToMoney64(src->Profit); + dst->incomePerHour = ToMoney64(src->incomePerHour); + dst->profit = ToMoney64(src->profit); for (uint8_t i = 0; i < Limits::kNumColourSchemes; i++) { - dst->track_colour[i].main = src->TrackColourMain[i]; - dst->track_colour[i].additional = src->TrackColourAdditional[i]; - dst->track_colour[i].supports = src->TrackColourSupports[i]; + dst->trackColours[i].main = src->trackColourMain[i]; + dst->trackColours[i].additional = src->trackColourAdditional[i]; + dst->trackColours[i].supports = src->trackColourSupports[i]; } // This stall was not colourable in RCT2. if (dst->type == RIDE_TYPE_FOOD_STALL) @@ -968,14 +986,14 @@ namespace OpenRCT2::RCT2 auto object = ObjectEntryGetObject(ObjectType::ride, dst->subtype); if (object != nullptr && object->GetIdentifier() == "rct2.ride.icecr1") { - dst->track_colour[0].main = COLOUR_LIGHT_BLUE; + dst->trackColours[0].main = COLOUR_LIGHT_BLUE; } } auto musicStyle = kObjectEntryIndexNull; if (GetRideTypeDescriptor(dst->type).HasFlag(RtdFlag::allowMusic)) { - musicStyle = src->Music; + musicStyle = src->music; } dst->music = musicStyle; @@ -983,27 +1001,27 @@ namespace OpenRCT2::RCT2 auto entranceStyle = kObjectEntryIndexNull; if (!_isSV7 && GetRideTypeDescriptor(dst->type).HasFlag(RtdFlag::hasEntranceAndExit)) { - entranceStyle = src->EntranceStyle; + entranceStyle = src->entranceStyle; } - dst->entrance_style = entranceStyle; + dst->entranceStyle = entranceStyle; - dst->vehicle_change_timeout = src->VehicleChangeTimeout; - dst->num_block_brakes = src->NumBlockBrakes; - dst->lift_hill_speed = src->LiftHillSpeed; - dst->guests_favourite = src->GuestsFavourite; - dst->lifecycle_flags = src->LifecycleFlags; + dst->vehicleChangeTimeout = src->vehicleChangeTimeout; + dst->numBlockBrakes = src->numBlockBrakes; + dst->liftHillSpeed = src->liftHillSpeed; + dst->guestsFavourite = src->guestsFavourite; + dst->lifecycleFlags = src->lifecycleFlags; for (uint8_t i = 0; i < Limits::kMaxTrainsPerRide; i++) { - dst->vehicle_colours[i].Tertiary = src->VehicleColoursExtended[i]; + dst->vehicleColours[i].Tertiary = src->vehicleColoursExtended[i]; } - dst->totalAirTime = src->TotalAirTime; - dst->current_test_station = StationIndex::FromUnderlying(src->CurrentTestStation); - dst->num_circuits = src->NumCircuits; - dst->CableLiftLoc = { src->CableLiftX, src->CableLiftY, src->CableLiftZ * kCoordsZStep }; + dst->totalAirTime = src->totalAirTime; + dst->currentTestStation = StationIndex::FromUnderlying(src->currentTestStation); + dst->numCircuits = src->numCircuits; + dst->cableLiftLoc = { src->cableLiftX, src->cableLiftY, src->cableLiftZ * kCoordsZStep }; // Pad1FD; - dst->cable_lift = EntityId::FromUnderlying(src->CableLift); + dst->cableLift = EntityId::FromUnderlying(src->cableLift); // Pad208[0x58]; } @@ -1013,17 +1031,17 @@ namespace OpenRCT2::RCT2 const auto& src = _s6.RideRatingsCalcData; // S6 has only one state, ensure we reset all states before reading the first one. RideRatingResetUpdateStates(); - auto& rideRatingStates = GetGameState().RideRatingUpdateStates; + auto& rideRatingStates = getGameState().rideRatingUpdateStates; auto& dst = rideRatingStates[0]; dst = {}; dst.Proximity = { src.ProximityX, src.ProximityY, src.ProximityZ }; dst.ProximityStart = { src.ProximityStartX, src.ProximityStartY, src.ProximityStartZ }; dst.CurrentRide = RCT12RideIdToOpenRCT2RideId(src.CurrentRide); dst.State = src.State; - if (src.CurrentRide < Limits::kMaxRidesInPark && _s6.Rides[src.CurrentRide].Type < std::size(kRideTypeDescriptors)) + if (src.CurrentRide < Limits::kMaxRidesInPark && _s6.Rides[src.CurrentRide].type < std::size(kRideTypeDescriptors)) { dst.ProximityTrackType = RCT2TrackTypeToOpenRCT2( - src.ProximityTrackType, _s6.Rides[src.CurrentRide].Type, IsFlatRide(src.CurrentRide)); + src.ProximityTrackType, _s6.Rides[src.CurrentRide].type, IsFlatRide(src.CurrentRide)); } else { @@ -1044,7 +1062,7 @@ namespace OpenRCT2::RCT2 { for (const auto& src : _s6.RideMeasurements) { - if (src.RideIndex != RCT12_RIDE_ID_NULL) + if (src.RideIndex != kRCT12RideIdNull) { const auto rideId = RideId::FromUnderlying(src.RideIndex); auto ride = GetRide(rideId); @@ -1090,9 +1108,9 @@ namespace OpenRCT2::RCT2 } if (invented) - gameState.ResearchItemsInvented.emplace_back(researchItem.ToResearchItem()); + gameState.researchItemsInvented.emplace_back(researchItem.ToResearchItem()); else - gameState.ResearchItemsUninvented.emplace_back(researchItem.ToResearchItem()); + gameState.researchItemsUninvented.emplace_back(researchItem.ToResearchItem()); } } @@ -1143,14 +1161,14 @@ namespace OpenRCT2::RCT2 || String::equals(_s6.ScenarioFilename, "South America - Rio Carnival.SC6")) { _s6.PeepSpawns[0] = { 2160, 3167, 6, 1 }; - _s6.PeepSpawns[1].x = RCT12_PEEP_SPAWN_UNDEFINED; + _s6.PeepSpawns[1].x = kRCT12PeepSpawnUndefined; } // In this park, peep_spawns[0] is correct. Just clear the other. else if ( String::equals(_s6.ScenarioFilename, "Great Wall of China Tourism Enhancement.SC6") || String::equals(_s6.ScenarioFilename, "Asia - Great Wall of China Tourism Enhancement.SC6")) { - _s6.PeepSpawns[1].x = RCT12_PEEP_SPAWN_UNDEFINED; + _s6.PeepSpawns[1].x = kRCT12PeepSpawnUndefined; } // Amity Airfield has peeps entering from the corner of the tile, instead of the middle. else if (String::equals(_s6.ScenarioFilename, "Amity Airfield.SC6")) @@ -1164,14 +1182,14 @@ namespace OpenRCT2::RCT2 _s6.PeepSpawns[0].z = 7; } - gameState.PeepSpawns.clear(); + gameState.peepSpawns.clear(); for (size_t i = 0; i < Limits::kMaxPeepSpawns; i++) { - if (_s6.PeepSpawns[i].x != RCT12_PEEP_SPAWN_UNDEFINED) + if (_s6.PeepSpawns[i].x != kRCT12PeepSpawnUndefined) { PeepSpawn spawn = { _s6.PeepSpawns[i].x, _s6.PeepSpawns[i].y, _s6.PeepSpawns[i].z * 16, _s6.PeepSpawns[i].direction }; - gameState.PeepSpawns.push_back(spawn); + gameState.peepSpawns.push_back(spawn); } } } @@ -1193,7 +1211,7 @@ namespace OpenRCT2::RCT2 } } } - dst->num_riders = numRiders; + dst->numRiders = numRiders; } void ImportTileElements(GameState_t& gameState) @@ -1346,7 +1364,7 @@ namespace OpenRCT2::RCT2 auto dst2 = dst->AsTrack(); auto src2 = src->AsTrack(); - auto rideType = _s6.Rides[src2->GetRideIndex()].Type; + auto rideType = _s6.Rides[src2->GetRideIndex()].type; auto oldTrackType = src2->GetTrackType(); OpenRCT2::TrackElemType trackType = RCT2TrackTypeToOpenRCT2( oldTrackType, rideType, IsFlatRide(src2->GetRideIndex())); @@ -1574,7 +1592,7 @@ namespace OpenRCT2::RCT2 { campaign.ShopItemType = ShopItem(_s6.CampaignRideIndex[i]); } - GetGameState().MarketingCampaigns.push_back(campaign); + getGameState().marketingCampaigns.push_back(campaign); } } } @@ -1635,7 +1653,7 @@ namespace OpenRCT2::RCT2 void ImportEntityPeep(::Peep* dst, const Peep* src) { const auto isNullLocation = [](const RCT12xyzd8& pos) { - return pos.x == 0xFF && pos.y == 0xFF && pos.z == 0xFF && pos.direction == INVALID_DIRECTION; + return pos.x == 0xFF && pos.y == 0xFF && pos.z == 0xFF && pos.direction == kInvalidDirection; }; ImportEntityCommonProperties(static_cast(dst), src); @@ -1681,7 +1699,7 @@ namespace OpenRCT2::RCT2 if (isNullLocation(src->PathfindGoal)) { dst->PathfindGoal.SetNull(); - dst->PathfindGoal.direction = INVALID_DIRECTION; + dst->PathfindGoal.direction = kInvalidDirection; } else { @@ -1693,7 +1711,7 @@ namespace OpenRCT2::RCT2 if (isNullLocation(src->PathfindHistory[i])) { dst->PathfindHistory[i].SetNull(); - dst->PathfindHistory[i].direction = INVALID_DIRECTION; + dst->PathfindHistory[i].direction = kInvalidDirection; } else { @@ -1907,6 +1925,9 @@ namespace OpenRCT2::RCT2 auto animObjects = GetLegacyPeepAnimationObjects(); AppendRequiredObjects(objectList, ObjectType::peepAnimations, animObjects); + auto climateObjId = GetClimateObjectIdFromLegacyClimateType(_s6.Climate); + AppendRequiredObjects(objectList, ObjectType::climate, std::vector({ climateObjId })); + return objectList; } }; @@ -1932,7 +1953,7 @@ namespace OpenRCT2::RCT2 dst->colours.Tertiary = src->ColoursExtended; dst->track_progress = src->TrackProgress; dst->TrackLocation = { src->TrackX, src->TrackY, src->TrackZ }; - if (src->BoatLocation.IsNull() || static_cast(ride.Mode) != RideMode::BoatHire + if (src->BoatLocation.IsNull() || static_cast(ride.mode) != RideMode::boatHire || src->Status != static_cast(::Vehicle::Status::TravellingBoat)) { dst->BoatLocation.SetNull(); @@ -2079,7 +2100,7 @@ namespace OpenRCT2::RCT2 auto srcThought = &src->Thoughts[i]; auto dstThought = &dst->Thoughts[i]; dstThought->type = static_cast(srcThought->Type); - if (srcThought->Item == RCT12PeepThoughtItemNone) + if (srcThought->Item == kRCT12PeepThoughtItemNone) dstThought->item = kPeepThoughtItemNone; else dstThought->item = srcThought->Item; @@ -2212,7 +2233,7 @@ namespace OpenRCT2::RCT2 ImportEntityCommonProperties(dst, src); dst->NumTicksAlive = src->NumTicksAlive; dst->frame = src->Frame; - dst->FountainFlags = src->FountainFlags; + dst->fountainFlags = src->fountainFlags; dst->TargetX = src->TargetX; dst->TargetY = src->TargetY; dst->Iteration = src->Iteration; diff --git a/src/openrct2/rct2/T6Exporter.cpp b/src/openrct2/rct2/T6Exporter.cpp index ef79af3c94..827f30b340 100644 --- a/src/openrct2/rct2/T6Exporter.cpp +++ b/src/openrct2/rct2/T6Exporter.cpp @@ -39,7 +39,7 @@ namespace OpenRCT2::RCT2 { try { - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_WRITE); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::write); return SaveTrack(&fs); } catch (const std::exception& e) diff --git a/src/openrct2/rct2/T6Importer.cpp b/src/openrct2/rct2/T6Importer.cpp index 71cdf547c5..8c63ea3a87 100644 --- a/src/openrct2/rct2/T6Importer.cpp +++ b/src/openrct2/rct2/T6Importer.cpp @@ -50,7 +50,7 @@ namespace OpenRCT2::RCT2 if (String::iequals(extension, ".td6")) { _name = GetNameFromTrackPath(path); - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::open); return LoadFromStream(&fs); } diff --git a/src/openrct2/ride/CableLift.cpp b/src/openrct2/ride/CableLift.cpp index 19fc2634aa..4654c5c939 100644 --- a/src/openrct2/ride/CableLift.cpp +++ b/src/openrct2/ride/CableLift.cpp @@ -31,7 +31,7 @@ Vehicle* CableLiftSegmentCreate( current->ride_subtype = kObjectEntryIndexNull; if (head) { - ride.cable_lift = current->Id; + ride.cableLift = current->Id; } current->SubType = head ? Vehicle::Type::Head : Vehicle::Type::Tail; current->var_44 = var_44; @@ -69,7 +69,7 @@ Vehicle* CableLiftSegmentCreate( z = z * kCoordsZStep; current->TrackLocation = { x, y, z }; - z += ride.GetRideTypeDescriptor().Heights.VehicleZOffset; + z += ride.getRideTypeDescriptor().Heights.VehicleZOffset; current->MoveTo({ 16, 16, z }); current->SetTrackType(TrackElemType::CableLiftHill); diff --git a/src/openrct2/ride/MazeCost.cpp b/src/openrct2/ride/MazeCost.cpp index d7ae0c4cd9..ed2863aa08 100644 --- a/src/openrct2/ride/MazeCost.cpp +++ b/src/openrct2/ride/MazeCost.cpp @@ -23,11 +23,11 @@ namespace OpenRCT2 money64 MazeCalculateCost(money64 constructionCost, const Ride& ride, const CoordsXYZ& loc) { const auto& ted = GetTrackElementDescriptor(TrackElemType::Maze); - money64 price = (ride.GetRideTypeDescriptor().BuildCosts.TrackPrice * ted.priceModifier) >> 16; + money64 price = (ride.getRideTypeDescriptor().BuildCosts.TrackPrice * ted.priceModifier) >> 16; auto surfaceElement = MapGetSurfaceElementAt(loc); auto heightDifference = (loc.z - surfaceElement->GetBaseZ()) / kCoordsZPerTinyZ; - money64 supportCost = heightDifference * ride.GetRideTypeDescriptor().BuildCosts.SupportPrice; + money64 supportCost = heightDifference * ride.getRideTypeDescriptor().BuildCosts.SupportPrice; return constructionCost + price + supportCost; } diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 21af3a8caa..2bbfa043f3 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -28,6 +28,7 @@ #include "../core/EnumUtils.hpp" #include "../core/Guard.hpp" #include "../core/Numerics.hpp" +#include "../entity/EntityList.h" #include "../entity/EntityRegistry.h" #include "../entity/Peep.h" #include "../entity/Staff.h" @@ -46,7 +47,6 @@ #include "../object/StationObject.h" #include "../profiling/Profiling.h" #include "../rct1/RCT1.h" -#include "../scenario/Scenario.h" #include "../ui/WindowManager.h" #include "../util/Util.h" #include "../windows/Intent.h" @@ -90,7 +90,7 @@ using namespace OpenRCT2::TrackMetaData; RideMode& operator++(RideMode& d, int) { - return d = (d == RideMode::Count) ? RideMode::Normal : static_cast(static_cast(d) + 1); + return d = (d == RideMode::count) ? RideMode::normal : static_cast(static_cast(d) + 1); } static constexpr int32_t RideInspectionInterval[] = { @@ -133,10 +133,10 @@ static void RideShopConnected(const Ride& ride); RideId GetNextFreeRideId() { - auto& gameState = GetGameState(); - for (RideId::UnderlyingType i = 0; i < gameState.Rides.size(); i++) + auto& gameState = getGameState(); + for (RideId::UnderlyingType i = 0; i < gameState.rides.size(); i++) { - if (gameState.Rides[i].id.IsNull()) + if (gameState.rides[i].id.IsNull()) { return RideId::FromUnderlying(i); } @@ -148,10 +148,10 @@ Ride* RideAllocateAtIndex(RideId index) { const auto idx = index.ToUnderlying(); - auto& gs = GetGameState(); - gs.RidesEndOfUsedRange = std::max(idx + 1, gs.RidesEndOfUsedRange); + auto& gameState = getGameState(); + gameState.ridesEndOfUsedRange = std::max(idx + 1, gameState.ridesEndOfUsedRange); - auto result = &gs.Rides[idx]; + auto result = &gameState.rides[idx]; assert(result->id == RideId::GetNull()); // Initialize the ride to all the defaults. @@ -173,25 +173,25 @@ static void RideReset(Ride& ride) { ride.id = RideId::GetNull(); ride.type = kRideTypeNull; - ride.custom_name = {}; + ride.customName = {}; ride.measurement = {}; } void RideDelete(RideId id) { - auto& gs = GetGameState(); + auto& gameState = getGameState(); const auto idx = id.ToUnderlying(); - assert(idx < gs.Rides.size()); - assert(gs.Rides[idx].type != kRideTypeNull); + assert(idx < gameState.rides.size()); + assert(gameState.rides[idx].type != kRideTypeNull); - auto& ride = gs.Rides[idx]; + auto& ride = gameState.rides[idx]; RideReset(ride); // Shrink maximum ride size. - while (gs.RidesEndOfUsedRange > 0 && gs.Rides[gs.RidesEndOfUsedRange - 1].id.IsNull()) + while (gameState.ridesEndOfUsedRange > 0 && gameState.rides[gameState.ridesEndOfUsedRange - 1].id.IsNull()) { - gs.RidesEndOfUsedRange--; + gameState.ridesEndOfUsedRange--; } } @@ -202,15 +202,15 @@ Ride* GetRide(RideId index) return nullptr; } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); const auto idx = index.ToUnderlying(); - assert(idx < gameState.Rides.size()); - if (idx >= gameState.Rides.size()) + assert(idx < gameState.rides.size()); + if (idx >= gameState.rides.size()) { return nullptr; } - auto& ride = gameState.Rides[idx]; + auto& ride = gameState.rides[idx]; if (ride.type != kRideTypeNull) { assert(ride.id == index); @@ -224,7 +224,7 @@ const RideObjectEntry* GetRideEntryByIndex(ObjectEntryIndex index) { auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::ride, index); + auto obj = objMgr.GetLoadedObject(index); if (obj == nullptr) { return nullptr; @@ -249,7 +249,7 @@ std::string_view GetRideEntryName(ObjectEntryIndex index) return {}; } -const RideObjectEntry* Ride::GetRideEntry() const +const RideObjectEntry* Ride::getRideEntry() const { return GetRideEntryByIndex(subtype); } @@ -259,10 +259,10 @@ int32_t RideGetCount() return static_cast(GetRideManager().size()); } -size_t Ride::GetNumPrices() const +size_t Ride::getNumPrices() const { size_t result = 0; - const auto& rtd = GetRideTypeDescriptor(); + const auto& rtd = getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::cashMachine || rtd.specialType == RtdSpecialType::firstAid) { result = 0; @@ -275,10 +275,10 @@ size_t Ride::GetNumPrices() const { result = 1; - auto rideEntry = GetRideEntry(); + auto rideEntry = getRideEntry(); if (rideEntry != nullptr) { - if (lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) + if (lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) { result++; } @@ -291,12 +291,12 @@ size_t Ride::GetNumPrices() const return result; } -int32_t Ride::GetAge() const +int32_t Ride::getAge() const { - return GetDate().GetMonthsElapsed() - build_date; + return GetDate().GetMonthsElapsed() - buildDate; } -int32_t Ride::GetTotalQueueLength() const +int32_t Ride::getTotalQueueLength() const { int32_t queueLength = 0; for (const auto& station : stations) @@ -305,7 +305,7 @@ int32_t Ride::GetTotalQueueLength() const return queueLength; } -int32_t Ride::GetMaxQueueTime() const +int32_t Ride::getMaxQueueTime() const { uint8_t queueTime = 0; for (const auto& station : stations) @@ -314,11 +314,11 @@ int32_t Ride::GetMaxQueueTime() const return static_cast(queueTime); } -Guest* Ride::GetQueueHeadGuest(StationIndex stationIndex) const +Guest* Ride::getQueueHeadGuest(StationIndex stationIndex) const { Guest* peep; Guest* result = nullptr; - auto spriteIndex = GetStation(stationIndex).LastPeepInQueue; + auto spriteIndex = getStation(stationIndex).LastPeepInQueue; while ((peep = TryGetEntity(spriteIndex)) != nullptr) { spriteIndex = peep->GuestNextInQueue; @@ -327,11 +327,11 @@ Guest* Ride::GetQueueHeadGuest(StationIndex stationIndex) const return result; } -void Ride::UpdateQueueLength(StationIndex stationIndex) +void Ride::updateQueueLength(StationIndex stationIndex) { uint16_t count = 0; Guest* peep; - auto& station = GetStation(stationIndex); + auto& station = getStation(stationIndex); auto spriteIndex = station.LastPeepInQueue; while ((peep = TryGetEntity(spriteIndex)) != nullptr) { @@ -341,22 +341,22 @@ void Ride::UpdateQueueLength(StationIndex stationIndex) station.QueueLength = count; } -void Ride::QueueInsertGuestAtFront(StationIndex stationIndex, Guest* peep) +void Ride::queueInsertGuestAtFront(StationIndex stationIndex, Guest* peep) { assert(stationIndex.ToUnderlying() < OpenRCT2::Limits::kMaxStationsPerRide); assert(peep != nullptr); peep->GuestNextInQueue = EntityId::GetNull(); - auto* queueHeadGuest = GetQueueHeadGuest(peep->CurrentRideStation); + auto* queueHeadGuest = getQueueHeadGuest(peep->CurrentRideStation); if (queueHeadGuest == nullptr) { - GetStation(peep->CurrentRideStation).LastPeepInQueue = peep->Id; + getStation(peep->CurrentRideStation).LastPeepInQueue = peep->Id; } else { queueHeadGuest->GuestNextInQueue = peep->Id; } - UpdateQueueLength(peep->CurrentRideStation); + updateQueueLength(peep->CurrentRideStation); } /** @@ -366,7 +366,7 @@ void Ride::QueueInsertGuestAtFront(StationIndex stationIndex, Guest* peep) void RideUpdateFavouritedStat() { for (auto& ride : GetRideManager()) - ride.guests_favourite = 0; + ride.guestsFavourite = 0; for (auto peep : EntityList()) { @@ -375,8 +375,8 @@ void RideUpdateFavouritedStat() auto ride = GetRide(peep->FavouriteRide); if (ride != nullptr) { - ride->guests_favourite++; - ride->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; + ride->guestsFavourite++; + ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_CUSTOMER; } } } @@ -389,10 +389,10 @@ void RideUpdateFavouritedStat() * * rct2: 0x006AC3AB */ -money64 Ride::CalculateIncomePerHour() const +money64 Ride::calculateIncomePerHour() const { // Get entry by ride to provide better reporting - const auto* entry = GetRideEntry(); + const auto* entry = getRideEntry(); if (entry == nullptr) { return 0; @@ -406,8 +406,7 @@ money64 Ride::CalculateIncomePerHour() const priceMinusCost -= GetShopItemDescriptor(currentShopItem).Cost; } - currentShopItem = (lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) ? GetRideTypeDescriptor().PhotoItem - : entry->shop_item[1]; + currentShopItem = (lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) ? getRideTypeDescriptor().PhotoItem : entry->shop_item[1]; if (currentShopItem != ShopItem::None) { @@ -415,14 +414,14 @@ money64 Ride::CalculateIncomePerHour() const if (GetShopItemDescriptor(currentShopItem).IsPhoto()) { - const int32_t rideTicketsSold = total_customers - no_secondary_items_sold; + const int32_t rideTicketsSold = totalCustomers - numSecondaryItemsSold; // Use the ratio between photo sold and total admissions to approximate the photo income(as not every guest will buy // one). // TODO: use data from the last 5 minutes instead of all-time values for a more accurate calculation if (rideTicketsSold > 0) { - priceMinusCost += ((static_cast(no_secondary_items_sold) * shopItemProfit) / rideTicketsSold); + priceMinusCost += ((static_cast(numSecondaryItemsSold) * shopItemProfit) / rideTicketsSold); } } else @@ -755,12 +754,12 @@ bool TrackBlockGetPrevious(const CoordsXYE& trackPos, TrackBeginEnd* outTrackBeg * bx result y * esi input / output map element */ -bool Ride::FindTrackGap(const CoordsXYE& input, CoordsXYE* output) const +bool Ride::findTrackGap(const CoordsXYE& input, CoordsXYE* output) const { if (input.element == nullptr || input.element->GetType() != TileElementType::Track) return false; - const auto& rtd = GetRideTypeDescriptor(); + const auto& rtd = getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) return false; @@ -803,24 +802,24 @@ bool Ride::FindTrackGap(const CoordsXYE& input, CoordsXYE* output) const return false; } -void Ride::FormatStatusTo(Formatter& ft) const +void Ride::formatStatusTo(Formatter& ft) const { - if (lifecycle_flags & RIDE_LIFECYCLE_CRASHED) + if (lifecycleFlags & RIDE_LIFECYCLE_CRASHED) { ft.Add(STR_CRASHED); } - else if (lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + else if (lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) { ft.Add(STR_BROKEN_DOWN); } - else if (status == RideStatus::Closed) + else if (status == RideStatus::closed) { - if (!GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (!getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) { - if (num_riders != 0) + if (numRiders != 0) { - ft.Add(num_riders == 1 ? STR_CLOSED_WITH_PERSON : STR_CLOSED_WITH_PEOPLE); - ft.Add(num_riders); + ft.Add(numRiders == 1 ? STR_CLOSED_WITH_PERSON : STR_CLOSED_WITH_PEOPLE); + ft.Add(numRiders); } else { @@ -832,17 +831,17 @@ void Ride::FormatStatusTo(Formatter& ft) const ft.Add(STR_CLOSED); } } - else if (status == RideStatus::Simulating) + else if (status == RideStatus::simulating) { ft.Add(STR_SIMULATING); } - else if (status == RideStatus::Testing) + else if (status == RideStatus::testing) { ft.Add(STR_TEST_RUN); } - else if (mode == RideMode::Race && !(lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) && !race_winner.IsNull()) + else if (mode == RideMode::race && !(lifecycleFlags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) && !raceWinner.IsNull()) { - auto peep = GetEntity(race_winner); + auto peep = GetEntity(raceWinner); if (peep != nullptr) { ft.Add(STR_RACE_WON_BY); @@ -854,10 +853,10 @@ void Ride::FormatStatusTo(Formatter& ft) const ft.Add(kStringIdNone); } } - else if (!GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + else if (!getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) { - ft.Add(num_riders == 1 ? STR_PERSON_ON_RIDE : STR_PEOPLE_ON_RIDE); - ft.Add(num_riders); + ft.Add(numRiders == 1 ? STR_PERSON_ON_RIDE : STR_PEOPLE_ON_RIDE); + ft.Add(numRiders); } else { @@ -865,55 +864,55 @@ void Ride::FormatStatusTo(Formatter& ft) const } } -int32_t Ride::GetTotalLength() const +int32_t Ride::getTotalLength() const { int32_t i, totalLength = 0; - for (i = 0; i < num_stations; i++) + for (i = 0; i < numStations; i++) totalLength += stations[i].SegmentLength; return totalLength; } -int32_t Ride::GetTotalTime() const +int32_t Ride::getTotalTime() const { int32_t i, totalTime = 0; - for (i = 0; i < num_stations; i++) + for (i = 0; i < numStations; i++) totalTime += stations[i].SegmentTime; return totalTime; } -bool Ride::CanHaveMultipleCircuits() const +bool Ride::canHaveMultipleCircuits() const { - if (!(GetRideTypeDescriptor().HasFlag(RtdFlag::allowMultipleCircuits))) + if (!(getRideTypeDescriptor().HasFlag(RtdFlag::allowMultipleCircuits))) return false; // Only allow circuit or launch modes - if (mode != RideMode::ContinuousCircuit && mode != RideMode::ReverseInclineLaunchedShuttle - && mode != RideMode::PoweredLaunchPasstrough) + if (mode != RideMode::continuousCircuit && mode != RideMode::reverseInclineLaunchedShuttle + && mode != RideMode::poweredLaunchPasstrough) { return false; } // Must have no more than one vehicle and one station - if (NumTrains > 1 || num_stations > 1) + if (numTrains > 1 || numStations > 1) return false; return true; } -bool Ride::SupportsStatus(RideStatus s) const +bool Ride::supportsStatus(RideStatus s) const { - const auto& rtd = GetRideTypeDescriptor(); + const auto& rtd = getRideTypeDescriptor(); switch (s) { - case RideStatus::Closed: - case RideStatus::Open: + case RideStatus::closed: + case RideStatus::open: return true; - case RideStatus::Simulating: + case RideStatus::simulating: return (!rtd.HasFlag(RtdFlag::noTestMode) && rtd.HasFlag(RtdFlag::hasTrack)); - case RideStatus::Testing: + case RideStatus::testing: return !rtd.HasFlag(RtdFlag::noTestMode); - case RideStatus::Count: // Meaningless but necessary to satisfy -Wswitch + case RideStatus::count: // Meaningless but necessary to satisfy -Wswitch return false; } // Unreachable @@ -928,9 +927,9 @@ bool Ride::SupportsStatus(RideStatus s) const */ void RideInitAll() { - auto& gameState = GetGameState(); - std::for_each(std::begin(gameState.Rides), std::end(gameState.Rides), RideReset); - gameState.RidesEndOfUsedRange = 0; + auto& gameState = getGameState(); + std::for_each(std::begin(gameState.rides), std::end(gameState.rides), RideReset); + gameState.ridesEndOfUsedRange = 0; } /** @@ -941,7 +940,7 @@ void ResetAllRideBuildDates() { for (auto& ride : GetRideManager()) { - ride.build_date -= GetDate().GetMonthsElapsed(); + ride.buildDate -= GetDate().GetMonthsElapsed(); } } @@ -957,20 +956,20 @@ void ResetAllRideBuildDates() * * rct2: 0x006ABE4C */ -void Ride::UpdateAll() +void Ride::updateAll() { PROFILED_FUNCTION(); // Remove all rides if scenario editor - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) { - switch (GetGameState().EditorStep) + switch (getGameState().editorStep) { case EditorStep::ObjectSelection: case EditorStep::LandscapeEditor: case EditorStep::InventionsListSetUp: for (auto& ride : GetRideManager()) - ride.Delete(); + ride.remove(); break; case EditorStep::OptionsSelection: case EditorStep::ObjectiveSelection: @@ -987,14 +986,14 @@ void Ride::UpdateAll() // Update rides for (auto& ride : GetRideManager()) - ride.Update(); + ride.update(); OpenRCT2::RideAudio::UpdateMusicChannels(); } -std::unique_ptr Ride::SaveToTrackDesign(TrackDesignState& tds) const +std::unique_ptr Ride::saveToTrackDesign(TrackDesignState& tds) const { - if (!(lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(lifecycleFlags & RIDE_LIFECYCLE_TESTED)) { ContextShowError(STR_CANT_SAVE_TRACK_DESIGN, kStringIdNone, {}); return nullptr; @@ -1021,12 +1020,12 @@ std::unique_ptr Ride::SaveToTrackDesign(TrackDesignState& tds) cons return td; } -RideStation& Ride::GetStation(StationIndex stationIndex) +RideStation& Ride::getStation(StationIndex stationIndex) { return stations[stationIndex.ToUnderlying()]; } -StationIndex::UnderlyingType Ride::GetStationNumber(StationIndex in) const +StationIndex::UnderlyingType Ride::getStationNumber(StationIndex in) const { StationIndex::UnderlyingType nullStationsSeen{ 0 }; for (size_t i = 0; i < in.ToUnderlying(); i++) @@ -1040,22 +1039,22 @@ StationIndex::UnderlyingType Ride::GetStationNumber(StationIndex in) const return in.ToUnderlying() - nullStationsSeen + 1; } -const RideStation& Ride::GetStation(StationIndex stationIndex) const +const RideStation& Ride::getStation(StationIndex stationIndex) const { return stations[stationIndex.ToUnderlying()]; } -std::span Ride::GetStations() +std::span Ride::getStations() { return stations; } -std::span Ride::GetStations() const +std::span Ride::getStations() const { return stations; } -StationIndex Ride::GetStationIndex(const RideStation* station) const +StationIndex Ride::getStationIndex(const RideStation* station) const { auto distance = std::distance(stations.data(), station); Guard::Assert(distance >= 0 && distance < int32_t(std::size(stations))); @@ -1066,42 +1065,42 @@ StationIndex Ride::GetStationIndex(const RideStation* station) const * * rct2: 0x006ABE73 */ -void Ride::Update() +void Ride::update() { - if (vehicle_change_timeout != 0) - vehicle_change_timeout--; + if (vehicleChangeTimeout != 0) + vehicleChangeTimeout--; RideMusicUpdate(*this); // Update stations - const auto& rtd = GetRideTypeDescriptor(); + const auto& rtd = getRideTypeDescriptor(); if (rtd.specialType != RtdSpecialType::maze) for (StationIndex::UnderlyingType i = 0; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) RideUpdateStation(*this, StationIndex::FromUnderlying(i)); // Update financial statistics - num_customers_timeout++; + numCustomersTimeout++; - if (num_customers_timeout >= 960) + if (numCustomersTimeout >= 960) { // This is meant to update about every 30 seconds - num_customers_timeout = 0; + numCustomersTimeout = 0; // Shift number of customers history, start of the array is the most recent one for (int32_t i = OpenRCT2::Limits::kCustomerHistorySize - 1; i > 0; i--) { - num_customers[i] = num_customers[i - 1]; + numCustomers[i] = numCustomers[i - 1]; } - num_customers[0] = cur_num_customers; + numCustomers[0] = curNumCustomers; - cur_num_customers = 0; - window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; + curNumCustomers = 0; + windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_CUSTOMER; - income_per_hour = CalculateIncomePerHour(); - window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + incomePerHour = calculateIncomePerHour(); + windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME; - if (upkeep_cost != kMoney64Undefined) - profit = income_per_hour - (upkeep_cost * 16); + if (upkeepCost != kMoney64Undefined) + profit = incomePerHour - (upkeepCost * 16); } // Ride specific updates @@ -1111,12 +1110,12 @@ void Ride::Update() RideBreakdownUpdate(*this); // Various things include news messages - if (lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION)) + if (lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION)) { // Breakdown updates originally were performed when (id == (gCurrentTicks / 2) & 0xFF) // with the increased MAX_RIDES the update is tied to the first byte of the id this allows // for identical balance with vanilla. - const auto updatingRideByte = static_cast((GetGameState().CurrentTicks / 2) & 0xFF); + const auto updatingRideByte = static_cast((getGameState().currentTicks / 2) & 0xFF); if (updatingRideByte == static_cast(id.ToUnderlying())) RideBreakdownStatusUpdate(*this); } @@ -1124,18 +1123,18 @@ void Ride::Update() RideInspectionUpdate(*this); // If ride is simulating but crashed, reset the vehicles - if (status == RideStatus::Simulating && (lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) + if (status == RideStatus::simulating && (lifecycleFlags & RIDE_LIFECYCLE_CRASHED)) { - if (mode == RideMode::ContinuousCircuitBlockSectioned || mode == RideMode::PoweredLaunchBlockSectioned) + if (mode == RideMode::continuousCircuitBlockSectioned || mode == RideMode::poweredLaunchBlockSectioned) { // We require this to execute right away during the simulation, always ignore network and queue. - RideSetStatusAction gameAction = RideSetStatusAction(id, RideStatus::Closed); + RideSetStatusAction gameAction = RideSetStatusAction(id, RideStatus::closed); GameActions::ExecuteNested(&gameAction); } else { // We require this to execute right away during the simulation, always ignore network and queue. - RideSetStatusAction gameAction = RideSetStatusAction(id, RideStatus::Simulating); + RideSetStatusAction gameAction = RideSetStatusAction(id, RideStatus::simulating); GameActions::ExecuteNested(&gameAction); } } @@ -1145,23 +1144,23 @@ void Ride::Update() * * rct2: 0x006AC489 */ -void UpdateChairlift(Ride& ride) +void updateChairlift(Ride& ride) { - if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + if (!(ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) return; - if ((ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) - && ride.breakdown_reason_pending == 0) + if ((ride.lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) + && ride.breakdownReasonPending == 0) return; - uint16_t old_chairlift_bullwheel_rotation = ride.chairlift_bullwheel_rotation >> 14; - ride.chairlift_bullwheel_rotation += ride.speed * 2048; - if (old_chairlift_bullwheel_rotation == ride.speed / 8) + uint16_t oldChairliftBullwheelRotation = ride.chairliftBullwheelRotation >> 14; + ride.chairliftBullwheelRotation += ride.speed * 2048; + if (oldChairliftBullwheelRotation == ride.speed / 8) return; - auto bullwheelLoc = ride.ChairliftBullwheelLocation[0].ToCoordsXYZ(); + auto bullwheelLoc = ride.chairliftBullwheelLocation[0].ToCoordsXYZ(); MapInvalidateTileZoom1({ bullwheelLoc, bullwheelLoc.z, bullwheelLoc.z + (4 * kCoordsZStep) }); - bullwheelLoc = ride.ChairliftBullwheelLocation[1].ToCoordsXYZ(); + bullwheelLoc = ride.chairliftBullwheelLocation[1].ToCoordsXYZ(); MapInvalidateTileZoom1({ bullwheelLoc, bullwheelLoc.z, bullwheelLoc.z + (4 * kCoordsZStep) }); } @@ -1171,16 +1170,16 @@ void UpdateChairlift(Ride& ride) * edi: ride (in code as bytes offset from start of rides list) * bl: happiness */ -void Ride::UpdateSatisfaction(const uint8_t happiness) +void Ride::updateSatisfaction(const uint8_t happiness) { - satisfaction_next += happiness; - satisfaction_time_out++; - if (satisfaction_time_out >= 20) + satisfactionNext += happiness; + satisfactionTimeout++; + if (satisfactionTimeout >= 20) { - satisfaction = satisfaction_next >> 2; - satisfaction_next = 0; - satisfaction_time_out = 0; - window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; + satisfaction = satisfactionNext >> 2; + satisfactionNext = 0; + satisfactionTimeout = 0; + windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_CUSTOMER; } } @@ -1192,17 +1191,17 @@ void Ride::UpdateSatisfaction(const uint8_t happiness) * bl : pop_amount * pop_amount can be zero if peep visited but did not purchase. */ -void Ride::UpdatePopularity(const uint8_t pop_amount) +void Ride::updatePopularity(const uint8_t pop_amount) { - popularity_next += pop_amount; - popularity_time_out++; - if (popularity_time_out < 25) + popularityNext += pop_amount; + popularityTimeout++; + if (popularityTimeout < 25) return; - popularity = popularity_next; - popularity_next = 0; - popularity_time_out = 0; - window_invalidate_flags |= RIDE_INVALIDATE_RIDE_CUSTOMER; + popularity = popularityNext; + popularityNext = 0; + popularityTimeout = 0; + windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_CUSTOMER; } /** rct2: 0x0098DDB8, 0x0098DDBA */ @@ -1238,19 +1237,19 @@ static constexpr CoordsXY ride_spiral_slide_main_tile_offset[][4] = { * rct2: 0x006AC545 */ -void UpdateSpiralSlide(Ride& ride) +void updateSpiralSlide(Ride& ride) { - if (GetGameState().CurrentTicks & 3) + if (getGameState().currentTicks & 3) return; - if (ride.slide_in_use == 0) + if (ride.slideInUse == 0) return; - ride.spiral_slide_progress++; - if (ride.spiral_slide_progress >= 48) + ride.spiralSlideProgress++; + if (ride.spiralSlideProgress >= 48) { - ride.slide_in_use--; + ride.slideInUse--; - auto* peep = GetEntity(ride.slide_peep); + auto* peep = GetEntity(ride.slidePeep); if (peep != nullptr) { auto destination = peep->GetDestination(); @@ -1300,62 +1299,62 @@ static uint8_t _breakdownProblemProbabilities[] = { */ static void RideInspectionUpdate(Ride& ride) { - if (GetGameState().CurrentTicks & 2047) + if (getGameState().currentTicks & 2047) return; - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + if (gLegacyScene == LegacyScene::trackDesigner) return; - ride.last_inspection++; - if (ride.last_inspection == 0) - ride.last_inspection--; + ride.lastInspection++; + if (ride.lastInspection == 0) + ride.lastInspection--; - int32_t inspectionIntervalMinutes = RideInspectionInterval[ride.inspection_interval]; + int32_t inspectionIntervalMinutes = RideInspectionInterval[ride.inspectionInterval]; // An inspection interval of 0 minutes means the ride is set to never be inspected. if (inspectionIntervalMinutes == 0) { - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; return; } - if (ride.GetRideTypeDescriptor().AvailableBreakdowns == 0) + if (ride.getRideTypeDescriptor().AvailableBreakdowns == 0) return; - if (inspectionIntervalMinutes > ride.last_inspection) + if (inspectionIntervalMinutes > ride.lastInspection) return; - if (ride.lifecycle_flags + if (ride.lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION | RIDE_LIFECYCLE_CRASHED)) return; // Inspect the first station that has an exit - ride.lifecycle_flags |= RIDE_LIFECYCLE_DUE_INSPECTION; - ride.mechanic_status = RIDE_MECHANIC_STATUS_CALLING; + ride.lifecycleFlags |= RIDE_LIFECYCLE_DUE_INSPECTION; + ride.mechanicStatus = RIDE_MECHANIC_STATUS_CALLING; auto stationIndex = RideGetFirstValidStationExit(ride); - ride.inspection_station = (!stationIndex.IsNull()) ? stationIndex : StationIndex::FromUnderlying(0); + ride.inspectionStation = (!stationIndex.IsNull()) ? stationIndex : StationIndex::FromUnderlying(0); } -static int32_t GetAgePenalty(const Ride& ride) +static int32_t getAgePenalty(const Ride& ride) { - auto years = DateGetYear(ride.GetAge()); + auto years = DateGetYear(ride.getAge()); switch (years) { case 0: return 0; case 1: - return ride.unreliability_factor / 8; + return ride.unreliabilityFactor / 8; case 2: - return ride.unreliability_factor / 4; + return ride.unreliabilityFactor / 4; case 3: case 4: - return ride.unreliability_factor / 2; + return ride.unreliabilityFactor / 2; case 5: case 6: case 7: - return ride.unreliability_factor; + return ride.unreliabilityFactor; default: - return ride.unreliability_factor * 2; + return ride.unreliabilityFactor * 2; } } @@ -1365,16 +1364,16 @@ static int32_t GetAgePenalty(const Ride& ride) */ static void RideBreakdownUpdate(Ride& ride) { - auto& gameState = GetGameState(); - const auto currentTicks = gameState.CurrentTicks; + auto& gameState = getGameState(); + const auto currentTicks = gameState.currentTicks; if (currentTicks & 255) return; - if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + if (gLegacyScene == LegacyScene::trackDesigner) return; - if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) - ride.downtime_history[0]++; + if (ride.lifecycleFlags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) + ride.downtimeHistory[0]++; if (!(currentTicks & 8191)) { @@ -1382,35 +1381,35 @@ static void RideBreakdownUpdate(Ride& ride) for (int32_t i = 0; i < OpenRCT2::Limits::kDowntimeHistorySize; i++) { - totalDowntime += ride.downtime_history[i]; + totalDowntime += ride.downtimeHistory[i]; } ride.downtime = std::min(totalDowntime / 2, 100); for (int32_t i = OpenRCT2::Limits::kDowntimeHistorySize - 1; i > 0; i--) { - ride.downtime_history[i] = ride.downtime_history[i - 1]; + ride.downtimeHistory[i] = ride.downtimeHistory[i - 1]; } - ride.downtime_history[0] = 0; + ride.downtimeHistory[0] = 0; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; } - if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) + if (ride.lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) return; - if (ride.status == RideStatus::Closed || ride.status == RideStatus::Simulating) + if (ride.status == RideStatus::closed || ride.status == RideStatus::simulating) return; - if (!ride.CanBreakDown()) + if (!ride.canBreakDown()) { ride.reliability = kRideInitialReliability; return; } // Calculate breakdown probability? - int32_t unreliabilityAccumulator = ride.unreliability_factor + GetAgePenalty(ride); + int32_t unreliabilityAccumulator = ride.unreliabilityFactor + getAgePenalty(ride); ride.reliability = static_cast(std::max(0, (ride.reliability - unreliabilityAccumulator))); - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; // Random probability of a breakdown. Roughly this is 1 in // @@ -1420,7 +1419,7 @@ static void RideBreakdownUpdate(Ride& ride) // continues. if ((ride.reliability == 0 || static_cast(ScenarioRand() & 0x2FFFFF) <= 1u + kRideInitialReliability - ride.reliability) - && !gameState.Cheats.disableAllBreakdowns) + && !gameState.cheats.disableAllBreakdowns) { int32_t breakdownReason = RideGetNewBreakdownProblem(ride); if (breakdownReason != -1) @@ -1437,10 +1436,10 @@ static int32_t RideGetNewBreakdownProblem(const Ride& ride) // Brake failure is more likely when it's raining or heavily snowing (HeavySnow and Blizzard) _breakdownProblemProbabilities[BREAKDOWN_BRAKES_FAILURE] = (ClimateIsRaining() || ClimateIsSnowingHeavily()) ? 20 : 3; - if (!ride.CanBreakDown()) + if (!ride.canBreakDown()) return -1; - int32_t availableBreakdownProblems = ride.GetRideTypeDescriptor().AvailableBreakdowns; + int32_t availableBreakdownProblems = ride.getRideTypeDescriptor().AvailableBreakdowns; // Calculate the total probability range for all possible breakdown problems int32_t totalProbability = 0; @@ -1473,45 +1472,45 @@ static int32_t RideGetNewBreakdownProblem(const Ride& ride) // Brakes failure can not happen if block brakes are used (so long as there is more than one vehicle) // However if this is the case, brake failure should be taken out the equation, otherwise block brake // rides have a lower probability to break down due to a random implementation reason. - if (ride.IsBlockSectioned()) - if (ride.NumTrains != 1) + if (ride.isBlockSectioned()) + if (ride.numTrains != 1) return -1; // If brakes failure is disabled, also take it out of the equation (see above comment why) - if (GetGameState().Cheats.disableBrakesFailure) + if (getGameState().cheats.disableBrakesFailure) return -1; - auto monthsOld = ride.GetAge(); - if (monthsOld < 16 || ride.reliability_percentage > 50) + auto monthsOld = ride.getAge(); + if (monthsOld < 16 || ride.reliabilityPercentage > 50) return -1; return BREAKDOWN_BRAKES_FAILURE; } -bool Ride::CanBreakDown() const +bool Ride::canBreakDown() const { - if (GetRideTypeDescriptor().AvailableBreakdowns == 0) + if (getRideTypeDescriptor().AvailableBreakdowns == 0) { return false; } - const auto* entry = GetRideEntry(); + const auto* entry = getRideEntry(); return entry != nullptr && !(entry->flags & RIDE_ENTRY_FLAG_CANNOT_BREAK_DOWN); } static void ChooseRandomTrainToBreakdownSafe(Ride& ride) { // Prevent integer division by zero in case of hacked ride. - if (ride.NumTrains == 0) + if (ride.numTrains == 0) return; - ride.broken_vehicle = ScenarioRand() % ride.NumTrains; + ride.brokenTrain = ScenarioRand() % ride.numTrains; // Prevent crash caused by accessing SPRITE_INDEX_NULL on hacked rides. // This should probably be cleaned up on import instead. - while (ride.vehicles[ride.broken_vehicle].IsNull() && ride.broken_vehicle != 0) + while (ride.vehicles[ride.brokenTrain].IsNull() && ride.brokenTrain != 0) { - --ride.broken_vehicle; + --ride.brokenTrain; } } @@ -1524,15 +1523,15 @@ void RidePrepareBreakdown(Ride& ride, int32_t breakdownReason) StationIndex i; Vehicle* vehicle; - if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) + if (ride.lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) return; - ride.lifecycle_flags |= RIDE_LIFECYCLE_BREAKDOWN_PENDING; + ride.lifecycleFlags |= RIDE_LIFECYCLE_BREAKDOWN_PENDING; - ride.breakdown_reason_pending = breakdownReason; - ride.breakdown_sound_modifier = 0; - ride.not_fixed_timeout = 0; - ride.inspection_station = StationIndex::FromUnderlying(0); // ensure set to something. + ride.breakdownReasonPending = breakdownReason; + ride.breakdownSoundModifier = 0; + ride.notFixedTimeout = 0; + ride.inspectionStation = StationIndex::FromUnderlying(0); // ensure set to something. switch (breakdownReason) { @@ -1542,7 +1541,7 @@ void RidePrepareBreakdown(Ride& ride, int32_t breakdownReason) i = RideGetFirstValidStationExit(ride); if (!i.IsNull()) { - ride.inspection_station = i; + ride.inspectionStation = i; } break; @@ -1552,15 +1551,15 @@ void RidePrepareBreakdown(Ride& ride, int32_t breakdownReason) case BREAKDOWN_DOORS_STUCK_OPEN: // Choose a random train and car ChooseRandomTrainToBreakdownSafe(ride); - if (ride.num_cars_per_train != 0) + if (ride.numCarsPerTrain != 0) { - ride.broken_car = ScenarioRand() % ride.num_cars_per_train; + ride.brokenCar = ScenarioRand() % ride.numCarsPerTrain; // Set flag on broken car - vehicle = GetEntity(ride.vehicles[ride.broken_vehicle]); + vehicle = GetEntity(ride.vehicles[ride.brokenTrain]); if (vehicle != nullptr) { - vehicle = vehicle->GetCar(ride.broken_car); + vehicle = vehicle->GetCar(ride.brokenCar); } if (vehicle != nullptr) { @@ -1571,10 +1570,10 @@ void RidePrepareBreakdown(Ride& ride, int32_t breakdownReason) case BREAKDOWN_VEHICLE_MALFUNCTION: // Choose a random train ChooseRandomTrainToBreakdownSafe(ride); - ride.broken_car = 0; + ride.brokenCar = 0; // Set flag on broken train, first car - vehicle = GetEntity(ride.vehicles[ride.broken_vehicle]); + vehicle = GetEntity(ride.vehicles[ride.brokenTrain]); if (vehicle != nullptr) { vehicle->SetFlag(VehicleFlags::TrainIsBroken); @@ -1586,7 +1585,7 @@ void RidePrepareBreakdown(Ride& ride, int32_t breakdownReason) i = RideGetFirstValidStationExit(ride); if (!i.IsNull()) { - ride.inspection_station = i; + ride.inspectionStation = i; } break; } @@ -1601,7 +1600,7 @@ void RideBreakdownAddNewsItem(const Ride& ride) if (Config::Get().notifications.RideBrokenDown) { Formatter ft; - ride.FormatNameTo(ft); + ride.formatNameTo(ft); News::AddItemToQueue(News::ItemType::Ride, STR_RIDE_IS_BROKEN_DOWN, ride.id.ToUnderlying(), ft); } } @@ -1613,28 +1612,28 @@ void RideBreakdownAddNewsItem(const Ride& ride) static void RideBreakdownStatusUpdate(Ride& ride) { // Warn player if ride hasn't been fixed for ages - if (ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) { - ride.not_fixed_timeout++; + ride.notFixedTimeout++; // When there has been a full 255 timeout ticks this // will force timeout ticks to keep issuing news every // 16 ticks. Note there is no reason to do this. - if (ride.not_fixed_timeout == 0) - ride.not_fixed_timeout -= 16; + if (ride.notFixedTimeout == 0) + ride.notFixedTimeout -= 16; - if (!(ride.not_fixed_timeout & 15) && ride.mechanic_status != RIDE_MECHANIC_STATUS_FIXING - && ride.mechanic_status != RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) + if (!(ride.notFixedTimeout & 15) && ride.mechanicStatus != RIDE_MECHANIC_STATUS_FIXING + && ride.mechanicStatus != RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) { if (Config::Get().notifications.RideWarnings) { Formatter ft; - ride.FormatNameTo(ft); + ride.formatNameTo(ft); News::AddItemToQueue(News::ItemType::Ride, STR_RIDE_IS_STILL_NOT_FIXED, ride.id.ToUnderlying(), ft); } } } - RideMechanicStatusUpdate(ride, ride.mechanic_status); + RideMechanicStatusUpdate(ride, ride.mechanicStatus); } /** @@ -1646,31 +1645,31 @@ static void RideMechanicStatusUpdate(Ride& ride, int32_t mechanicStatus) // Turn a pending breakdown into a breakdown. if ((mechanicStatus == RIDE_MECHANIC_STATUS_UNDEFINED || mechanicStatus == RIDE_MECHANIC_STATUS_CALLING || mechanicStatus == RIDE_MECHANIC_STATUS_HEADING) - && (ride.lifecycle_flags & RIDE_LIFECYCLE_BREAKDOWN_PENDING) && !(ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + && (ride.lifecycleFlags & RIDE_LIFECYCLE_BREAKDOWN_PENDING) && !(ride.lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { - auto breakdownReason = ride.breakdown_reason_pending; + auto breakdownReason = ride.breakdownReasonPending; if (breakdownReason == BREAKDOWN_SAFETY_CUT_OUT || breakdownReason == BREAKDOWN_BRAKES_FAILURE || breakdownReason == BREAKDOWN_CONTROL_FAILURE) { - ride.lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_LIST + ride.lifecycleFlags |= RIDE_LIFECYCLE_BROKEN_DOWN; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAIN; - ride.breakdown_reason = breakdownReason; + ride.breakdownReason = breakdownReason; RideBreakdownAddNewsItem(ride); } } switch (mechanicStatus) { case RIDE_MECHANIC_STATUS_UNDEFINED: - if (ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) { - ride.mechanic_status = RIDE_MECHANIC_STATUS_CALLING; + ride.mechanicStatus = RIDE_MECHANIC_STATUS_CALLING; } break; case RIDE_MECHANIC_STATUS_CALLING: - if (ride.GetRideTypeDescriptor().AvailableBreakdowns == 0) + if (ride.getRideTypeDescriptor().AvailableBreakdowns == 0) { - ride.lifecycle_flags &= ~( + ride.lifecycleFlags &= ~( RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_DUE_INSPECTION); break; } @@ -1680,13 +1679,13 @@ static void RideMechanicStatusUpdate(Ride& ride, int32_t mechanicStatus) case RIDE_MECHANIC_STATUS_HEADING: { auto mechanic = RideGetMechanic(ride); - bool rideNeedsRepair = (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)); + bool rideNeedsRepair = (ride.lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)); if (mechanic == nullptr || (mechanic->State != PeepState::HeadingToInspection && mechanic->State != PeepState::Answering) || mechanic->CurrentRide != ride.id) { - ride.mechanic_status = RIDE_MECHANIC_STATUS_CALLING; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.mechanicStatus = RIDE_MECHANIC_STATUS_CALLING; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; RideMechanicStatusUpdate(ride, RIDE_MECHANIC_STATUS_CALLING); } // if the ride is broken down, but a mechanic was heading for an inspection, update orders to fix @@ -1705,8 +1704,8 @@ static void RideMechanicStatusUpdate(Ride& ride, int32_t mechanicStatus) || (mechanic->State != PeepState::HeadingToInspection && mechanic->State != PeepState::Fixing && mechanic->State != PeepState::Inspecting && mechanic->State != PeepState::Answering)) { - ride.mechanic_status = RIDE_MECHANIC_STATUS_CALLING; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.mechanicStatus = RIDE_MECHANIC_STATUS_CALLING; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; RideMechanicStatusUpdate(ride, RIDE_MECHANIC_STATUS_CALLING); } break; @@ -1722,11 +1721,11 @@ static void RideCallMechanic(Ride& ride, Peep* mechanic, int32_t forInspection) { mechanic->SetState(forInspection ? PeepState::HeadingToInspection : PeepState::Answering); mechanic->SubState = 0; - ride.mechanic_status = RIDE_MECHANIC_STATUS_HEADING; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.mechanicStatus = RIDE_MECHANIC_STATUS_HEADING; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAINTENANCE; ride.mechanic = mechanic->Id; mechanic->CurrentRide = ride.id; - mechanic->CurrentRideStation = ride.inspection_station; + mechanic->CurrentRideStation = ride.inspectionStation; } /** @@ -1735,7 +1734,7 @@ static void RideCallMechanic(Ride& ride, Peep* mechanic, int32_t forInspection) */ static void RideCallClosestMechanic(Ride& ride) { - auto forInspection = (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) == 0; + auto forInspection = (ride.lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) == 0; auto mechanic = RideFindClosestMechanic(ride, forInspection); if (mechanic != nullptr) RideCallMechanic(ride, mechanic, forInspection); @@ -1744,7 +1743,7 @@ static void RideCallClosestMechanic(Ride& ride) Staff* RideFindClosestMechanic(const Ride& ride, int32_t forInspection) { // Get either exit position or entrance position if there is no exit - auto& station = ride.GetStation(ride.inspection_station); + auto& station = ride.getStation(ride.inspectionStation); TileCoordsXYZD location = station.Exit; if (location.IsNull()) { @@ -1831,10 +1830,10 @@ Staff* RideGetMechanic(const Ride& ride) Staff* RideGetAssignedMechanic(const Ride& ride) { - if (ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) { - if (ride.mechanic_status == RIDE_MECHANIC_STATUS_HEADING || ride.mechanic_status == RIDE_MECHANIC_STATUS_FIXING - || ride.mechanic_status == RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) + if (ride.mechanicStatus == RIDE_MECHANIC_STATUS_HEADING || ride.mechanicStatus == RIDE_MECHANIC_STATUS_FIXING + || ride.mechanicStatus == RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) { return RideGetMechanic(ride); } @@ -1856,10 +1855,10 @@ static int32_t RideMusicSampleRate(const Ride& ride) int32_t sampleRate = 22050; // Alter sample rate for a power cut effect - if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) + if (ride.lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) { - sampleRate = ride.breakdown_sound_modifier * 70; - if (ride.breakdown_reason_pending != BREAKDOWN_CONTROL_FAILURE) + sampleRate = ride.breakdownSoundModifier * 70; + if (ride.breakdownReasonPending != BREAKDOWN_CONTROL_FAILURE) sampleRate *= -1; sampleRate += 22050; } @@ -1874,26 +1873,26 @@ static int32_t RideMusicSampleRate(const Ride& ride) static bool RideMusicBreakdownEffect(Ride& ride) { // Oscillate parameters for a power cut effect when breaking down - if (ride.lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) + if (ride.lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) { - if (ride.breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE) + if (ride.breakdownReasonPending == BREAKDOWN_CONTROL_FAILURE) { - if (!(GetGameState().CurrentTicks & 7)) - if (ride.breakdown_sound_modifier != 255) - ride.breakdown_sound_modifier++; + if (!(getGameState().currentTicks & 7)) + if (ride.breakdownSoundModifier != 255) + ride.breakdownSoundModifier++; } else { - if ((ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) || ride.breakdown_reason_pending == BREAKDOWN_BRAKES_FAILURE - || ride.breakdown_reason_pending == BREAKDOWN_CONTROL_FAILURE) + if ((ride.lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) || ride.breakdownReasonPending == BREAKDOWN_BRAKES_FAILURE + || ride.breakdownReasonPending == BREAKDOWN_CONTROL_FAILURE) { - if (ride.breakdown_sound_modifier != 255) - ride.breakdown_sound_modifier++; + if (ride.breakdownSoundModifier != 255) + ride.breakdownSoundModifier++; } - if (ride.breakdown_sound_modifier == 255) + if (ride.breakdownSoundModifier == 255) { - ride.music_tune_id = kTuneIDNull; + ride.musicTuneId = kTuneIDNull; return true; } } @@ -1910,8 +1909,8 @@ void CircusMusicUpdate(Ride& ride) Vehicle* vehicle = GetEntity(ride.vehicles[0]); if (vehicle == nullptr || vehicle->status != Vehicle::Status::DoingCircusShow) { - ride.music_position = 0; - ride.music_tune_id = kTuneIDNull; + ride.musicPosition = 0; + ride.musicTuneId = kTuneIDNull; return; } @@ -1920,7 +1919,7 @@ void CircusMusicUpdate(Ride& ride) return; } - CoordsXYZ rideCoords = ride.GetStation().GetStart().ToTileCentre(); + CoordsXYZ rideCoords = ride.getStation().GetStart().ToTileCentre(); const auto sampleRate = RideMusicSampleRate(ride); @@ -1933,9 +1932,9 @@ void CircusMusicUpdate(Ride& ride) */ void DefaultMusicUpdate(Ride& ride) { - if (ride.status != RideStatus::Open || !(ride.lifecycle_flags & RIDE_LIFECYCLE_MUSIC)) + if (ride.status != RideStatus::open || !(ride.lifecycleFlags & RIDE_LIFECYCLE_MUSIC)) { - ride.music_tune_id = kTuneIDNull; + ride.musicTuneId = kTuneIDNull; return; } @@ -1945,20 +1944,20 @@ void DefaultMusicUpdate(Ride& ride) } // Select random tune from available tunes for a music style (of course only merry-go-rounds have more than one tune) - if (ride.music_tune_id == kTuneIDNull) + if (ride.musicTuneId == kTuneIDNull) { auto& objManager = GetContext()->GetObjectManager(); auto musicObj = objManager.GetLoadedObject(ride.music); if (musicObj != nullptr) { auto numTracks = musicObj->GetTrackCount(); - ride.music_tune_id = static_cast(UtilRand() % numTracks); - ride.music_position = 0; + ride.musicTuneId = static_cast(UtilRand() % numTracks); + ride.musicPosition = 0; } return; } - CoordsXYZ rideCoords = ride.GetStation().GetStart().ToTileCentre(); + CoordsXYZ rideCoords = ride.getStation().GetStart().ToTileCentre(); int32_t sampleRate = RideMusicSampleRate(ride); @@ -1967,7 +1966,7 @@ void DefaultMusicUpdate(Ride& ride) static void RideMusicUpdate(Ride& ride) { - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); if (!rtd.HasFlag(RtdFlag::hasMusicByDefault) && !rtd.HasFlag(RtdFlag::allowMusic)) return; @@ -2018,7 +2017,7 @@ static void RideMeasurementUpdate(Ride& ride, RideMeasurement& measurement) if (measurement.current_item >= RideMeasurement::kMaxItems) return; - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; if (measurement.flags & RIDE_MEASUREMENT_FLAG_G_FORCES) { @@ -2063,14 +2062,14 @@ void RideMeasurementsUpdate() { PROFILED_FUNCTION(); - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) return; // For each ride measurement for (auto& ride : GetRideManager()) { auto measurement = ride.measurement.get(); - if (measurement != nullptr && (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) && ride.status != RideStatus::Simulating) + if (measurement != nullptr && (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK) && ride.status != RideStatus::simulating) { if (measurement->flags & RIDE_MEASUREMENT_FLAG_RUNNING) { @@ -2079,7 +2078,7 @@ void RideMeasurementsUpdate() else { // For each vehicle - for (int32_t j = 0; j < ride.NumTrains; j++) + for (int32_t j = 0; j < ride.numTrains; j++) { auto vehicleSpriteIdx = ride.vehicles[j]; auto vehicle = GetEntity(vehicleSpriteIdx); @@ -2131,9 +2130,9 @@ static void RideFreeOldMeasurements() } while (numRideMeasurements > kMaxRideMeasurements); } -std::pair Ride::GetMeasurement() +std::pair Ride::getMeasurement() { - const auto& rtd = GetRideTypeDescriptor(); + const auto& rtd = getRideTypeDescriptor(); // Check if ride type supports data logging if (!rtd.HasFlag(RtdFlag::hasDataLogging)) @@ -2153,7 +2152,7 @@ std::pair Ride::GetMeasurement() assert(measurement != nullptr); } - measurement->last_use_tick = GetGameState().CurrentTicks; + measurement->last_use_tick = getGameState().currentTicks; if (measurement->flags & 1) { return { measurement.get(), { kStringIdEmpty, {} } }; @@ -2172,8 +2171,8 @@ std::pair Ride::GetMeasurement() VehicleColour RideGetVehicleColour(const Ride& ride, int32_t vehicleIndex) { // Prevent indexing array out of bounds - vehicleIndex = std::min(vehicleIndex, static_cast(std::size(ride.vehicle_colours))); - return ride.vehicle_colours[vehicleIndex]; + vehicleIndex = std::min(vehicleIndex, static_cast(std::size(ride.vehicleColours))); + return ride.vehicleColours[vehicleIndex]; } static bool RideTypeVehicleColourExists(ObjectEntryIndex subType, const VehicleColour& vehicleColour) @@ -2182,7 +2181,7 @@ static bool RideTypeVehicleColourExists(ObjectEntryIndex subType, const VehicleC { if (ride.subtype != subType) continue; - if (ride.vehicle_colours[0].Body != vehicleColour.Body) + if (ride.vehicleColours[0].Body != vehicleColour.Body) continue; return true; } @@ -2236,7 +2235,7 @@ void RideSetVehicleColoursToRandomPreset(Ride& ride, uint8_t preset_index) assert(preset_index < presetList->count); ride.vehicleColourSettings = VehicleColourSettings::same; - ride.vehicle_colours[0] = presetList->list[preset_index]; + ride.vehicleColours[0] = presetList->list[preset_index]; } else { @@ -2244,7 +2243,7 @@ void RideSetVehicleColoursToRandomPreset(Ride& ride, uint8_t preset_index) for (uint32_t i = 0; i < presetList->count; i++) { const auto index = i % 32u; - ride.vehicle_colours[i] = presetList->list[index]; + ride.vehicleColours[i] = presetList->list[index]; } } } @@ -2261,13 +2260,13 @@ void RideCheckAllReachable() { for (auto& ride : GetRideManager()) { - if (ride.connected_message_throttle != 0) - ride.connected_message_throttle--; + if (ride.connectedMessageThrottle != 0) + ride.connectedMessageThrottle--; - if (ride.status != RideStatus::Open || ride.connected_message_throttle != 0) + if (ride.status != RideStatus::open || ride.connectedMessageThrottle != 0) continue; - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) RideShopConnected(ride); else RideEntranceExitConnected(ride); @@ -2292,7 +2291,7 @@ static bool RideEntranceExitIsReachable(const TileCoordsXYZD& coordinates) static void RideEntranceExitConnected(Ride& ride) { - for (auto& station : ride.GetStations()) + for (auto& station : ride.getStations()) { auto station_start = station.Start; auto entrance = station.Entrance; @@ -2305,31 +2304,31 @@ static void RideEntranceExitConnected(Ride& ride) { // name of ride is parameter of the format string Formatter ft; - ride.FormatNameTo(ft); + ride.formatNameTo(ft); if (Config::Get().notifications.RideWarnings) { News::AddItemToQueue(News::ItemType::Ride, STR_ENTRANCE_NOT_CONNECTED, ride.id.ToUnderlying(), ft); } - ride.connected_message_throttle = 3; + ride.connectedMessageThrottle = 3; } if (!exit.IsNull() && !RideEntranceExitIsReachable(exit)) { // name of ride is parameter of the format string Formatter ft; - ride.FormatNameTo(ft); + ride.formatNameTo(ft); if (Config::Get().notifications.RideWarnings) { News::AddItemToQueue(News::ItemType::Ride, STR_EXIT_NOT_CONNECTED, ride.id.ToUnderlying(), ft); } - ride.connected_message_throttle = 3; + ride.connectedMessageThrottle = 3; } } } static void RideShopConnected(const Ride& ride) { - auto shopLoc = TileCoordsXY(ride.GetStation().Start); + auto shopLoc = TileCoordsXY(ride.getStation().Start); if (shopLoc.IsNull()) return; @@ -2386,11 +2385,11 @@ static void RideShopConnected(const Ride& ride) if (Config::Get().notifications.RideWarnings) { Formatter ft; - ride2->FormatNameTo(ft); + ride2->formatNameTo(ft); News::AddItemToQueue(News::ItemType::Ride, STR_ENTRANCE_NOT_CONNECTED, ride2->id.ToUnderlying(), ft); } - ride2->connected_message_throttle = 3; + ride2->connectedMessageThrottle = 3; } #pragma endregion @@ -2405,8 +2404,8 @@ static void RideTrackSetMapTooltip(const TrackElement& trackElement) { auto ft = Formatter(); ft.Add(STR_RIDE_MAP_TIP); - ride->FormatNameTo(ft); - ride->FormatStatusTo(ft); + ride->formatNameTo(ft); + ride->formatStatusTo(ft); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); @@ -2422,8 +2421,8 @@ static void RideQueueBannerSetMapTooltip(const PathElement& pathElement) auto ft = Formatter(); ft.Add(STR_RIDE_MAP_TIP); - ride->FormatNameTo(ft); - ride->FormatStatusTo(ft); + ride->formatNameTo(ft); + ride->formatStatusTo(ft); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); @@ -2437,15 +2436,15 @@ static void RideStationSetMapTooltip(const TrackElement& trackElement) return; const auto stationIndex = trackElement.GetStationIndex(); - const auto stationNumber = ride->GetStationNumber(stationIndex); + const auto stationNumber = ride->getStationNumber(stationIndex); auto ft = Formatter(); ft.Add(STR_RIDE_MAP_TIP); - ft.Add(ride->num_stations <= 1 ? STR_RIDE_STATION : STR_RIDE_STATION_X); - ride->FormatNameTo(ft); - ft.Add(GetRideComponentName(ride->GetRideTypeDescriptor().NameConvention.station).capitalised); + ft.Add(ride->numStations <= 1 ? STR_RIDE_STATION : STR_RIDE_STATION_X); + ride->formatNameTo(ft); + ft.Add(GetRideComponentName(ride->getRideTypeDescriptor().NameConvention.station).capitalised); ft.Add(stationNumber); - ride->FormatStatusTo(ft); + ride->formatStatusTo(ft); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); @@ -2463,20 +2462,20 @@ static void RideEntranceSetMapTooltip(const EntranceElement& entranceElement) // Get the queue length int32_t queueLength = 0; const auto stationIndex = entranceElement.GetStationIndex(); - if (!ride->GetStation(stationIndex).Entrance.IsNull()) + if (!ride->getStation(stationIndex).Entrance.IsNull()) { - queueLength = ride->GetStation(stationIndex).QueueLength; + queueLength = ride->getStation(stationIndex).QueueLength; } auto ft = Formatter(); ft.Add(STR_RIDE_MAP_TIP); - ft.Add(ride->num_stations <= 1 ? STR_RIDE_ENTRANCE : STR_RIDE_STATION_X_ENTRANCE); - ride->FormatNameTo(ft); + ft.Add(ride->numStations <= 1 ? STR_RIDE_ENTRANCE : STR_RIDE_STATION_X_ENTRANCE); + ride->formatNameTo(ft); // String IDs have an extra pop16 for some reason ft.Increment(sizeof(uint16_t)); - const auto stationNumber = ride->GetStationNumber(stationIndex); + const auto stationNumber = ride->getStationNumber(stationIndex); ft.Add(stationNumber); switch (queueLength) @@ -2500,14 +2499,14 @@ static void RideEntranceSetMapTooltip(const EntranceElement& entranceElement) else { auto ft = Formatter(); - ft.Add(ride->num_stations <= 1 ? STR_RIDE_EXIT : STR_RIDE_STATION_X_EXIT); - ride->FormatNameTo(ft); + ft.Add(ride->numStations <= 1 ? STR_RIDE_EXIT : STR_RIDE_STATION_X_EXIT); + ride->formatNameTo(ft); // String IDs have an extra pop16 for some reason ft.Increment(sizeof(uint16_t)); const auto stationIndex = entranceElement.GetStationIndex(); - const auto stationNumber = ride->GetStationNumber(stationIndex); + const auto stationNumber = ride->getStationNumber(stationIndex); ft.Add(stationNumber); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); @@ -2548,7 +2547,7 @@ void RideSetMapTooltip(const TileElement& tileElement) static ResultWithMessage RideModeCheckValidStationNumbers(const Ride& ride) { uint16_t numStations = 0; - for (const auto& station : ride.GetStations()) + for (const auto& station : ride.getStations()) { if (!station.Start.IsNull()) { @@ -2558,14 +2557,14 @@ static ResultWithMessage RideModeCheckValidStationNumbers(const Ride& ride) switch (ride.mode) { - case RideMode::ReverseInclineLaunchedShuttle: - case RideMode::PoweredLaunchPasstrough: - case RideMode::PoweredLaunch: - case RideMode::LimPoweredLaunch: + case RideMode::reverseInclineLaunchedShuttle: + case RideMode::poweredLaunchPasstrough: + case RideMode::poweredLaunch: + case RideMode::limPoweredLaunch: if (numStations <= 1) return { true }; return { false, STR_UNABLE_TO_OPERATE_WITH_MORE_THAN_ONE_STATION_IN_THIS_MODE }; - case RideMode::Shuttle: + case RideMode::shuttle: if (numStations >= 2) return { true }; return { false, STR_UNABLE_TO_OPERATE_WITH_LESS_THAN_TWO_STATIONS_IN_THIS_MODE }; @@ -2576,7 +2575,7 @@ static ResultWithMessage RideModeCheckValidStationNumbers(const Ride& ride) } } - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); if (rtd.HasFlag(RtdFlag::hasOneStation) && numStations > 1) return { false, STR_UNABLE_TO_OPERATE_WITH_MORE_THAN_ONE_STATION_IN_THIS_MODE }; @@ -2593,7 +2592,7 @@ static StationIndexWithMessage RideModeCheckStationPresent(const Ride& ride) if (stationIndex.IsNull()) { - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); if (!rtd.HasFlag(RtdFlag::hasTrack)) return { StationIndex::GetNull(), STR_NOT_YET_CONSTRUCTED }; @@ -2616,12 +2615,12 @@ static ResultWithMessage RideCheckForEntranceExit(RideId rideIndex) if (ride == nullptr) return { false }; - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) return { true }; uint8_t entrance = 0; uint8_t exit = 0; - for (const auto& station : ride->GetStations()) + for (const auto& station : ride->getStations()) { if (station.Start.IsNull()) continue; @@ -2662,7 +2661,7 @@ static ResultWithMessage RideCheckForEntranceExit(RideId rideIndex) * Calls FootpathChainRideQueue for all entrances of the ride * rct2: 0x006B5952 */ -void Ride::ChainQueues() const +void Ride::chainQueues() const { for (const auto& station : stations) { @@ -2684,7 +2683,7 @@ void Ride::ChainQueues() const continue; int32_t direction = tileElement->GetDirection(); - FootpathChainRideQueue(id, GetStationIndex(&station), mapLocation, tileElement, DirectionReverse(direction)); + FootpathChainRideQueue(id, getStationIndex(&station), mapLocation, tileElement, DirectionReverse(direction)); } while (!(tileElement++)->IsLastForTile()); } } @@ -2761,7 +2760,7 @@ static bool RideCheckTrackContainsInversions(const CoordsXYE& input, CoordsXYE* auto ride = GetRide(rideIndex); if (ride != nullptr) { - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) return true; } @@ -2823,7 +2822,7 @@ static bool RideCheckTrackContainsBanked(const CoordsXYE& input, CoordsXYE* outp if (ride == nullptr) return false; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) return true; @@ -2947,7 +2946,7 @@ static bool RideCheckStartAndEndIsStation(const CoordsXYE& input) { return false; } - ride->ChairliftBullwheelLocation[0] = TileCoordsXYZ{ CoordsXYZ{ trackBack.x, trackBack.y, trackBack.element->GetBaseZ() } }; + ride->chairliftBullwheelLocation[0] = TileCoordsXYZ{ CoordsXYZ{ trackBack.x, trackBack.y, trackBack.element->GetBaseZ() } }; // Check front of the track TrackGetFront(input, &trackFront); @@ -2957,7 +2956,7 @@ static bool RideCheckStartAndEndIsStation(const CoordsXYE& input) { return false; } - ride->ChairliftBullwheelLocation[1] = TileCoordsXYZ{ CoordsXYZ{ trackFront.x, trackFront.y, + ride->chairliftBullwheelLocation[1] = TileCoordsXYZ{ CoordsXYZ{ trackFront.x, trackFront.y, trackFront.element->GetBaseZ() } }; return true; } @@ -2984,7 +2983,7 @@ static void RideSetBoatHireReturnPoint(Ride& ride, const CoordsXYE& startElement int32_t direction = trackBeginEnd.begin_direction; trackType = trackBeginEnd.begin_element->AsTrack()->GetTrackType(); auto newCoords = GetTrackElementOriginAndApplyChanges( - { trackCoords, static_cast(direction) }, trackType, 0, &returnPos.element, 0); + { trackCoords, static_cast(direction) }, trackType, 0, &returnPos.element, {}); returnPos = newCoords.has_value() ? CoordsXYE{ newCoords.value(), returnPos.element } : CoordsXYE{ trackCoords, returnPos.element }; }; @@ -2992,8 +2991,8 @@ static void RideSetBoatHireReturnPoint(Ride& ride, const CoordsXYE& startElement trackType = returnPos.element->AsTrack()->GetTrackType(); const auto& ted = GetTrackElementDescriptor(trackType); int32_t elementReturnDirection = ted.coordinates.rotationBegin; - ride.boat_hire_return_direction = returnPos.element->GetDirectionWithOffset(elementReturnDirection); - ride.boat_hire_return_position = TileCoordsXY{ returnPos }; + ride.boatHireReturnDirection = returnPos.element->GetDirectionWithOffset(elementReturnDirection); + ride.boatHireReturnPosition = TileCoordsXY{ returnPos }; } /** @@ -3007,7 +3006,7 @@ static void RideSetMazeEntranceExitPoints(Ride& ride) // Create a list of all the entrance and exit positions TileCoordsXYZD* position = positions; - for (const auto& station : ride.GetStations()) + for (const auto& station : ride.getStations()) { if (!station.Entrance.IsNull()) { @@ -3056,7 +3055,7 @@ void SetBrakeClosedMultiTile(TrackElement& trackElement, const CoordsXY& trackLo case TrackElemType::DiagBlockBrakes: GetTrackElementOriginAndApplyChanges( { trackLocation, trackElement.GetBaseZ(), trackElement.GetDirection() }, trackElement.GetTrackType(), isClosed, - nullptr, TRACK_ELEMENT_SET_BRAKE_CLOSED_STATE); + nullptr, { TrackElementSetFlag::brakeClosed }); break; default: trackElement.SetBrakeClosed(isClosed); @@ -3161,13 +3160,13 @@ static void RideSetStartFinishPoints(RideId rideIndex, const CoordsXYE& startEle if (ride == nullptr) return; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) RideSetMazeEntranceExitPoints(*ride); else if (ride->type == RIDE_TYPE_BOAT_HIRE) RideSetBoatHireReturnPoint(*ride, startElement); - if (ride->IsBlockSectioned() && !(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + if (ride->isBlockSectioned() && !(ride->lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) { RideOpenBlockBrakes(startElement); } @@ -3216,7 +3215,7 @@ static Vehicle* VehicleCreateCar( if (trackElement == nullptr) return nullptr; - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) return nullptr; @@ -3275,7 +3274,7 @@ static Vehicle* VehicleCreateCar( vehicle->peep[i] = EntityId::GetNull(); } - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); if (carEntry.flags & CAR_ENTRY_FLAG_DODGEM_CAR_PLACEMENT) { // Loc6DDCA4: @@ -3400,9 +3399,9 @@ static Vehicle* VehicleCreateCar( } vehicle->SetState(Vehicle::Status::MovingToEndOfStation); - if (ride.HasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)) + if (ride.hasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)) { - vehicle->SubType = carIndex == (ride.num_cars_per_train - 1) ? Vehicle::Type::Head : Vehicle::Type::Tail; + vehicle->SubType = carIndex == (ride.numCarsPerTrain - 1) ? Vehicle::Type::Head : Vehicle::Type::Tail; vehicle->SetFlag(VehicleFlags::CarIsReversed); } } @@ -3422,13 +3421,13 @@ static TrainReference VehicleCreateTrain( Ride& ride, const CoordsXYZ& trainPos, int32_t vehicleIndex, int32_t* remainingDistance, TrackElement* trackElement) { TrainReference train = { nullptr, nullptr }; - bool isReversed = ride.HasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS); + bool isReversed = ride.hasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS); - for (int32_t carIndex = 0; carIndex < ride.num_cars_per_train; carIndex++) + for (int32_t carIndex = 0; carIndex < ride.numCarsPerTrain; carIndex++) { - auto carSpawnIndex = (isReversed) ? (ride.num_cars_per_train - 1) - carIndex : carIndex; + auto carSpawnIndex = (isReversed) ? (ride.numCarsPerTrain - 1) - carIndex : carIndex; - auto vehicle = RideEntryGetVehicleAtPosition(ride.subtype, ride.num_cars_per_train, carSpawnIndex); + auto vehicle = RideEntryGetVehicleAtPosition(ride.subtype, ride.numCarsPerTrain, carSpawnIndex); auto car = VehicleCreateCar(ride, vehicle, carSpawnIndex, vehicleIndex, trainPos, remainingDistance, trackElement); if (car == nullptr) break; @@ -3457,9 +3456,9 @@ static bool VehicleCreateTrains(Ride& ride, const CoordsXYZ& trainsPos, TrackEle int32_t remainingDistance = 0; bool allTrainsCreated = true; - for (int32_t vehicleIndex = 0; vehicleIndex < ride.NumTrains; vehicleIndex++) + for (int32_t vehicleIndex = 0; vehicleIndex < ride.numTrains; vehicleIndex++) { - if (ride.IsBlockSectioned()) + if (ride.isBlockSectioned()) { remainingDistance = 0; } @@ -3505,7 +3504,7 @@ static bool VehicleCreateTrains(Ride& ride, const CoordsXYZ& trainsPos, TrackEle * * rct2: 0x006DDE9E */ -static void RideCreateVehiclesFindFirstBlock(const Ride& ride, CoordsXYE* outXYElement) +static void RidecreateVehiclesFindFirstBlock(const Ride& ride, CoordsXYE* outXYElement) { Vehicle* vehicle = GetEntity(ride.vehicles[0]); if (vehicle == nullptr) @@ -3577,16 +3576,16 @@ static void RideCreateVehiclesFindFirstBlock(const Ride& ride, CoordsXYE* outXYE * Create and place the rides vehicles * rct2: 0x006DD84C */ -ResultWithMessage Ride::CreateVehicles(const CoordsXYE& element, bool isApplying) +ResultWithMessage Ride::createVehicles(const CoordsXYE& element, bool isApplying) { - UpdateMaxVehicles(); + updateMaxVehicles(); if (subtype == kObjectEntryIndexNull) { return { true }; } // Check if there are enough free sprite slots for all the vehicles - int32_t totalCars = NumTrains * num_cars_per_train; + int32_t totalCars = numTrains * numCarsPerTrain; if (totalCars > count_free_misc_sprite_slots()) { return { false, STR_UNABLE_TO_CREATE_ENOUGH_VEHICLES }; @@ -3602,7 +3601,7 @@ ResultWithMessage Ride::CreateVehicles(const CoordsXYE& element, bool isApplying int32_t direction = trackElement->GetDirection(); // - if (mode == RideMode::StationToStation) + if (mode == RideMode::stationToStation) { vehiclePos -= CoordsXYZ{ CoordsDirectionDelta[direction], 0 }; @@ -3613,34 +3612,34 @@ ResultWithMessage Ride::CreateVehicles(const CoordsXYE& element, bool isApplying if (!VehicleCreateTrains(*this, vehiclePos, trackElement)) { - // This flag is needed for Ride::RemoveVehicles() - lifecycle_flags |= RIDE_LIFECYCLE_ON_TRACK; - RemoveVehicles(); + // This flag is needed for Ride::removeVehicles() + lifecycleFlags |= RIDE_LIFECYCLE_ON_TRACK; + removeVehicles(); return { false, STR_UNABLE_TO_CREATE_ENOUGH_VEHICLES }; } // return true; // Initialise station departs // 006DDDD0: - lifecycle_flags |= RIDE_LIFECYCLE_ON_TRACK; + lifecycleFlags |= RIDE_LIFECYCLE_ON_TRACK; for (int32_t i = 0; i < OpenRCT2::Limits::kMaxStationsPerRide; i++) { stations[i].Depart = (stations[i].Depart & kStationDepartFlag) | 1; } // - if (type != RIDE_TYPE_SPACE_RINGS && !GetRideTypeDescriptor().HasFlag(RtdFlag::vehicleIsIntegral)) + if (type != RIDE_TYPE_SPACE_RINGS && !getRideTypeDescriptor().HasFlag(RtdFlag::vehicleIsIntegral)) { - if (IsBlockSectioned()) + if (isBlockSectioned()) { CoordsXYE firstBlock{}; - RideCreateVehiclesFindFirstBlock(*this, &firstBlock); - MoveTrainsToBlockBrakes( + RidecreateVehiclesFindFirstBlock(*this, &firstBlock); + moveTrainsToBlockBrakes( { firstBlock.x, firstBlock.y, firstBlock.element->GetBaseZ() }, *firstBlock.element->AsTrack()); } else { - for (int32_t i = 0; i < NumTrains; i++) + for (int32_t i = 0; i < numTrains; i++) { Vehicle* vehicle = GetEntity(vehicles[i]); if (vehicle == nullptr) @@ -3669,22 +3668,22 @@ ResultWithMessage Ride::CreateVehicles(const CoordsXYE& element, bool isApplying * preceding that block. * rct2: 0x006DDF9C */ -void Ride::MoveTrainsToBlockBrakes(const CoordsXYZ& firstBlockPosition, TrackElement& firstBlock) +void Ride::moveTrainsToBlockBrakes(const CoordsXYZ& firstBlockPosition, TrackElement& firstBlock) { // If the ride has a cable lift, we don't want to fetch the cable lift element and the block preceding it TrackElement* cableLiftTileElement = nullptr; TrackElement* cableLiftPreviousBlock = nullptr; - if (lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED) + if (lifecycleFlags & RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED) { - cableLiftTileElement = MapGetTrackElementAt(CableLiftLoc); + cableLiftTileElement = MapGetTrackElementAt(cableLiftLoc); if (cableLiftTileElement != nullptr) { - CoordsXYZ location = CableLiftLoc; + CoordsXYZ location = cableLiftLoc; cableLiftPreviousBlock = TrackGetPreviousBlock(location, reinterpret_cast(cableLiftTileElement)); } } - for (int32_t i = 0; i < NumTrains; i++) + for (int32_t i = 0; i < numTrains; i++) { auto train = GetEntity(vehicles[i]); if (train == nullptr) @@ -3758,7 +3757,7 @@ void Ride::MoveTrainsToBlockBrakes(const CoordsXYZ& firstBlockPosition, TrackEle static bool RideGetStationTile(const Ride& ride, CoordsXYE* output) { - for (const auto& station : ride.GetStations()) + for (const auto& station : ride.getStations()) { CoordsXYZ trackStart = station.GetStart(); if (trackStart.IsNull()) @@ -3799,13 +3798,13 @@ static ResultWithMessage RideInitialiseCableLiftTrack(const Ride& ride, bool isA TileElement* tileElement = it.current.element; GetTrackElementOriginAndApplyChanges( { { it.current, tileElement->GetBaseZ() }, tileElement->GetDirection() }, - tileElement->AsTrack()->GetTrackType(), 0, &tileElement, TRACK_ELEMENT_SET_HAS_CABLE_LIFT_FALSE); + tileElement->AsTrack()->GetTrackType(), 0, &tileElement, { TrackElementSetFlag::cableLiftOff }); } } // Spawn new cable lift tiles - auto cableLiftTileElement = MapGetTrackElementAt(ride.CableLiftLoc); - CoordsXYE cableLiftCoords = { ride.CableLiftLoc, reinterpret_cast(cableLiftTileElement) }; + auto cableLiftTileElement = MapGetTrackElementAt(ride.cableLiftLoc); + CoordsXYE cableLiftCoords = { ride.cableLiftLoc, reinterpret_cast(cableLiftTileElement) }; if (cableLiftTileElement == nullptr) return { false }; @@ -3829,7 +3828,7 @@ static ResultWithMessage RideInitialiseCableLiftTrack(const Ride& ride, bool isA { GetTrackElementOriginAndApplyChanges( { { it.current, tileElement->GetBaseZ() }, tileElement->GetDirection() }, trackType, 0, &tileElement, - TRACK_ELEMENT_SET_HAS_CABLE_LIFT_TRUE); + { TrackElementSetFlag::cableLiftOn }); } break; case TrackElemType::EndStation: @@ -3852,12 +3851,12 @@ static ResultWithMessage RideCreateCableLift(RideId rideIndex, bool isApplying) if (ride == nullptr) return { false }; - if (ride->mode != RideMode::ContinuousCircuitBlockSectioned && ride->mode != RideMode::ContinuousCircuit) + if (ride->mode != RideMode::continuousCircuitBlockSectioned && ride->mode != RideMode::continuousCircuit) { return { false, STR_CABLE_LIFT_UNABLE_TO_WORK_IN_THIS_OPERATING_MODE }; } - if (ride->num_circuits > 1) + if (ride->numCircuits > 1) { return { false, STR_MULTICIRCUIT_NOT_POSSIBLE_WITH_CABLE_LIFT_HILL }; } @@ -3878,7 +3877,7 @@ static ResultWithMessage RideCreateCableLift(RideId rideIndex, bool isApplying) return { true }; } - auto cableLiftLoc = ride->CableLiftLoc; + auto cableLiftLoc = ride->cableLiftLoc; auto tileElement = MapGetTrackElementAt(cableLiftLoc); int32_t direction = tileElement->GetDirection(); @@ -3912,7 +3911,7 @@ static ResultWithMessage RideCreateCableLift(RideId rideIndex, bool isApplying) head->prev_vehicle_on_ride = tail->Id; tail->next_vehicle_on_ride = head->Id; - ride->lifecycle_flags |= RIDE_LIFECYCLE_CABLE_LIFT; + ride->lifecycleFlags |= RIDE_LIFECYCLE_CABLE_LIFT; head->CableLiftUpdateTrackMotion(); return { true }; } @@ -3922,7 +3921,7 @@ static ResultWithMessage RideCreateCableLift(RideId rideIndex, bool isApplying) * This will also move the screen to the first station missing the entrance or exit. * rct2: 0x006B51C0 */ -void Ride::ConstructMissingEntranceOrExit() const +void Ride::constructMissingEntranceOrExit() const { auto* w = WindowGetMain(); if (w == nullptr) @@ -3955,7 +3954,7 @@ void Ride::ConstructMissingEntranceOrExit() const return; } - const auto& rtd = GetRideTypeDescriptor(); + const auto& rtd = getRideTypeDescriptor(); if (rtd.specialType != RtdSpecialType::maze) { auto location = incompleteStation->GetStart(); @@ -3963,7 +3962,7 @@ void Ride::ConstructMissingEntranceOrExit() const CoordsXYE trackElement; RideTryGetOriginElement(*this, &trackElement); - FindTrackGap(trackElement, &trackElement); + findTrackGap(trackElement, &trackElement); int32_t ok = RideModify(trackElement); if (ok == 0) { @@ -3998,9 +3997,9 @@ static void RideScrollToTrackError(const CoordsXYE& trackElement) * * rct2: 0x006B4F6B */ -TrackElement* Ride::GetOriginElement(StationIndex stationIndex) const +TrackElement* Ride::getOriginElement(StationIndex stationIndex) const { - auto stationLoc = GetStation(stationIndex).Start; + auto stationLoc = getStation(stationIndex).Start; TileElement* tileElement = MapGetFirstElementAt(stationLoc); if (tileElement == nullptr) return nullptr; @@ -4021,7 +4020,7 @@ TrackElement* Ride::GetOriginElement(StationIndex stationIndex) const return nullptr; } -ResultWithMessage Ride::Test(bool isApplying) +ResultWithMessage Ride::test(bool isApplying) { if (type == kRideTypeNull) { @@ -4033,7 +4032,7 @@ ResultWithMessage Ride::Test(bool isApplying) windowMgr->CloseByNumber(WindowClass::RideConstruction, id.ToUnderlying()); StationIndex stationIndex = {}; - auto message = ChangeStatusDoStationChecks(stationIndex); + auto message = changeStatusDoStationChecks(stationIndex); if (!message.Successful) { return message; @@ -4042,33 +4041,33 @@ ResultWithMessage Ride::Test(bool isApplying) auto entranceExitCheck = RideCheckForEntranceExit(id); if (!entranceExitCheck.Successful) { - ConstructMissingEntranceOrExit(); + constructMissingEntranceOrExit(); return { false, entranceExitCheck.Message }; } CoordsXYE trackElement = {}; - message = ChangeStatusGetStartElement(stationIndex, trackElement); + message = changeStatusGetStartElement(stationIndex, trackElement); if (!message.Successful) { return message; } - message = ChangeStatusCheckCompleteCircuit(trackElement); + message = changeStatusCheckCompleteCircuit(trackElement); if (!message.Successful) { return message; } - message = ChangeStatusCheckTrackValidity(trackElement); + message = changeStatusCheckTrackValidity(trackElement); if (!message.Successful) { return message; } - return ChangeStatusCreateVehicles(isApplying, trackElement); + return changeStatusCreateVehicles(isApplying, trackElement); } -ResultWithMessage Ride::Simulate(bool isApplying) +ResultWithMessage Ride::simulate(bool isApplying) { CoordsXYE trackElement, problematicTrackElement = {}; if (type == kRideTypeNull) @@ -4078,38 +4077,38 @@ ResultWithMessage Ride::Simulate(bool isApplying) } StationIndex stationIndex = {}; - auto message = ChangeStatusDoStationChecks(stationIndex); + auto message = changeStatusDoStationChecks(stationIndex); if (!message.Successful) { return message; } - message = ChangeStatusGetStartElement(stationIndex, trackElement); + message = changeStatusGetStartElement(stationIndex, trackElement); if (!message.Successful) { return message; } - if (IsBlockSectioned() && FindTrackGap(trackElement, &problematicTrackElement)) + if (isBlockSectioned() && findTrackGap(trackElement, &problematicTrackElement)) { RideScrollToTrackError(problematicTrackElement); return { false, STR_TRACK_IS_NOT_A_COMPLETE_CIRCUIT }; } - message = ChangeStatusCheckTrackValidity(trackElement); + message = changeStatusCheckTrackValidity(trackElement); if (!message.Successful) { return message; } - return ChangeStatusCreateVehicles(isApplying, trackElement); + return changeStatusCreateVehicles(isApplying, trackElement); } /** * * rct2: 0x006B4EEA */ -ResultWithMessage Ride::Open(bool isApplying) +ResultWithMessage Ride::open(bool isApplying) { // Check to see if construction tool is in use. If it is close the construction window // to set the track to its final state and clean up ghosts. @@ -4122,7 +4121,7 @@ ResultWithMessage Ride::Open(bool isApplying) } StationIndex stationIndex = {}; - auto message = ChangeStatusDoStationChecks(stationIndex); + auto message = changeStatusDoStationChecks(stationIndex); if (!message.Successful) { return message; @@ -4131,36 +4130,36 @@ ResultWithMessage Ride::Open(bool isApplying) auto entranceExitCheck = RideCheckForEntranceExit(id); if (!entranceExitCheck.Successful) { - ConstructMissingEntranceOrExit(); + constructMissingEntranceOrExit(); return { false, entranceExitCheck.Message }; } if (isApplying) { - ChainQueues(); - lifecycle_flags |= RIDE_LIFECYCLE_EVER_BEEN_OPENED; + chainQueues(); + lifecycleFlags |= RIDE_LIFECYCLE_EVER_BEEN_OPENED; } CoordsXYE trackElement = {}; - message = ChangeStatusGetStartElement(stationIndex, trackElement); + message = changeStatusGetStartElement(stationIndex, trackElement); if (!message.Successful) { return message; } - message = ChangeStatusCheckCompleteCircuit(trackElement); + message = changeStatusCheckCompleteCircuit(trackElement); if (!message.Successful) { return message; } - message = ChangeStatusCheckTrackValidity(trackElement); + message = changeStatusCheckTrackValidity(trackElement); if (!message.Successful) { return message; } - return ChangeStatusCreateVehicles(isApplying, trackElement); + return changeStatusCreateVehicles(isApplying, trackElement); } /** @@ -4212,7 +4211,7 @@ void RideGetStartOfTrack(CoordsXYE* output) * * rct2: 0x00696707 */ -void Ride::StopGuestsQueuing() +void Ride::stopGuestsQueuing() { for (auto peep : EntityList()) { @@ -4226,9 +4225,9 @@ void Ride::StopGuestsQueuing() } } -RideMode Ride::GetDefaultMode() const +RideMode Ride::getDefaultMode() const { - return GetRideTypeDescriptor().DefaultMode; + return getRideTypeDescriptor().DefaultMode; } static bool RideTypeWithTrackColoursExists(ride_type_t rideType, const TrackColour& colours) @@ -4237,11 +4236,11 @@ static bool RideTypeWithTrackColoursExists(ride_type_t rideType, const TrackColo { if (ride.type != rideType) continue; - if (ride.track_colour[0].main != colours.main) + if (ride.trackColours[0].main != colours.main) continue; - if (ride.track_colour[0].additional != colours.additional) + if (ride.trackColours[0].additional != colours.additional) continue; - if (ride.track_colour[0].supports != colours.supports) + if (ride.trackColours[0].supports != colours.supports) continue; return true; @@ -4249,7 +4248,7 @@ static bool RideTypeWithTrackColoursExists(ride_type_t rideType, const TrackColo return false; } -bool Ride::NameExists(std::string_view name, RideId excludeRideId) +bool Ride::nameExists(std::string_view name, RideId excludeRideId) { char buffer[256]{}; for (auto& ride : GetRideManager()) @@ -4257,7 +4256,7 @@ bool Ride::NameExists(std::string_view name, RideId excludeRideId) if (ride.id != excludeRideId) { Formatter ft; - ride.FormatNameTo(ft); + ride.formatNameTo(ft); FormatStringLegacy(buffer, 256, STR_STRINGID, ft.Data()); if (name == buffer && RideHasAnyTrackElements(ride)) { @@ -4301,12 +4300,12 @@ int32_t RideGetRandomColourPresetIndex(ride_type_t rideType) * * Based on rct2: 0x006B4776 */ -void Ride::SetColourPreset(uint8_t index) +void Ride::setColourPreset(uint8_t index) { - const TrackColourPresetList* colourPresets = &GetRideTypeDescriptor().ColourPresets; + const TrackColourPresetList* colourPresets = &getRideTypeDescriptor().ColourPresets; TrackColour colours = { COLOUR_BLACK, COLOUR_BLACK, COLOUR_BLACK }; // Stalls save their default colour in the vehicle settings (since they share a common ride type) - if (!IsRide()) + if (!isRide()) { const auto* rideEntry = GetRideEntryByIndex(subtype); if (rideEntry != nullptr && rideEntry->vehicle_preset_list->count > 0) @@ -4319,11 +4318,11 @@ void Ride::SetColourPreset(uint8_t index) { colours = colourPresets->list[index]; } - for (size_t i = 0; i < std::size(track_colour); i++) + for (size_t i = 0; i < std::size(trackColours); i++) { - track_colour[i].main = colours.main; - track_colour[i].additional = colours.additional; - track_colour[i].supports = colours.supports; + trackColours[i].main = colours.main; + trackColours[i].additional = colours.additional; + trackColours[i].supports = colours.supports; } vehicleColourSettings = VehicleColourSettings::same; } @@ -4341,20 +4340,20 @@ money64 RideGetCommonPrice(const Ride& forRide) return kMoney64Undefined; } -void Ride::SetNameToDefault() +void Ride::setNameToDefault() { char rideNameBuffer[256]{}; // Increment default name number until we find a unique name - custom_name = {}; - default_name_number = 0; + customName = {}; + defaultNameNumber = 0; do { - default_name_number++; + defaultNameNumber++; Formatter ft; - FormatNameTo(ft); + formatNameTo(ft); FormatStringLegacy(rideNameBuffer, 256, STR_STRINGID, ft.Data()); - } while (Ride::NameExists(rideNameBuffer, id)); + } while (Ride::nameExists(rideNameBuffer, id)); } /** @@ -4391,13 +4390,13 @@ void IncrementTurnCount1Element(Ride& ride, uint8_t type) switch (type) { case 0: - turn_count = &ride.turn_count_default; + turn_count = &ride.turnCountDefault; break; case 1: - turn_count = &ride.turn_count_banked; + turn_count = &ride.turnCountBanked; break; case 2: - turn_count = &ride.turn_count_sloped; + turn_count = &ride.turnCountSloped; break; default: return; @@ -4416,13 +4415,13 @@ void IncrementTurnCount2Elements(Ride& ride, uint8_t type) switch (type) { case 0: - turn_count = &ride.turn_count_default; + turn_count = &ride.turnCountDefault; break; case 1: - turn_count = &ride.turn_count_banked; + turn_count = &ride.turnCountBanked; break; case 2: - turn_count = &ride.turn_count_sloped; + turn_count = &ride.turnCountSloped; break; default: return; @@ -4441,13 +4440,13 @@ void IncrementTurnCount3Elements(Ride& ride, uint8_t type) switch (type) { case 0: - turn_count = &ride.turn_count_default; + turn_count = &ride.turnCountDefault; break; case 1: - turn_count = &ride.turn_count_banked; + turn_count = &ride.turnCountBanked; break; case 2: - turn_count = &ride.turn_count_sloped; + turn_count = &ride.turnCountSloped; break; default: return; @@ -4471,7 +4470,7 @@ void IncrementTurnCount4PlusElements(Ride& ride, uint8_t type) IncrementTurnCount3Elements(ride, type); return; case 2: - turn_count = &ride.turn_count_sloped; + turn_count = &ride.turnCountSloped; break; default: return; @@ -4490,13 +4489,13 @@ int32_t GetTurnCount1Element(const Ride& ride, uint8_t type) switch (type) { case 0: - turn_count = &ride.turn_count_default; + turn_count = &ride.turnCountDefault; break; case 1: - turn_count = &ride.turn_count_banked; + turn_count = &ride.turnCountBanked; break; case 2: - turn_count = &ride.turn_count_sloped; + turn_count = &ride.turnCountSloped; break; default: return 0; @@ -4511,13 +4510,13 @@ int32_t GetTurnCount2Elements(const Ride& ride, uint8_t type) switch (type) { case 0: - turn_count = &ride.turn_count_default; + turn_count = &ride.turnCountDefault; break; case 1: - turn_count = &ride.turn_count_banked; + turn_count = &ride.turnCountBanked; break; case 2: - turn_count = &ride.turn_count_sloped; + turn_count = &ride.turnCountSloped; break; default: return 0; @@ -4532,13 +4531,13 @@ int32_t GetTurnCount3Elements(const Ride& ride, uint8_t type) switch (type) { case 0: - turn_count = &ride.turn_count_default; + turn_count = &ride.turnCountDefault; break; case 1: - turn_count = &ride.turn_count_banked; + turn_count = &ride.turnCountBanked; break; case 2: - turn_count = &ride.turn_count_sloped; + turn_count = &ride.turnCountSloped; break; default: return 0; @@ -4556,7 +4555,7 @@ int32_t GetTurnCount4PlusElements(const Ride& ride, uint8_t type) case 1: return 0; case 2: - turn_count = &ride.turn_count_sloped; + turn_count = &ride.turnCountSloped; break; default: return 0; @@ -4565,51 +4564,51 @@ int32_t GetTurnCount4PlusElements(const Ride& ride, uint8_t type) return ((*turn_count) & kTurnMask4PlusElements) >> 11; } -bool Ride::HasSpinningTunnel() const +bool Ride::hasSpinningTunnel() const { - return special_track_elements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; + return specialTrackElements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; } -bool Ride::HasWaterSplash() const +bool Ride::hasWaterSplash() const { - return special_track_elements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; + return specialTrackElements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; } -bool Ride::HasRapids() const +bool Ride::hasRapids() const { - return special_track_elements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; + return specialTrackElements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; } -bool Ride::HasLogReverser() const +bool Ride::hasLogReverser() const { - return special_track_elements & RIDE_ELEMENT_REVERSER_OR_WATERFALL; + return specialTrackElements & RIDE_ELEMENT_REVERSER_OR_WATERFALL; } -bool Ride::HasWaterfall() const +bool Ride::hasWaterfall() const { - return special_track_elements & RIDE_ELEMENT_REVERSER_OR_WATERFALL; + return specialTrackElements & RIDE_ELEMENT_REVERSER_OR_WATERFALL; } -bool Ride::HasWhirlpool() const +bool Ride::hasWhirlpool() const { - return special_track_elements & RIDE_ELEMENT_WHIRLPOOL; + return specialTrackElements & RIDE_ELEMENT_WHIRLPOOL; } uint8_t RideGetHelixSections(const Ride& ride) { // Helix sections stored in the low 5 bits. - return ride.special_track_elements & 0x1F; + return ride.specialTrackElements & 0x1F; } -bool Ride::IsPoweredLaunched() const +bool Ride::isPoweredLaunched() const { - return mode == RideMode::PoweredLaunchPasstrough || mode == RideMode::PoweredLaunch - || mode == RideMode::PoweredLaunchBlockSectioned; + return mode == RideMode::poweredLaunchPasstrough || mode == RideMode::poweredLaunch + || mode == RideMode::poweredLaunchBlockSectioned; } -bool Ride::IsBlockSectioned() const +bool Ride::isBlockSectioned() const { - return mode == RideMode::ContinuousCircuitBlockSectioned || mode == RideMode::PoweredLaunchBlockSectioned; + return mode == RideMode::continuousCircuitBlockSectioned || mode == RideMode::poweredLaunchBlockSectioned; } bool RideHasAnyTrackElements(const Ride& ride) @@ -4640,11 +4639,11 @@ void InvalidateTestResults(Ride& ride) { ride.measurement = {}; ride.ratings.setNull(); - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_TESTED; - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_TEST_IN_PROGRESS; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_TESTED; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_TEST_IN_PROGRESS; + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK) { - for (int32_t i = 0; i < ride.NumTrains; i++) + for (int32_t i = 0; i < ride.numTrains; i++) { Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle != nullptr) @@ -4667,14 +4666,14 @@ void InvalidateTestResults(Ride& ride) */ void RideFixBreakdown(Ride& ride, int32_t reliabilityIncreaseFactor) { - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_BREAKDOWN_PENDING; - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_BROKEN_DOWN; - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_BREAKDOWN_PENDING; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_BROKEN_DOWN; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_DUE_INSPECTION; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK) { - for (int32_t i = 0; i < ride.NumTrains; i++) + for (int32_t i = 0; i < ride.numTrains; i++) { for (Vehicle* vehicle = GetEntity(ride.vehicles[i]); vehicle != nullptr; vehicle = GetEntity(vehicle->next_vehicle_on_train)) @@ -4686,7 +4685,7 @@ void RideFixBreakdown(Ride& ride, int32_t reliabilityIncreaseFactor) } } - uint8_t unreliability = 100 - ride.reliability_percentage; + uint8_t unreliability = 100 - ride.reliabilityPercentage; ride.reliability += reliabilityIncreaseFactor * (unreliability / 2); } @@ -4696,7 +4695,7 @@ void RideFixBreakdown(Ride& ride, int32_t reliabilityIncreaseFactor) */ void RideUpdateVehicleColours(const Ride& ride) { - if (ride.type == RIDE_TYPE_SPACE_RINGS || ride.GetRideTypeDescriptor().HasFlag(RtdFlag::vehicleIsIntegral)) + if (ride.type == RIDE_TYPE_SPACE_RINGS || ride.getRideTypeDescriptor().HasFlag(RtdFlag::vehicleIsIntegral)) { GfxInvalidateScreen(); } @@ -4712,20 +4711,20 @@ void RideUpdateVehicleColours(const Ride& ride) switch (ride.vehicleColourSettings) { case VehicleColourSettings::same: - colours = ride.vehicle_colours[0]; + colours = ride.vehicleColours[0]; break; case VehicleColourSettings::perTrain: - colours = ride.vehicle_colours[i]; + colours = ride.vehicleColours[i]; break; case VehicleColourSettings::perCar: if (vehicle->HasFlag(VehicleFlags::CarIsReversed)) { - colours = ride.vehicle_colours[std::min( - (ride.num_cars_per_train - 1) - carIndex, OpenRCT2::Limits::kMaxCarsPerTrain - 1)]; + colours = ride.vehicleColours[std::min( + (ride.numCarsPerTrain - 1) - carIndex, OpenRCT2::Limits::kMaxCarsPerTrain - 1)]; } else { - colours = ride.vehicle_colours[std::min(carIndex, OpenRCT2::Limits::kMaxCarsPerTrain - 1)]; + colours = ride.vehicleColours[std::min(carIndex, OpenRCT2::Limits::kMaxCarsPerTrain - 1)]; } break; } @@ -4963,7 +4962,7 @@ OpenRCT2::BitSet RideEntryGetSupportedTrackPieces( static std::optional RideGetSmallestStationLength(const Ride& ride) { std::optional result; - for (const auto& station : ride.GetStations()) + for (const auto& station : ride.getStations()) { if (!station.Start.IsNull()) { @@ -4987,7 +4986,7 @@ static int32_t RideGetTrackLength(const Ride& ride) CoordsXYZ trackStart; bool foundTrack = false; - for (const auto& station : ride.GetStations()) + for (const auto& station : ride.getStations()) { trackStart = station.GetStart(); if (trackStart.IsNull()) @@ -5058,7 +5057,7 @@ static int32_t RideGetTrackLength(const Ride& ride) * * rct2: 0x006DD57D */ -void Ride::UpdateMaxVehicles() +void Ride::updateMaxVehicles() { if (subtype == kObjectEntryIndexNull) return; @@ -5069,15 +5068,15 @@ void Ride::UpdateMaxVehicles() return; } - uint8_t numCarsPerTrain, numTrains; + uint8_t newNumCarsPerTrain; int32_t maxNumTrains; - const auto& rtd = GetRideTypeDescriptor(); - if (rideEntry->cars_per_flat_ride == NoFlatRideCars) + const auto& rtd = getRideTypeDescriptor(); + if (rideEntry->cars_per_flat_ride == kNoFlatRideCars) { - num_cars_per_train = std::max(rideEntry->min_cars_in_train, num_cars_per_train); - MinCarsPerTrain = rideEntry->min_cars_in_train; - MaxCarsPerTrain = rideEntry->max_cars_in_train; + newNumCarsPerTrain = std::max(rideEntry->min_cars_in_train, numCarsPerTrain); + minCarsPerTrain = rideEntry->min_cars_in_train; + maxCarsPerTrain = rideEntry->max_cars_in_train; // Calculate maximum train length based on smallest station length auto stationNumTiles = RideGetSmallestStationLength(*this); @@ -5086,7 +5085,7 @@ void Ride::UpdateMaxVehicles() auto stationLength = (stationNumTiles.value() * 0x44180) - 0x16B2A; int32_t maxMass = rtd.MaxMass << 8; - int32_t maxCarsPerTrain = 1; + int32_t newMaxCarsPerTrain = 1; for (int32_t numCars = rideEntry->max_cars_in_train; numCars > 0; numCars--) { int32_t trainLength = 0; @@ -5100,30 +5099,30 @@ void Ride::UpdateMaxVehicles() if (trainLength <= stationLength && totalMass <= maxMass) { - maxCarsPerTrain = numCars; + newMaxCarsPerTrain = numCars; break; } } - int32_t newCarsPerTrain = std::max(proposed_num_cars_per_train, rideEntry->min_cars_in_train); - maxCarsPerTrain = std::max(maxCarsPerTrain, static_cast(rideEntry->min_cars_in_train)); - if (!GetGameState().Cheats.disableTrainLengthLimit) + int32_t newCarsPerTrain = std::max(proposedNumCarsPerTrain, rideEntry->min_cars_in_train); + newMaxCarsPerTrain = std::max(newMaxCarsPerTrain, static_cast(rideEntry->min_cars_in_train)); + if (!getGameState().cheats.disableTrainLengthLimit) { - newCarsPerTrain = std::min(maxCarsPerTrain, newCarsPerTrain); + newCarsPerTrain = std::min(newMaxCarsPerTrain, newCarsPerTrain); } - MaxCarsPerTrain = maxCarsPerTrain; - MinCarsPerTrain = rideEntry->min_cars_in_train; + maxCarsPerTrain = newMaxCarsPerTrain; + minCarsPerTrain = rideEntry->min_cars_in_train; switch (mode) { - case RideMode::ContinuousCircuitBlockSectioned: - case RideMode::PoweredLaunchBlockSectioned: - maxNumTrains = std::clamp(num_stations + num_block_brakes - 1, 1, OpenRCT2::Limits::kMaxTrainsPerRide); + case RideMode::continuousCircuitBlockSectioned: + case RideMode::poweredLaunchBlockSectioned: + maxNumTrains = std::clamp(numStations + numBlockBrakes - 1, 1, OpenRCT2::Limits::kMaxTrainsPerRide); break; - case RideMode::ReverseInclineLaunchedShuttle: - case RideMode::PoweredLaunchPasstrough: - case RideMode::Shuttle: - case RideMode::LimPoweredLaunch: - case RideMode::PoweredLaunch: + case RideMode::reverseInclineLaunchedShuttle: + case RideMode::poweredLaunchPasstrough: + case RideMode::shuttle: + case RideMode::limPoweredLaunch: + case RideMode::poweredLaunch: maxNumTrains = 1; break; default: @@ -5146,7 +5145,7 @@ void Ride::UpdateMaxVehicles() totalLength += trainLength; } while (totalLength <= stationLength); - if ((mode != RideMode::StationToStation && mode != RideMode::ContinuousCircuit) + if ((mode != RideMode::stationToStation && mode != RideMode::continuousCircuit) || !(rtd.HasFlag(RtdFlag::allowMoreVehiclesThanStationFits))) { maxNumTrains = std::min(maxNumTrains, int32_t(OpenRCT2::Limits::kMaxTrainsPerRide)); @@ -5182,73 +5181,73 @@ void Ride::UpdateMaxVehicles() } break; } - max_trains = maxNumTrains; + maxTrains = maxNumTrains; - numCarsPerTrain = std::min(proposed_num_cars_per_train, static_cast(newCarsPerTrain)); + newNumCarsPerTrain = std::min(proposedNumCarsPerTrain, static_cast(newCarsPerTrain)); } else { - max_trains = rideEntry->cars_per_flat_ride; - MinCarsPerTrain = rideEntry->min_cars_in_train; - MaxCarsPerTrain = rideEntry->max_cars_in_train; - numCarsPerTrain = rideEntry->max_cars_in_train; + maxTrains = rideEntry->cars_per_flat_ride; + minCarsPerTrain = rideEntry->min_cars_in_train; + maxCarsPerTrain = rideEntry->max_cars_in_train; + newNumCarsPerTrain = rideEntry->max_cars_in_train; maxNumTrains = rideEntry->cars_per_flat_ride; } - if (GetGameState().Cheats.disableTrainLengthLimit) + if (getGameState().cheats.disableTrainLengthLimit) { maxNumTrains = OpenRCT2::Limits::kMaxTrainsPerRide; } - numTrains = std::min(ProposedNumTrains, static_cast(maxNumTrains)); + auto newNumTrains = std::min(proposedNumTrains, static_cast(maxNumTrains)); // Refresh new current num vehicles / num cars per vehicle - if (numTrains != NumTrains || numCarsPerTrain != num_cars_per_train) + if (newNumTrains != numTrains || newNumCarsPerTrain != numCarsPerTrain) { - num_cars_per_train = numCarsPerTrain; - NumTrains = numTrains; + numCarsPerTrain = newNumCarsPerTrain; + numTrains = newNumTrains; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByNumber(WindowClass::Ride, id.ToUnderlying()); } } -void Ride::UpdateNumberOfCircuits() +void Ride::updateNumberOfCircuits() { - if (!CanHaveMultipleCircuits()) + if (!canHaveMultipleCircuits()) { - num_circuits = 1; + numCircuits = 1; } } -void Ride::SetRideEntry(ObjectEntryIndex entryIndex) +void Ride::setRideEntry(ObjectEntryIndex entryIndex) { auto colour = RideGetUnusedPresetVehicleColour(entryIndex); auto rideSetVehicleAction = RideSetVehicleAction(id, RideSetVehicleType::RideEntry, entryIndex, colour); GameActions::Execute(&rideSetVehicleAction); } -void Ride::SetNumTrains(int32_t numTrains) +void Ride::setNumTrains(int32_t newNumTrains) { - auto rideSetVehicleAction = RideSetVehicleAction(id, RideSetVehicleType::NumTrains, numTrains); + auto rideSetVehicleAction = RideSetVehicleAction(id, RideSetVehicleType::NumTrains, newNumTrains); GameActions::Execute(&rideSetVehicleAction); } -void Ride::SetNumCarsPerVehicle(int32_t numCarsPerVehicle) +void Ride::setNumCarsPerTrain(int32_t numCarsPerVehicle) { auto rideSetVehicleAction = RideSetVehicleAction(id, RideSetVehicleType::NumCarsPerTrain, numCarsPerVehicle); GameActions::Execute(&rideSetVehicleAction); } -void Ride::SetReversedTrains(bool reverseTrains) +void Ride::setReversedTrains(bool reverseTrains) { auto rideSetVehicleAction = RideSetVehicleAction(id, RideSetVehicleType::TrainsReversed, reverseTrains); GameActions::Execute(&rideSetVehicleAction); } -void Ride::SetToDefaultInspectionInterval() +void Ride::setToDefaultInspectionInterval() { uint8_t defaultInspectionInterval = Config::Get().general.DefaultInspectionInterval; - if (inspection_interval != defaultInspectionInterval) + if (inspectionInterval != defaultInspectionInterval) { if (defaultInspectionInterval <= RIDE_INSPECTION_NEVER) { @@ -5261,11 +5260,11 @@ void Ride::SetToDefaultInspectionInterval() * * rct2: 0x006B752C */ -void Ride::Crash(uint8_t vehicleIndex) +void Ride::crash(uint8_t vehicleIndex) { Vehicle* vehicle = GetEntity(vehicles[vehicleIndex]); - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) && vehicle != nullptr) + if (gLegacyScene != LegacyScene::titleSequence && vehicle != nullptr) { // Open ride window for crashed vehicle auto intent = Intent(WD_VEHICLE); @@ -5282,7 +5281,7 @@ void Ride::Crash(uint8_t vehicleIndex) if (Config::Get().notifications.RideCrashed) { Formatter ft; - FormatNameTo(ft); + formatNameTo(ft); News::AddItemToQueue(News::ItemType::Ride, STR_RIDE_HAS_CRASHED, id.ToUnderlying(), ft); } } @@ -5300,7 +5299,7 @@ uint32_t RideCustomersInLast5Minutes(const Ride& ride) for (int32_t i = 0; i < OpenRCT2::Limits::kCustomerHistorySize; i++) { - sum += ride.num_customers[i]; + sum += ride.numCustomers[i]; } return sum; @@ -5308,11 +5307,11 @@ uint32_t RideCustomersInLast5Minutes(const Ride& ride) Vehicle* RideGetBrokenVehicle(const Ride& ride) { - auto vehicleIndex = ride.vehicles[ride.broken_vehicle]; + auto vehicleIndex = ride.vehicles[ride.brokenTrain]; Vehicle* vehicle = GetEntity(vehicleIndex); if (vehicle != nullptr) { - return vehicle->GetCar(ride.broken_car); + return vehicle->GetCar(ride.brokenCar); } return nullptr; } @@ -5321,34 +5320,34 @@ Vehicle* RideGetBrokenVehicle(const Ride& ride) * * rct2: 0x006D235B */ -void Ride::Delete() +void Ride::remove() { RideDelete(id); } -void Ride::Renew() +void Ride::renew() { // Set build date to current date (so the ride is brand new) - build_date = GetDate().GetMonthsElapsed(); + buildDate = GetDate().GetMonthsElapsed(); reliability = kRideInitialReliability; } -RideClassification Ride::GetClassification() const +RideClassification Ride::getClassification() const { - const auto& rtd = GetRideTypeDescriptor(); + const auto& rtd = getRideTypeDescriptor(); return rtd.Classification; } -bool Ride::IsRide() const +bool Ride::isRide() const { - return GetClassification() == RideClassification::Ride; + return getClassification() == RideClassification::ride; } money64 RideGetPrice(const Ride& ride) { - if (GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY) + if (getGameState().park.Flags & PARK_FLAGS_NO_MONEY) return 0; - if (ride.IsRide()) + if (ride.isRide()) { if (!Park::RidePricesUnlocked()) { @@ -5413,7 +5412,7 @@ static bool CheckForAdjacentStation(const CoordsXYZ& stationCoords, uint8_t dire { auto rideIndex = stationElement->AsTrack()->GetRideIndex(); auto ride = GetRide(rideIndex); - if (ride != nullptr && (ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) + if (ride != nullptr && (ride->departFlags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) { found = true; } @@ -5431,7 +5430,7 @@ bool RideHasAdjacentStation(const Ride& ride) /* Loop through all of the ride stations, checking for an * adjacent station on either side. */ - for (const auto& station : ride.GetStations()) + for (const auto& station : ride.getStations()) { auto stationStart = station.GetStart(); if (!stationStart.IsNull()) @@ -5459,8 +5458,8 @@ bool RideHasAdjacentStation(const Ride& ride) bool RideHasStationShelter(const Ride& ride) { - const auto* stationObj = ride.GetStationObject(); - return stationObj != nullptr && (stationObj->Flags & STATION_OBJECT_FLAGS::HAS_SHELTER); + const auto* stationObj = ride.getStationObject(); + return stationObj != nullptr && (stationObj->Flags & StationObjectFlags::hasShelter); } bool RideHasRatings(const Ride& ride) @@ -5505,7 +5504,7 @@ void FixInvalidVehicleSpriteSizes() } } -bool RideEntryHasCategory(const RideObjectEntry& rideEntry, uint8_t category) +bool RideEntryHasCategory(const RideObjectEntry& rideEntry, RideCategory category) { auto rideType = rideEntry.GetFirstNonNullRideType(); return GetRideTypeDescriptor(rideType).Category == category; @@ -5531,7 +5530,7 @@ ObjectEntryIndex RideGetEntryIndex(ride_type_t rideType, ObjectEntryIndex rideSu } // Can happen in select-by-track-type mode - if (!RideEntryIsInvented(rideEntryIndex) && !GetGameState().Cheats.ignoreResearchStatus) + if (!RideEntryIsInvented(rideEntryIndex) && !getGameState().cheats.ignoreResearchStatus) { continue; } @@ -5548,13 +5547,13 @@ ObjectEntryIndex RideGetEntryIndex(ride_type_t rideType, ObjectEntryIndex rideSu return subType; } -const StationObject* Ride::GetStationObject() const +const StationObject* Ride::getStationObject() const { auto& objManager = GetContext()->GetObjectManager(); - return objManager.GetLoadedObject(entrance_style); + return objManager.GetLoadedObject(entranceStyle); } -const MusicObject* Ride::GetMusicObject() const +const MusicObject* Ride::getMusicObject() const { auto& objManager = GetContext()->GetObjectManager(); return objManager.GetLoadedObject(music); @@ -5572,9 +5571,9 @@ void DetermineRideEntranceAndExitLocations() for (auto& ride : GetRideManager()) { - for (auto& station : ride.GetStations()) + for (auto& station : ride.getStations()) { - auto stationIndex = ride.GetStationIndex(&station); + auto stationIndex = ride.getStationIndex(&station); TileCoordsXYZD entranceLoc = station.Entrance; TileCoordsXYZD exitLoc = station.Exit; bool fixEntrance = false; @@ -5620,10 +5619,10 @@ void DetermineRideEntranceAndExitLocations() // Search the map to find it. Skip the outer ring of invisible tiles. bool alreadyFoundEntrance = false; bool alreadyFoundExit = false; - auto& gameState = GetGameState(); - for (int32_t y = 1; y < gameState.MapSize.y - 1; y++) + auto& gameState = getGameState(); + for (int32_t y = 1; y < gameState.mapSize.y - 1; y++) { - for (int32_t x = 1; x < gameState.MapSize.x - 1; x++) + for (int32_t x = 1; x < gameState.mapSize.x - 1; x++) { TileElement* tileElement = MapGetFirstElementAt(TileCoordsXY{ x, y }); @@ -5707,10 +5706,10 @@ void DetermineRideEntranceAndExitLocations() void RideClearLeftoverEntrances(const Ride& ride) { - auto& gameState = GetGameState(); - for (TileCoordsXY tilePos = {}; tilePos.x < gameState.MapSize.x; ++tilePos.x) + auto& gameState = getGameState(); + for (TileCoordsXY tilePos = {}; tilePos.x < gameState.mapSize.x; ++tilePos.x) { - for (tilePos.y = 0; tilePos.y < gameState.MapSize.y; ++tilePos.y) + for (tilePos.y = 0; tilePos.y < gameState.mapSize.y; ++tilePos.y) { for (auto* entrance : TileElementsView(tilePos.ToCoordsXY())) { @@ -5727,70 +5726,70 @@ void RideClearLeftoverEntrances(const Ride& ride) } } -std::string Ride::GetName() const +std::string Ride::getName() const { Formatter ft; - FormatNameTo(ft); + formatNameTo(ft); return FormatStringIDLegacy(STR_STRINGID, reinterpret_cast(ft.Data())); } -void Ride::FormatNameTo(Formatter& ft) const +void Ride::formatNameTo(Formatter& ft) const { - if (!custom_name.empty()) + if (!customName.empty()) { - auto str = custom_name.c_str(); + auto str = customName.c_str(); ft.Add(STR_STRING); ft.Add(str); } else { - const auto& rtd = GetRideTypeDescriptor(); + const auto& rtd = getRideTypeDescriptor(); auto rideTypeName = rtd.Naming.Name; if (rtd.HasFlag(RtdFlag::listVehiclesSeparately)) { - auto rideEntry = GetRideEntry(); + auto rideEntry = getRideEntry(); if (rideEntry != nullptr) { rideTypeName = rideEntry->naming.Name; } } - ft.Add(1).Add(rideTypeName).Add(default_name_number); + ft.Add(1).Add(rideTypeName).Add(defaultNameNumber); } } -uint64_t Ride::GetAvailableModes() const +uint64_t Ride::getAvailableModes() const { - if (GetGameState().Cheats.showAllOperatingModes) + if (getGameState().cheats.showAllOperatingModes) return kAllRideModesAvailable; - return GetRideTypeDescriptor().RideModes; + return getRideTypeDescriptor().RideModes; } -const RideTypeDescriptor& Ride::GetRideTypeDescriptor() const +const RideTypeDescriptor& Ride::getRideTypeDescriptor() const { return ::GetRideTypeDescriptor(type); } -uint8_t Ride::GetNumShelteredSections() const +uint8_t Ride::getNumShelteredSections() const { - return num_sheltered_sections & ShelteredSectionsBits::kNumShelteredSectionsMask; + return numShelteredSections & ShelteredSectionsBits::kNumShelteredSectionsMask; } -void Ride::IncreaseNumShelteredSections() +void Ride::increaseNumShelteredSections() { - auto newNumShelteredSections = GetNumShelteredSections(); + auto newNumShelteredSections = getNumShelteredSections(); if (newNumShelteredSections != 0x1F) newNumShelteredSections++; - num_sheltered_sections &= ~ShelteredSectionsBits::kNumShelteredSectionsMask; - num_sheltered_sections |= newNumShelteredSections; + numShelteredSections &= ~ShelteredSectionsBits::kNumShelteredSectionsMask; + numShelteredSections |= newNumShelteredSections; } -void Ride::UpdateRideTypeForAllPieces() +void Ride::updateRideTypeForAllPieces() { - auto& gameState = GetGameState(); - for (int32_t y = 0; y < gameState.MapSize.y; y++) + auto& gameState = getGameState(); + for (int32_t y = 0; y < gameState.mapSize.y; y++) { - for (int32_t x = 0; x < gameState.MapSize.x; x++) + for (int32_t x = 0; x < gameState.mapSize.x; x++) { auto* tileElement = MapGetFirstElementAt(TileCoordsXY(x, y)); if (tileElement == nullptr) @@ -5812,22 +5811,22 @@ void Ride::UpdateRideTypeForAllPieces() } } -bool Ride::HasLifecycleFlag(uint32_t flag) const +bool Ride::hasLifecycleFlag(uint32_t flag) const { - return (lifecycle_flags & flag) != 0; + return (lifecycleFlags & flag) != 0; } -void Ride::SetLifecycleFlag(uint32_t flag, bool on) +void Ride::setLifecycleFlag(uint32_t flag, bool on) { if (on) - lifecycle_flags |= flag; + lifecycleFlags |= flag; else - lifecycle_flags &= ~flag; + lifecycleFlags &= ~flag; } -bool Ride::HasRecolourableShopItems() const +bool Ride::hasRecolourableShopItems() const { - const auto rideEntry = GetRideEntry(); + const auto rideEntry = getRideEntry(); if (rideEntry == nullptr) return false; @@ -5842,9 +5841,9 @@ bool Ride::HasRecolourableShopItems() const return false; } -bool Ride::HasStation() const +bool Ride::hasStation() const { - return num_stations != 0; + return numStations != 0; } std::vector GetTracklessRides() @@ -5882,7 +5881,7 @@ std::vector GetTracklessRides() return result; } -ResultWithMessage Ride::ChangeStatusDoStationChecks(StationIndex& stationIndex) +ResultWithMessage Ride::changeStatusDoStationChecks(StationIndex& stationIndex) { auto stationIndexCheck = RideModeCheckStationPresent(*this); stationIndex = stationIndexCheck.StationIndex; @@ -5896,16 +5895,16 @@ ResultWithMessage Ride::ChangeStatusDoStationChecks(StationIndex& stationIndex) return { true }; } -ResultWithMessage Ride::ChangeStatusGetStartElement(StationIndex stationIndex, CoordsXYE& trackElement) +ResultWithMessage Ride::changeStatusGetStartElement(StationIndex stationIndex, CoordsXYE& trackElement) { - auto startLoc = GetStation(stationIndex).Start; + auto startLoc = getStation(stationIndex).Start; trackElement.x = startLoc.x; trackElement.y = startLoc.y; - trackElement.element = reinterpret_cast(GetOriginElement(stationIndex)); + trackElement.element = reinterpret_cast(getOriginElement(stationIndex)); if (trackElement.element == nullptr) { // Maze is strange, station start is 0... investigation required - const auto& rtd = GetRideTypeDescriptor(); + const auto& rtd = getRideTypeDescriptor(); if (rtd.specialType != RtdSpecialType::maze) return { false }; } @@ -5913,12 +5912,12 @@ ResultWithMessage Ride::ChangeStatusGetStartElement(StationIndex stationIndex, C return { true }; } -ResultWithMessage Ride::ChangeStatusCheckCompleteCircuit(const CoordsXYE& trackElement) +ResultWithMessage Ride::changeStatusCheckCompleteCircuit(const CoordsXYE& trackElement) { CoordsXYE problematicTrackElement = {}; - if (mode == RideMode::Race || mode == RideMode::ContinuousCircuit || IsBlockSectioned()) + if (mode == RideMode::race || mode == RideMode::continuousCircuit || isBlockSectioned()) { - if (FindTrackGap(trackElement, &problematicTrackElement)) + if (findTrackGap(trackElement, &problematicTrackElement)) { RideScrollToTrackError(problematicTrackElement); return { false, STR_TRACK_IS_NOT_A_COMPLETE_CIRCUIT }; @@ -5928,11 +5927,11 @@ ResultWithMessage Ride::ChangeStatusCheckCompleteCircuit(const CoordsXYE& trackE return { true }; } -ResultWithMessage Ride::ChangeStatusCheckTrackValidity(const CoordsXYE& trackElement) +ResultWithMessage Ride::changeStatusCheckTrackValidity(const CoordsXYE& trackElement) { CoordsXYE problematicTrackElement = {}; - if (IsBlockSectioned()) + if (isBlockSectioned()) { auto blockBrakeCheck = RideCheckBlockBrakes(trackElement, &problematicTrackElement); if (!blockBrakeCheck.Successful) @@ -5942,7 +5941,7 @@ ResultWithMessage Ride::ChangeStatusCheckTrackValidity(const CoordsXYE& trackEle } } - if (subtype != kObjectEntryIndexNull && !GetGameState().Cheats.enableAllDrawableTrackPieces) + if (subtype != kObjectEntryIndexNull && !getGameState().cheats.enableAllDrawableTrackPieces) { const auto* rideEntry = GetRideEntryByIndex(subtype); if (rideEntry == nullptr) @@ -5967,9 +5966,9 @@ ResultWithMessage Ride::ChangeStatusCheckTrackValidity(const CoordsXYE& trackEle } } - if (mode == RideMode::StationToStation) + if (mode == RideMode::stationToStation) { - if (!FindTrackGap(trackElement, &problematicTrackElement)) + if (!findTrackGap(trackElement, &problematicTrackElement)) { return { false, STR_RIDE_MUST_START_AND_END_WITH_STATIONS }; } @@ -5990,23 +5989,23 @@ ResultWithMessage Ride::ChangeStatusCheckTrackValidity(const CoordsXYE& trackEle return { true }; } -ResultWithMessage Ride::ChangeStatusCreateVehicles(bool isApplying, const CoordsXYE& trackElement) +ResultWithMessage Ride::changeStatusCreateVehicles(bool isApplying, const CoordsXYE& trackElement) { if (isApplying) RideSetStartFinishPoints(id, trackElement); - const auto& rtd = GetRideTypeDescriptor(); - if (!rtd.HasFlag(RtdFlag::noVehicles) && !(lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + const auto& rtd = getRideTypeDescriptor(); + if (!rtd.HasFlag(RtdFlag::noVehicles) && !(lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) { - const auto createVehicleResult = CreateVehicles(trackElement, isApplying); + const auto createVehicleResult = createVehicles(trackElement, isApplying); if (!createVehicleResult.Successful) { return { false, createVehicleResult.Message }; } } - if (rtd.HasFlag(RtdFlag::allowCableLiftHill) && (lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED) - && !(lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT)) + if (rtd.HasFlag(RtdFlag::allowCableLiftHill) && (lifecycleFlags & RIDE_LIFECYCLE_CABLE_LIFT_HILL_COMPONENT_USED) + && !(lifecycleFlags & RIDE_LIFECYCLE_CABLE_LIFT)) { const auto createCableLiftResult = RideCreateCableLift(id, isApplying); if (!createCableLiftResult.Successful) diff --git a/src/openrct2/ride/Ride.h b/src/openrct2/ride/Ride.h index 99a62f3e4a..fb22bdc634 100644 --- a/src/openrct2/ride/Ride.h +++ b/src/openrct2/ride/Ride.h @@ -13,6 +13,7 @@ #include "../actions/ResultWithMessage.h" #include "../core/BitSet.hpp" #include "../core/FixedPoint.hpp" +#include "../core/FlagHolder.hpp" #include "../localisation/Formatter.h" #include "../object/MusicObject.h" #include "../rct2/DATLimits.h" @@ -62,6 +63,19 @@ constexpr money64 kRideMaxPrice = 20.00_GBP; extern const StringId kRideInspectionIntervalNames[]; +enum class RideTestingFlag : uint8_t +{ + sheltered, + turnLeft, + turnRight, + turnBanked, + turnSloped, + dropDown, + poweredLift, + dropUp, +}; +using RideTestingFlags = FlagHolder; + struct RideStation { static constexpr uint8_t kNoTrain = std::numeric_limits::max(); @@ -102,9 +116,9 @@ struct RideMeasurement enum class RideClassification { - Ride, - ShopOrStall, - KioskOrFacility + ride, + shopOrStall, + kioskOrFacility }; namespace OpenRCT2::ShelteredSectionsBits @@ -134,288 +148,288 @@ struct Ride ObjectEntryIndex subtype{ kObjectEntryIndexNull }; RideMode mode{}; VehicleColourSettings vehicleColourSettings{}; - VehicleColour vehicle_colours[OpenRCT2::Limits::kMaxVehicleColours]{}; + VehicleColour vehicleColours[OpenRCT2::Limits::kMaxVehicleColours]{}; // 0 = closed, 1 = open, 2 = test RideStatus status{}; - std::string custom_name; - uint16_t default_name_number{}; - CoordsXY overall_view; + std::string customName; + uint16_t defaultNameNumber{}; + CoordsXY overallView; EntityId vehicles[OpenRCT2::Limits::kMaxTrainsPerRide + 1]{}; // Points to the first car in the train - uint8_t depart_flags{}; - uint8_t num_stations{}; - uint8_t NumTrains{}; - uint8_t num_cars_per_train{}; - uint8_t ProposedNumTrains{}; - uint8_t proposed_num_cars_per_train{}; - uint8_t max_trains{}; - uint8_t MinCarsPerTrain{}; - uint8_t MaxCarsPerTrain{}; - uint8_t min_waiting_time{}; - uint8_t max_waiting_time{}; + uint8_t departFlags{}; + uint8_t numStations{}; + uint8_t numTrains{}; + uint8_t numCarsPerTrain{}; + uint8_t proposedNumTrains{}; + uint8_t proposedNumCarsPerTrain{}; + uint8_t maxTrains{}; + uint8_t minCarsPerTrain{}; + uint8_t maxCarsPerTrain{}; + uint8_t minWaitingTime{}; + uint8_t maxWaitingTime{}; union { - uint8_t operation_option; - uint8_t time_limit; - uint8_t NumLaps; - uint8_t launch_speed; + uint8_t operationOption; + uint8_t timeLimit; + uint8_t numLaps; + uint8_t launchSpeed; uint8_t speed; uint8_t rotations{}; }; - uint8_t boat_hire_return_direction{}; - TileCoordsXY boat_hire_return_position; + uint8_t boatHireReturnDirection{}; + TileCoordsXY boatHireReturnPosition; // bits 0 through 4 are the number of helix sections // bit 5: spinning tunnel, water splash, or rapids // bit 6: log reverser, waterfall // bit 7: whirlpool - uint8_t special_track_elements{}; + uint8_t specialTrackElements{}; // Use ToHumanReadableSpeed if converting to display - int32_t max_speed{}; - int32_t average_speed{}; - uint8_t current_test_segment{}; - uint8_t average_speed_test_timeout{}; - fixed16_2dp max_positive_vertical_g{}; - fixed16_2dp max_negative_vertical_g{}; - fixed16_2dp max_lateral_g{}; - fixed16_2dp previous_vertical_g{}; - fixed16_2dp previous_lateral_g{}; - uint32_t testing_flags{}; + int32_t maxSpeed{}; + int32_t averageSpeed{}; + uint8_t currentTestSegment{}; + uint8_t averageSpeedTestTimeout{}; + fixed16_2dp maxPositiveVerticalG{}; + fixed16_2dp maxNegativeVerticalG{}; + fixed16_2dp maxLateralG{}; + fixed16_2dp previousVerticalG{}; + fixed16_2dp previousLateralG{}; + RideTestingFlags testingFlags{}; // x y z map location of the current track piece during a test // this is to prevent counting special tracks multiple times - TileCoordsXYZ CurTestTrackLocation; + TileCoordsXYZ curTestTrackLocation; // Next 3 variables are related (XXXX XYYY ZZZa aaaa) - uint16_t turn_count_default{}; // X = current turn count - uint16_t turn_count_banked{}; - uint16_t turn_count_sloped{}; // X = number turns > 3 elements + uint16_t turnCountDefault{}; // X = current turn count + uint16_t turnCountBanked{}; + uint16_t turnCountSloped{}; // X = number turns > 3 elements // Y is number of powered lifts, X is drops uint8_t dropsPoweredLifts{}; // (YYXX XXXX) - uint8_t start_drop_height{}; - uint8_t highest_drop_height{}; - int32_t sheltered_length{}; + uint8_t startDropHeight{}; + uint8_t highestDropHeight{}; + int32_t shelteredLength{}; // Unused always 0? Should affect nausea - uint16_t var_11C{}; - uint8_t num_sheltered_sections{}; // (?abY YYYY) + uint16_t var11C{}; + uint8_t numShelteredSections{}; // (?abY YYYY) // Customer counter in the current 960 game tick (about 30 seconds) interval - uint16_t cur_num_customers{}; + uint16_t curNumCustomers{}; // Counts ticks to update customer intervals, resets each 960 game ticks. - uint16_t num_customers_timeout{}; + uint16_t numCustomersTimeout{}; // Customer count in the last 10 * 960 game ticks (sliding window) - uint16_t num_customers[OpenRCT2::Limits::kCustomerHistorySize]{}; + uint16_t numCustomers[OpenRCT2::Limits::kCustomerHistorySize]{}; money64 price[OpenRCT2::RCT2::ObjectLimits::kMaxShopItemsPerRideEntry]{}; - TileCoordsXYZ ChairliftBullwheelLocation[2]; + TileCoordsXYZ chairliftBullwheelLocation[2]; RatingTuple ratings{}; money64 value{}; - uint16_t chairlift_bullwheel_rotation{}; + uint16_t chairliftBullwheelRotation{}; uint8_t satisfaction{}; - uint8_t satisfaction_time_out{}; - uint8_t satisfaction_next{}; + uint8_t satisfactionTimeout{}; + uint8_t satisfactionNext{}; // Various flags stating whether a window needs to be refreshed - uint8_t window_invalidate_flags{}; - uint32_t total_customers{}; - money64 total_profit{}; + uint8_t windowInvalidateFlags{}; + uint32_t totalCustomers{}; + money64 totalProfit{}; uint8_t popularity{}; - uint8_t popularity_time_out{}; // Updated every purchase and ?possibly by time? - uint8_t popularity_next{}; // When timeout reached this will be the next popularity - uint16_t num_riders{}; - uint8_t music_tune_id{}; - uint8_t slide_in_use{}; + uint8_t popularityTimeout{}; // Updated every purchase and ?possibly by time? + uint8_t popularityNext{}; // When timeout reached this will be the next popularity + uint16_t numRiders{}; + uint8_t musicTuneId{}; + uint8_t slideInUse{}; union { - EntityId slide_peep; - uint16_t maze_tiles{}; + EntityId slidePeep; + uint16_t mazeTiles{}; }; - uint8_t slide_peep_t_shirt_colour{}; - uint8_t spiral_slide_progress{}; - int32_t build_date{}; - money64 upkeep_cost{}; - EntityId race_winner{}; - uint32_t music_position{}; - uint8_t breakdown_reason_pending{}; - uint8_t mechanic_status{}; + uint8_t slidePeepTShirtColour{}; + uint8_t spiralSlideProgress{}; + int32_t buildDate{}; + money64 upkeepCost{}; + EntityId raceWinner{}; + uint32_t musicPosition{}; + uint8_t breakdownReasonPending{}; + uint8_t mechanicStatus{}; EntityId mechanic{ EntityId::GetNull() }; - StationIndex inspection_station{ StationIndex::GetNull() }; - uint8_t broken_vehicle{}; - uint8_t broken_car{}; - uint8_t breakdown_reason{}; + StationIndex inspectionStation{ StationIndex::GetNull() }; + uint8_t brokenTrain{}; + uint8_t brokenCar{}; + uint8_t breakdownReason{}; union { struct { - uint8_t reliability_subvalue; // 0 - 255, acts like the decimals for reliability_percentage - uint8_t reliability_percentage; // Starts at 100 and decreases from there. + uint8_t reliabilitySubvalue; // 0 - 255, acts like the decimals for reliabilityPercentage + uint8_t reliabilityPercentage; // Starts at 100 and decreases from there. }; uint16_t reliability{}; }; // Small constant used to increase the unreliability as the game continues, // making breakdowns more and more likely. - uint8_t unreliability_factor{}; + uint8_t unreliabilityFactor{}; // Range from [0, 100] uint8_t downtime{}; - uint8_t inspection_interval{}; - uint8_t last_inspection{}; - uint8_t downtime_history[OpenRCT2::Limits::kDowntimeHistorySize]{}; - uint32_t no_primary_items_sold{}; - uint32_t no_secondary_items_sold{}; - uint8_t breakdown_sound_modifier{}; + uint8_t inspectionInterval{}; + uint8_t lastInspection{}; + uint8_t downtimeHistory[OpenRCT2::Limits::kDowntimeHistorySize]{}; + uint32_t numPrimaryItemsSold{}; + uint32_t numSecondaryItemsSold{}; + uint8_t breakdownSoundModifier{}; // Used to oscillate the sound when ride breaks down. // 0 = no change, 255 = max change - uint8_t not_fixed_timeout{}; - uint8_t last_crash_type{}; - uint8_t connected_message_throttle{}; - money64 income_per_hour{}; + uint8_t notFixedTimeout{}; + uint8_t lastCrashType{}; + uint8_t connectedMessageThrottle{}; + money64 incomePerHour{}; money64 profit{}; - TrackColour track_colour[kNumRideColourSchemes]{}; + TrackColour trackColours[kNumRideColourSchemes]{}; ObjectEntryIndex music{ kObjectEntryIndexNull }; - ObjectEntryIndex entrance_style{ kObjectEntryIndexNull }; - uint16_t vehicle_change_timeout{}; - uint8_t num_block_brakes{}; - uint8_t lift_hill_speed{}; - uint32_t guests_favourite{}; - uint32_t lifecycle_flags{}; + ObjectEntryIndex entranceStyle{ kObjectEntryIndexNull }; + uint16_t vehicleChangeTimeout{}; + uint8_t numBlockBrakes{}; + uint8_t liftHillSpeed{}; + uint32_t guestsFavourite{}; + uint32_t lifecycleFlags{}; uint16_t totalAirTime{}; - StationIndex current_test_station{ StationIndex::GetNull() }; - uint8_t num_circuits{}; - CoordsXYZ CableLiftLoc{}; - EntityId cable_lift{ EntityId::GetNull() }; + StationIndex currentTestStation{ StationIndex::GetNull() }; + uint8_t numCircuits{}; + CoordsXYZ cableLiftLoc{}; + EntityId cableLift{ EntityId::GetNull() }; // These two fields are used to warn users about issues. // Such issue can be hacked rides with incompatible options set. // They don't require export/import. - uint8_t current_issues{}; - uint32_t last_issue_time{}; + uint8_t currentIssues{}; + uint32_t lastIssueTime{}; // TO-DO: those friend functions are temporary, find a way to not access the private fields - friend void UpdateSpiralSlide(Ride& ride); - friend void UpdateChairlift(Ride& ride); + friend void updateSpiralSlide(Ride& ride); + friend void updateChairlift(Ride& ride); private: std::array stations{}; public: - RideStation& GetStation(StationIndex stationIndex = StationIndex::FromUnderlying(0)); - const RideStation& GetStation(StationIndex stationIndex = StationIndex::FromUnderlying(0)) const; - std::span GetStations(); - std::span GetStations() const; - StationIndex GetStationIndex(const RideStation* station) const; + RideStation& getStation(StationIndex stationIndex = StationIndex::FromUnderlying(0)); + const RideStation& getStation(StationIndex stationIndex = StationIndex::FromUnderlying(0)) const; + std::span getStations(); + std::span getStations() const; + StationIndex getStationIndex(const RideStation* station) const; // Returns the logical station number from the given station. Index 0 = station 1, index 1 = station 2. It accounts for gaps // in the station array. e.g. if only slot 0 and 2 are in use, index 2 returns 2 instead of 3. - StationIndex::UnderlyingType GetStationNumber(StationIndex in) const; + StationIndex::UnderlyingType getStationNumber(StationIndex in) const; public: uint16_t inversions{}; uint16_t holes{}; - uint8_t sheltered_eighths{}; + uint8_t shelteredEighths{}; std::unique_ptr measurement; private: - void Update(); - void UpdateQueueLength(StationIndex stationIndex); - ResultWithMessage CreateVehicles(const CoordsXYE& element, bool isApplying); - void MoveTrainsToBlockBrakes(const CoordsXYZ& firstBlockPosition, TrackElement& firstBlock); - money64 CalculateIncomePerHour() const; - void ChainQueues() const; - void ConstructMissingEntranceOrExit() const; + void update(); + void updateQueueLength(StationIndex stationIndex); + ResultWithMessage createVehicles(const CoordsXYE& element, bool isApplying); + void moveTrainsToBlockBrakes(const CoordsXYZ& firstBlockPosition, TrackElement& firstBlock); + money64 calculateIncomePerHour() const; + void chainQueues() const; + void constructMissingEntranceOrExit() const; - ResultWithMessage ChangeStatusDoStationChecks(StationIndex& stationIndex); - ResultWithMessage ChangeStatusGetStartElement(StationIndex stationIndex, CoordsXYE& trackElement); - ResultWithMessage ChangeStatusCheckCompleteCircuit(const CoordsXYE& trackElement); - ResultWithMessage ChangeStatusCheckTrackValidity(const CoordsXYE& trackElement); - ResultWithMessage ChangeStatusCreateVehicles(bool isApplying, const CoordsXYE& trackElement); + ResultWithMessage changeStatusDoStationChecks(StationIndex& stationIndex); + ResultWithMessage changeStatusGetStartElement(StationIndex stationIndex, CoordsXYE& trackElement); + ResultWithMessage changeStatusCheckCompleteCircuit(const CoordsXYE& trackElement); + ResultWithMessage changeStatusCheckTrackValidity(const CoordsXYE& trackElement); + ResultWithMessage changeStatusCreateVehicles(bool isApplying, const CoordsXYE& trackElement); public: - bool CanBreakDown() const; - RideClassification GetClassification() const; - bool IsRide() const; - void Renew(); - void Delete(); - void Crash(uint8_t vehicleIndex); - void SetToDefaultInspectionInterval(); - void SetRideEntry(ObjectEntryIndex entryIndex); + bool canBreakDown() const; + RideClassification getClassification() const; + bool isRide() const; + void renew(); + void remove(); + void crash(uint8_t vehicleIndex); + void setToDefaultInspectionInterval(); + void setRideEntry(ObjectEntryIndex entryIndex); - void SetNumTrains(int32_t numTrains); - void SetNumCarsPerVehicle(int32_t numCarsPerVehicle); - void SetReversedTrains(bool reversedTrains); - void UpdateMaxVehicles(); - void UpdateNumberOfCircuits(); + void setNumTrains(int32_t newNumTrains); + void setNumCarsPerTrain(int32_t numCarsPerVehicle); + void setReversedTrains(bool reversedTrains); + void updateMaxVehicles(); + void updateNumberOfCircuits(); - bool HasSpinningTunnel() const; - bool HasWaterSplash() const; - bool HasRapids() const; - bool HasLogReverser() const; - bool HasWaterfall() const; - bool HasWhirlpool() const; + bool hasSpinningTunnel() const; + bool hasWaterSplash() const; + bool hasRapids() const; + bool hasLogReverser() const; + bool hasWaterfall() const; + bool hasWhirlpool() const; - bool IsPoweredLaunched() const; - bool IsBlockSectioned() const; - bool CanHaveMultipleCircuits() const; - bool SupportsStatus(RideStatus s) const; + bool isPoweredLaunched() const; + bool isBlockSectioned() const; + bool canHaveMultipleCircuits() const; + bool supportsStatus(RideStatus s) const; - void StopGuestsQueuing(); - void ValidateStations(); + void stopGuestsQueuing(); + void validateStations(); - ResultWithMessage Open(bool isApplying); - ResultWithMessage Test(bool isApplying); - ResultWithMessage Simulate(bool isApplying); + ResultWithMessage open(bool isApplying); + ResultWithMessage test(bool isApplying); + ResultWithMessage simulate(bool isApplying); - RideMode GetDefaultMode() const; + RideMode getDefaultMode() const; - void SetColourPreset(uint8_t index); + void setColourPreset(uint8_t index); - const RideObjectEntry* GetRideEntry() const; + const RideObjectEntry* getRideEntry() const; - size_t GetNumPrices() const; - int32_t GetAge() const; - int32_t GetTotalQueueLength() const; - int32_t GetMaxQueueTime() const; + size_t getNumPrices() const; + int32_t getAge() const; + int32_t getTotalQueueLength() const; + int32_t getMaxQueueTime() const; - void QueueInsertGuestAtFront(StationIndex stationIndex, Guest* peep); - Guest* GetQueueHeadGuest(StationIndex stationIndex) const; + void queueInsertGuestAtFront(StationIndex stationIndex, Guest* peep); + Guest* getQueueHeadGuest(StationIndex stationIndex) const; - void SetNameToDefault(); - std::string GetName() const; - void FormatNameTo(Formatter&) const; - void FormatStatusTo(Formatter&) const; + void setNameToDefault(); + std::string getName() const; + void formatNameTo(Formatter&) const; + void formatStatusTo(Formatter&) const; - static void UpdateAll(); - static bool NameExists(std::string_view name, RideId excludeRideId = RideId::GetNull()); + static void updateAll(); + static bool nameExists(std::string_view name, RideId excludeRideId = RideId::GetNull()); - [[nodiscard]] std::unique_ptr SaveToTrackDesign(TrackDesignState& tds) const; + [[nodiscard]] std::unique_ptr saveToTrackDesign(TrackDesignState& tds) const; - uint64_t GetAvailableModes() const; - const RideTypeDescriptor& GetRideTypeDescriptor() const; - TrackElement* GetOriginElement(StationIndex stationIndex) const; + uint64_t getAvailableModes() const; + const RideTypeDescriptor& getRideTypeDescriptor() const; + TrackElement* getOriginElement(StationIndex stationIndex) const; - std::pair GetMeasurement(); + std::pair getMeasurement(); - uint8_t GetNumShelteredSections() const; - void IncreaseNumShelteredSections(); + uint8_t getNumShelteredSections() const; + void increaseNumShelteredSections(); - void RemoveVehicles(); + void removeVehicles(); /** * Updates all pieces of the ride to match the internal ride type. (Track pieces can have different ride types from the ride * they belong to, to enable “merging”.) */ - void UpdateRideTypeForAllPieces(); + void updateRideTypeForAllPieces(); - void UpdateSatisfaction(const uint8_t happiness); - void UpdatePopularity(const uint8_t pop_amount); - void RemovePeeps(); + void updateSatisfaction(const uint8_t happiness); + void updatePopularity(const uint8_t pop_amount); + void removePeeps(); - int32_t GetTotalLength() const; - int32_t GetTotalTime() const; + int32_t getTotalLength() const; + int32_t getTotalTime() const; - const StationObject* GetStationObject() const; - const MusicObject* GetMusicObject() const; + const StationObject* getStationObject() const; + const MusicObject* getMusicObject() const; - bool HasLifecycleFlag(uint32_t flag) const; - void SetLifecycleFlag(uint32_t flag, bool on); + bool hasLifecycleFlag(uint32_t flag) const; + void setLifecycleFlag(uint32_t flag, bool on); - bool HasRecolourableShopItems() const; - bool HasStation() const; + bool hasRecolourableShopItems() const; + bool hasStation() const; - bool FindTrackGap(const CoordsXYE& input, CoordsXYE* output) const; + bool findTrackGap(const CoordsXYE& input, CoordsXYE* output) const; uint8_t getNumDrops() const; void setNumDrops(uint8_t newValue); @@ -423,8 +437,8 @@ public: uint8_t getNumPoweredLifts() const; void setPoweredLifts(uint8_t newValue); }; -void UpdateSpiralSlide(Ride& ride); -void UpdateChairlift(Ride& ride); +void updateSpiralSlide(Ride& ride); +void updateChairlift(Ride& ride); #pragma pack(push, 1) @@ -446,7 +460,7 @@ static_assert(sizeof(TrackBeginEnd) == 36); #pragma pack(pop) -// Constants used by the lifecycle_flags property at 0x1D0 +// Constants used by the lifecycleFlags property at 0x1D0 enum { RIDE_LIFECYCLE_ON_TRACK = 1 << 0, @@ -505,18 +519,6 @@ enum RIDE_ENTRY_FLAG_HIDE_EMPTY_TRAINS = 1 << 22, }; -enum -{ - RIDE_TESTING_SHELTERED = (1 << 0), - RIDE_TESTING_TURN_LEFT = (1 << 1), - RIDE_TESTING_TURN_RIGHT = (1 << 2), - RIDE_TESTING_TURN_BANKED = (1 << 3), - RIDE_TESTING_TURN_SLOPED = (1 << 4), - RIDE_TESTING_DROP_DOWN = (1 << 5), - RIDE_TESTING_POWERED_LIFT = (1 << 6), - RIDE_TESTING_DROP_UP = (1 << 7), -}; - enum { RIDE_TYPE_SPIRAL_ROLLER_COASTER = 0, @@ -628,69 +630,69 @@ enum enum class RideStatus : uint8_t { - Closed, - Open, - Testing, - Simulating, - Count, + closed, + open, + testing, + simulating, + count, }; enum class RideMode : uint8_t { - Normal, - ContinuousCircuit, - ReverseInclineLaunchedShuttle, - PoweredLaunchPasstrough, // RCT2 style, pass through station - Shuttle, - BoatHire, - UpwardLaunch, - RotatingLift, - StationToStation, - SingleRidePerAdmission, - UnlimitedRidesPerAdmission = 10, - Maze, - Race, - Dodgems, - Swing, - ShopStall, - Rotation, - ForwardRotation, - BackwardRotation, - FilmAvengingAviators, - MouseTails3DFilm = 20, - SpaceRings, - Beginners, - LimPoweredLaunch, - FilmThrillRiders, - StormChasers3DFilm, - SpaceRaiders3DFilm, - Intense, - Berserk, - HauntedHouse, - Circus = 30, - DownwardLaunch, - CrookedHouse, - FreefallDrop, - ContinuousCircuitBlockSectioned, - PoweredLaunch, // RCT1 style, don't pass through station - PoweredLaunchBlockSectioned, + normal, + continuousCircuit, + reverseInclineLaunchedShuttle, + poweredLaunchPasstrough, // RCT2 style, pass through station + shuttle, + boatHire, + upwardLaunch, + rotatingLift, + stationToStation, + singleRidePerAdmission, + unlimitedRidesPerAdmission = 10, + maze, + race, + dodgems, + swing, + shopStall, + rotation, + forwardRotation, + backwardRotation, + filmAvengingAviators, + mouseTails3DFilm = 20, + spaceRings, + beginners, + limPoweredLaunch, + filmThrillRiders, + stormChasers3DFilm, + spaceRaiders3DFilm, + intense, + berserk, + hauntedHouse, + circus = 30, + downwardLaunch, + crookedHouse, + freefallDrop, + continuousCircuitBlockSectioned, + poweredLaunch, // RCT1 style, don't pass through station + poweredLaunchBlockSectioned, - Count, - NullMode = 255, + count, + nullMode = 255, }; RideMode& operator++(RideMode& d, int); -enum +enum class RideCategory : uint8_t { - RIDE_CATEGORY_TRANSPORT, - RIDE_CATEGORY_GENTLE, - RIDE_CATEGORY_ROLLERCOASTER, - RIDE_CATEGORY_THRILL, - RIDE_CATEGORY_WATER, - RIDE_CATEGORY_SHOP, + transport, + gentle, + rollerCoaster, + thrill, + water, + shop, - RIDE_CATEGORY_NONE = 255, + none = 255, }; enum @@ -787,7 +789,7 @@ enum RIDE_INSPECTION_NEVER }; -// Flags used by ride->window_invalidate_flags +// Flags used by ride->windowInvalidateFlags enum { RIDE_INVALIDATE_RIDE_CUSTOMER = 1, @@ -806,7 +808,7 @@ enum RIDE_MEASUREMENT_FLAG_G_FORCES = 1 << 2 }; -// Constants for ride->special_track_elements +// Constants for ride->specialTrackElements enum { RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS = 1 << 5, @@ -821,49 +823,12 @@ enum RIDE_CRASH_TYPE_FATALITIES = 8 }; -enum +enum MazeWallType : uint8_t { - RIDE_SET_VEHICLES_COMMAND_TYPE_NUM_TRAINS, - RIDE_SET_VEHICLES_COMMAND_TYPE_NUM_CARS_PER_TRAIN, - RIDE_SET_VEHICLES_COMMAND_TYPE_RIDE_ENTRY -}; - -enum -{ - RIDE_SETTING_MODE, - RIDE_SETTING_DEPARTURE, - RIDE_SETTING_MIN_WAITING_TIME, - RIDE_SETTING_MAX_WAITING_TIME, - RIDE_SETTING_OPERATION_OPTION, - RIDE_SETTING_INSPECTION_INTERVAL, - RIDE_SETTING_MUSIC, - RIDE_SETTING_MUSIC_TYPE, - RIDE_SETTING_LIFT_HILL_SPEED, - RIDE_SETTING_NUM_CIRCUITS, - RIDE_SETTING_RIDE_TYPE, -}; - -enum -{ - MAZE_WALL_TYPE_BRICK, - MAZE_WALL_TYPE_HEDGE, - MAZE_WALL_TYPE_ICE, - MAZE_WALL_TYPE_WOOD, -}; - -enum -{ - TRACK_SELECTION_FLAG_ARROW = 1 << 0, - TRACK_SELECTION_FLAG_TRACK = 1 << 1, - TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT = 1 << 2, - TRACK_SELECTION_FLAG_RECHECK = 1 << 3, - TRACK_SELECTION_FLAG_TRACK_PLACE_ACTION_QUEUED = 1 << 4, -}; - -enum -{ - RIDE_MODIFY_DEMOLISH, - RIDE_MODIFY_RENEW, + brick, + hedges, + ice, + wooden, }; enum @@ -872,20 +837,8 @@ enum RIDE_ISSUE_GUESTS_STUCK = (1 << 0), }; -enum -{ - TRACK_ELEMENT_SET_HIGHLIGHT_FALSE = (1 << 0), - TRACK_ELEMENT_SET_HIGHLIGHT_TRUE = (1 << 1), - TRACK_ELEMENT_SET_COLOUR_SCHEME = (1 << 2), - TRACK_ELEMENT_SET_HAS_CABLE_LIFT_TRUE = (1 << 3), - TRACK_ELEMENT_SET_HAS_CABLE_LIFT_FALSE = (1 << 4), - TRACK_ELEMENT_SET_SEAT_ROTATION = (1 << 5), - TRACK_ELEMENT_SET_BRAKE_CLOSED_STATE = (1 << 6), - TRACK_ELEMENT_SET_BRAKE_BOOSTER_SPEED = (1 << 7) -}; - constexpr uint8_t kMaxRideMeasurements = 8; -constexpr money64 RIDE_VALUE_UNDEFINED = kMoney64Undefined; +constexpr money64 kRideValueUndefined = kMoney64Undefined; constexpr uint16_t kRideInitialReliability = ((100 << 8) | 0xFF); // Upper byte is percentage, lower byte is "decimal". constexpr uint8_t kStationDepartFlag = (1 << 7); @@ -990,7 +943,7 @@ bool RideHasRatings(const Ride& ride); int32_t GetUnifiedBoosterSpeed(ride_type_t rideType, int32_t relativeSpeed); void FixInvalidVehicleSpriteSizes(); -bool RideEntryHasCategory(const RideObjectEntry& rideEntry, uint8_t category); +bool RideEntryHasCategory(const RideObjectEntry& rideEntry, RideCategory category); ObjectEntryIndex RideGetEntryIndex(ride_type_t rideType, ObjectEntryIndex rideSubType); diff --git a/src/openrct2/ride/RideAudio.cpp b/src/openrct2/ride/RideAudio.cpp index 0772df9842..0edfc3bd84 100644 --- a/src/openrct2/ride/RideAudio.cpp +++ b/src/openrct2/ride/RideAudio.cpp @@ -208,7 +208,7 @@ namespace OpenRCT2::RideAudio { // Create new music channel auto ride = GetRide(instance.RideId); - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); rtd.StartRideMusic(instance); } @@ -254,7 +254,7 @@ namespace OpenRCT2::RideAudio */ void UpdateMusicChannels() { - if ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) != 0 || (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) != 0) + if (gLegacyScene == LegacyScene::scenarioEditor || gLegacyScene == LegacyScene::titleSequence) return; // TODO Allow circus music (CSS24) to play if ride music is disabled (that should be sound) @@ -280,9 +280,9 @@ namespace OpenRCT2::RideAudio if (musicObj != nullptr) { auto numTracks = musicObj->GetTrackCount(); - if (ride.music_tune_id < numTracks) + if (ride.musicTuneId < numTracks) { - auto track = musicObj->GetTrack(ride.music_tune_id); + auto track = musicObj->GetTrack(ride.musicTuneId); return { track->BytesPerTick, track->Size }; } } @@ -291,22 +291,22 @@ namespace OpenRCT2::RideAudio static std::pair RideMusicGetTrackOffsetLength(const Ride& ride) { - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); return rtd.MusicTrackOffsetLength(ride); } static void RideUpdateMusicPosition(Ride& ride) { auto [trackOffset, trackLength] = RideMusicGetTrackOffsetLength(ride); - auto position = ride.music_position + trackOffset; + auto position = ride.musicPosition + trackOffset; if (position < trackLength) { - ride.music_position = position; + ride.musicPosition = position; } else { - ride.music_tune_id = kTuneIDNull; - ride.music_position = 0; + ride.musicTuneId = kTuneIDNull; + ride.musicPosition = 0; } } @@ -319,25 +319,25 @@ namespace OpenRCT2::RideAudio { auto& instance = _musicInstances.emplace_back(); instance.RideId = ride.id; - instance.TrackIndex = ride.music_tune_id; + instance.TrackIndex = ride.musicTuneId; instance.Offset = offset; instance.Volume = volume; instance.Pan = pan; instance.Frequency = sampleRate; } - ride.music_position = static_cast(offset); + ride.musicPosition = static_cast(offset); } else { - ride.music_tune_id = kTuneIDNull; - ride.music_position = 0; + ride.musicTuneId = kTuneIDNull; + ride.musicPosition = 0; } } static void RideUpdateMusicPosition(Ride& ride, int16_t volume, int16_t pan, uint16_t sampleRate) { auto foundChannel = std::find_if(_musicChannels.begin(), _musicChannels.end(), [&ride](const auto& channel) { - return channel.RideId == ride.id && channel.TrackIndex == ride.music_tune_id; + return channel.RideId == ride.id && channel.TrackIndex == ride.musicTuneId; }); auto [trackOffset, trackLength] = RideMusicGetTrackOffsetLength(ride); @@ -352,14 +352,14 @@ namespace OpenRCT2::RideAudio else { // We had a real music channel, but it isn't playing anymore, so stop the track - ride.music_position = 0; - ride.music_tune_id = kTuneIDNull; + ride.musicPosition = 0; + ride.musicTuneId = kTuneIDNull; } } else { // We do not have a real music channel, so simulate the playing of the music track - auto newOffset = ride.music_position + trackOffset; + auto newOffset = ride.musicPosition + trackOffset; RideUpdateMusicPosition(ride, newOffset, trackLength, volume, pan, sampleRate); } } @@ -381,7 +381,7 @@ namespace OpenRCT2::RideAudio */ void UpdateMusicInstance(Ride& ride, const CoordsXYZ& rideCoords, uint16_t sampleRate) { - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !gGameSoundsOff && g_music_tracking_viewport != nullptr) + if (gLegacyScene != LegacyScene::scenarioEditor && !gGameSoundsOff && g_music_tracking_viewport != nullptr) { auto rotatedCoords = Translate3DTo2DWithZ(GetCurrentRotation(), rideCoords); auto viewport = g_music_tracking_viewport; diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index ec02546580..a9762f22d6 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -62,7 +62,7 @@ CoordsXYZ _currentTrackBegin; uint8_t _currentTrackPieceDirection; OpenRCT2::TrackElemType _currentTrackPieceType; -uint8_t _currentTrackSelectionFlags; +TrackSelectionFlags _currentTrackSelectionFlags; uint32_t _rideConstructionNextArrowPulse = 0; TrackPitch _currentTrackPitchEnd; TrackRoll _currentTrackRollEnd; @@ -93,22 +93,22 @@ using namespace OpenRCT2::TrackMetaData; static int32_t ride_check_if_construction_allowed(Ride& ride) { Formatter ft; - const auto* rideEntry = ride.GetRideEntry(); + const auto* rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) { ContextShowError(STR_INVALID_RIDE_TYPE, STR_CANT_EDIT_INVALID_RIDE_TYPE, ft); return 0; } - if (ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) { - ride.FormatNameTo(ft); + ride.formatNameTo(ft); ContextShowError(STR_CANT_START_CONSTRUCTION_ON, STR_HAS_BROKEN_DOWN_AND_REQUIRES_FIXING, ft); return 0; } - if (ride.status != RideStatus::Closed && ride.status != RideStatus::Simulating) + if (ride.status != RideStatus::closed && ride.status != RideStatus::simulating) { - ride.FormatNameTo(ft); + ride.formatNameTo(ft); ContextShowError(STR_CANT_START_CONSTRUCTION_ON, STR_MUST_BE_CLOSED_FIRST, ft); return 0; } @@ -134,7 +134,7 @@ void RideConstructionStart(Ride& ride) CoordsXYE trackElement; if (RideTryGetOriginElement(ride, &trackElement)) { - ride.FindTrackGap(trackElement, &trackElement); + ride.findTrackGap(trackElement, &trackElement); WindowBase* w = WindowGetMain(); if (w != nullptr && RideModify(trackElement)) @@ -152,10 +152,10 @@ void RideConstructionStart(Ride& ride) */ static void ride_remove_cable_lift(Ride& ride) { - if (ride.lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_CABLE_LIFT) { - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_CABLE_LIFT; - auto spriteIndex = ride.cable_lift; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_CABLE_LIFT; + auto spriteIndex = ride.cableLift; do { Vehicle* vehicle = GetEntity(spriteIndex); @@ -174,12 +174,12 @@ static void ride_remove_cable_lift(Ride& ride) * * rct2: 0x006DD506 */ -void Ride::RemoveVehicles() +void Ride::removeVehicles() { - if (lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK) + if (lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK) { - lifecycle_flags &= ~RIDE_LIFECYCLE_ON_TRACK; - lifecycle_flags &= ~(RIDE_LIFECYCLE_TEST_IN_PROGRESS | RIDE_LIFECYCLE_HAS_STALLED_VEHICLE); + lifecycleFlags &= ~RIDE_LIFECYCLE_ON_TRACK; + lifecycleFlags &= ~(RIDE_LIFECYCLE_TEST_IN_PROGRESS | RIDE_LIFECYCLE_HAS_STALLED_VEHICLE); for (size_t i = 0; i <= OpenRCT2::Limits::kMaxTrainsPerRide; i++) { @@ -222,8 +222,8 @@ void RideClearForConstruction(Ride& ride) { ride.measurement = {}; - ride.lifecycle_flags &= ~(RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN); - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride.lifecycleFlags &= ~(RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN); + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; // Open circuit rides will go directly into building mode (creating ghosts) where it would normally clear the stats, // however this causes desyncs since it's directly run from the window and other clients would not get it. @@ -234,7 +234,7 @@ void RideClearForConstruction(Ride& ride) } ride_remove_cable_lift(ride); - ride.RemoveVehicles(); + ride.removeVehicles(); RideClearBlockedTiles(ride); auto* windowMgr = Ui::GetWindowManager(); @@ -247,16 +247,16 @@ void RideClearForConstruction(Ride& ride) * * rct2: 0x006664DF */ -void Ride::RemovePeeps() +void Ride::removePeeps() { // Find first station auto stationIndex = RideGetFirstValidStationStart(*this); // Get exit position and direction - auto exitPosition = CoordsXYZD{ 0, 0, 0, INVALID_DIRECTION }; + auto exitPosition = CoordsXYZD{ 0, 0, 0, kInvalidDirection }; if (!stationIndex.IsNull()) { - auto location = GetStation(stationIndex).Exit.ToCoordsXYZD(); + auto location = getStation(stationIndex).Exit.ToCoordsXYZD(); if (!location.IsNull()) { auto direction = DirectionReverse(location.direction); @@ -285,7 +285,7 @@ void Ride::RemovePeeps() if (peep->State == PeepState::QueuingFront && peep->RideSubState == PeepRideSubState::AtEntrance) peep->RemoveFromQueue(); - if (exitPosition.direction == INVALID_DIRECTION) + if (exitPosition.direction == kInvalidDirection) { CoordsXYZ newLoc = { peep->NextLoc.ToTileCentre(), peep->NextLoc.z }; if (peep->GetNextIsSloped()) @@ -315,7 +315,7 @@ void Ride::RemovePeeps() if (peep->CurrentRide != id) continue; - if (exitPosition.direction == INVALID_DIRECTION) + if (exitPosition.direction == kInvalidDirection) { CoordsXYZ newLoc = { peep->NextLoc.ToTileCentre(), peep->NextLoc.z }; if (peep->GetNextIsSloped()) @@ -335,17 +335,17 @@ void Ride::RemovePeeps() peep->WindowInvalidateFlags |= PEEP_INVALIDATE_PEEP_STATS; } } - num_riders = 0; - slide_in_use = 0; - window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN; + numRiders = 0; + slideInUse = 0; + windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN; } void RideClearBlockedTiles(const Ride& ride) { - auto& gameState = GetGameState(); - for (TileCoordsXY tilePos = {}; tilePos.x < gameState.MapSize.x; ++tilePos.x) + auto& gameState = getGameState(); + for (TileCoordsXY tilePos = {}; tilePos.x < gameState.mapSize.x; ++tilePos.x) { - for (tilePos.y = 0; tilePos.y < gameState.MapSize.y; ++tilePos.y) + for (tilePos.y = 0; tilePos.y < gameState.mapSize.y; ++tilePos.y) { for (auto* trackElement : TileElementsView(tilePos.ToCoordsXY())) { @@ -377,7 +377,7 @@ void RideClearBlockedTiles(const Ride& ride) */ std::optional GetTrackElementOriginAndApplyChanges( const CoordsXYZD& location, OpenRCT2::TrackElemType type, uint16_t extra_params, TileElement** output_element, - uint16_t flags) + TrackElementSetFlags flags) { // Find the relevant track piece, prefer sequence 0 (this ensures correct behaviour for diagonal track pieces) auto trackElement = MapGetTrackElementAtOfTypeSeq(location, type, 0); @@ -431,15 +431,15 @@ std::optional GetTrackElementOriginAndApplyChanges( { *output_element = reinterpret_cast(trackElement); } - if (flags & TRACK_ELEMENT_SET_HIGHLIGHT_FALSE) + if (flags.has(TrackElementSetFlag::highlightOff)) { trackElement->SetHighlight(false); } - if (flags & TRACK_ELEMENT_SET_HIGHLIGHT_TRUE) + if (flags.has(TrackElementSetFlag::highlightOn)) { trackElement->SetHighlight(true); } - if (flags & TRACK_ELEMENT_SET_COLOUR_SCHEME) + if (flags.has(TrackElementSetFlag::colourScheme)) { auto newScheme = static_cast(extra_params & 0xFF); trackElement->SetColourScheme(newScheme); @@ -449,23 +449,23 @@ std::optional GetTrackElementOriginAndApplyChanges( _currentColourScheme = newScheme; } } - if (flags & TRACK_ELEMENT_SET_SEAT_ROTATION) + if (flags.has(TrackElementSetFlag::seatRotation)) { trackElement->SetSeatRotation(static_cast(extra_params & 0xFF)); } - if (flags & TRACK_ELEMENT_SET_HAS_CABLE_LIFT_TRUE) + if (flags.has(TrackElementSetFlag::cableLiftOn)) { trackElement->SetHasCableLift(true); } - if (flags & TRACK_ELEMENT_SET_HAS_CABLE_LIFT_FALSE) + if (flags.has(TrackElementSetFlag::cableLiftOff)) { trackElement->SetHasCableLift(false); } - if (flags & TRACK_ELEMENT_SET_BRAKE_CLOSED_STATE) + if (flags.has(TrackElementSetFlag::brakeClosed)) { trackElement->SetBrakeClosed(extra_params != 0); } - if (flags & TRACK_ELEMENT_SET_BRAKE_BOOSTER_SPEED) + if (flags.has(TrackElementSetFlag::brakeBoosterSpeed)) { trackElement->SetBrakeBoosterSpeed(static_cast(extra_params & 0xFF)); } @@ -485,16 +485,16 @@ static void WindowRideConstructionUpdateActiveElements() */ void RideConstructionRemoveGhosts() { - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::entranceOrExit)) { RideEntranceExitRemoveGhost(); - _currentTrackSelectionFlags &= ~TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT; + _currentTrackSelectionFlags.unset(TrackSelectionFlag::entranceOrExit); } - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_TRACK) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::track)) { auto intent = Intent(INTENT_ACTION_REMOVE_PROVISIONAL_TRACK_PIECE); ContextBroadcastIntent(&intent); - _currentTrackSelectionFlags &= ~TRACK_SELECTION_FLAG_TRACK; + _currentTrackSelectionFlags.unset(TrackSelectionFlag::track); } } @@ -508,14 +508,14 @@ void RideConstructionInvalidateCurrentTrack() case RideConstructionState::Selected: GetTrackElementOriginAndApplyChanges( { _currentTrackBegin, static_cast(_currentTrackPieceDirection & 3) }, _currentTrackPieceType, 0, - nullptr, TRACK_ELEMENT_SET_HIGHLIGHT_FALSE); + nullptr, { TrackElementSetFlag::highlightOff }); break; case RideConstructionState::MazeBuild: case RideConstructionState::MazeMove: case RideConstructionState::MazeFill: case RideConstructionState::Front: case RideConstructionState::Back: - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ARROW) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::arrow)) { MapInvalidateTileFull(_currentTrackBegin.ToTileStart()); } @@ -524,9 +524,9 @@ void RideConstructionInvalidateCurrentTrack() case RideConstructionState::Place: case RideConstructionState::EntranceExit: default: - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ARROW) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::arrow)) { - _currentTrackSelectionFlags &= ~TRACK_SELECTION_FLAG_ARROW; + _currentTrackSelectionFlags.unset(TrackSelectionFlag::arrow); gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; MapInvalidateTileFull(_currentTrackBegin); } @@ -545,9 +545,9 @@ static void ride_construction_reset_current_piece() if (ride == nullptr) return; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); - if (rtd.HasFlag(RtdFlag::hasTrack) || ride->num_stations == 0) + if (rtd.HasFlag(RtdFlag::hasTrack) || ride->numStations == 0) { _currentlySelectedTrack = rtd.StartTrackPiece; _currentTrackPitchEnd = TrackPitch::None; @@ -579,7 +579,7 @@ void RideConstructionSetDefaultNextPiece() if (ride == nullptr) return; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); int32_t z, direction; OpenRCT2::TrackElemType trackType; @@ -602,7 +602,7 @@ void RideConstructionSetDefaultNextPiece() tileElement = trackBeginEnd.begin_element; trackType = tileElement->AsTrack()->GetTrackType(); - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { ride_construction_reset_current_piece(); return; @@ -644,7 +644,7 @@ void RideConstructionSetDefaultNextPiece() _previousTrackPitchEnd = slope; _currentTrackHasLiftHill = trackElement->HasChain() && ((slope != TrackPitch::Down25 && slope != TrackPitch::Down60) - || GetGameState().Cheats.enableChainLiftOnAllTrack); + || getGameState().cheats.enableChainLiftOnAllTrack); if (TrackTypeHasSpeedSetting(trackElement->GetTrackType())) _currentBrakeSpeed = trackElement->GetBrakeBoosterSpeed(); @@ -701,7 +701,7 @@ void RideConstructionSetDefaultNextPiece() // Set track slope and lift hill _currentTrackPitchEnd = slope; _previousTrackPitchEnd = slope; - if (!GetGameState().Cheats.enableChainLiftOnAllTrack) + if (!getGameState().cheats.enableChainLiftOnAllTrack) { _currentTrackHasLiftHill = trackElement->HasChain(); } @@ -734,7 +734,7 @@ void RideSelectNextSection() auto type = _currentTrackPieceType; TileElement* tileElement; auto newCoords = GetTrackElementOriginAndApplyChanges( - { _currentTrackBegin, static_cast(direction & 3) }, type, 0, &tileElement, 0); + { _currentTrackBegin, static_cast(direction & 3) }, type, 0, &tileElement, {}); if (!newCoords.has_value()) { _rideConstructionState = RideConstructionState::State0; @@ -754,7 +754,7 @@ void RideSelectNextSection() _currentTrackBegin = *newCoords; _currentTrackPieceDirection = tileElement->GetDirection(); _currentTrackPieceType = tileElement->AsTrack()->GetTrackType(); - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); WindowRideConstructionUpdateActiveElements(); } else @@ -763,7 +763,7 @@ void RideSelectNextSection() _currentTrackBegin = { outputElement, newCoords->z }; _currentTrackPieceDirection = direction; _currentTrackPieceType = tileElement->AsTrack()->GetTrackType(); - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); RideConstructionSetDefaultNextPiece(); WindowRideConstructionUpdateActiveElements(); } @@ -792,7 +792,7 @@ void RideSelectPreviousSection() auto type = _currentTrackPieceType; TileElement* tileElement; auto newCoords = GetTrackElementOriginAndApplyChanges( - { _currentTrackBegin, static_cast(direction & 3) }, type, 0, &tileElement, 0); + { _currentTrackBegin, static_cast(direction & 3) }, type, 0, &tileElement, {}); if (newCoords == std::nullopt) { _rideConstructionState = RideConstructionState::State0; @@ -808,7 +808,7 @@ void RideSelectPreviousSection() _currentTrackBegin.z = trackBeginEnd.begin_z; _currentTrackPieceDirection = trackBeginEnd.begin_direction; _currentTrackPieceType = trackBeginEnd.begin_element->AsTrack()->GetTrackType(); - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); WindowRideConstructionUpdateActiveElements(); } else @@ -819,7 +819,7 @@ void RideSelectPreviousSection() _currentTrackBegin.z = trackBeginEnd.begin_z; _currentTrackPieceDirection = trackBeginEnd.end_direction; _currentTrackPieceType = tileElement->AsTrack()->GetTrackType(); - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); RideConstructionSetDefaultNextPiece(); WindowRideConstructionUpdateActiveElements(); } @@ -879,11 +879,11 @@ static bool ride_modify_entrance_or_exit(const CoordsXYE& tileElement) ToolSet( *constructionWindow, entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE ? WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE : WC_RIDE_CONSTRUCTION__WIDX_EXIT, - Tool::Crosshair); + Tool::crosshair); gRideEntranceExitPlaceType = entranceType; gRideEntranceExitPlaceRideIndex = rideIndex; gRideEntranceExitPlaceStationIndex = stationIndex; - InputSetFlag(INPUT_FLAG_6, true); + gInputFlags.set(InputFlag::unk6); if (_rideConstructionState != RideConstructionState::EntranceExit) { gRideEntranceExitPlacePreviousRideConstructionState = _rideConstructionState; @@ -907,7 +907,7 @@ static bool ride_modify_entrance_or_exit(const CoordsXYE& tileElement) : WC_RIDE_CONSTRUCTION__WIDX_EXIT; ToolCancel(); - ToolSet(*constructionWindow, newToolWidgetIndex, Tool::Crosshair); + ToolSet(*constructionWindow, newToolWidgetIndex, Tool::crosshair); }); GameActions::Execute(&rideEntranceExitRemove); @@ -933,7 +933,7 @@ static bool ride_modify_maze(const CoordsXYE& tileElement) _currentTrackBegin.x = tileElement.x; _currentTrackBegin.y = tileElement.y; _currentTrackBegin.z = trackElement->GetBaseZ(); - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); _rideConstructionNextArrowPulse = 0; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; @@ -962,23 +962,23 @@ bool RideModify(const CoordsXYE& input) return false; } - auto rideEntry = ride->GetRideEntry(); + auto rideEntry = ride->getRideEntry(); if (rideEntry == nullptr || !ride_check_if_construction_allowed(*ride)) return false; - if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE && !GetGameState().Cheats.makeAllDestructible) + if (ride->lifecycleFlags & RIDE_LIFECYCLE_INDESTRUCTIBLE && !getGameState().cheats.makeAllDestructible) { Formatter ft; - ride->FormatNameTo(ft); + ride->formatNameTo(ft); ContextShowError( STR_CANT_START_CONSTRUCTION_ON, STR_LOCAL_AUTHORITY_FORBIDS_DEMOLITION_OR_MODIFICATIONS_TO_THIS_RIDE, ft); return false; } // Stop the ride again to clear all vehicles and peeps (compatible with network games) - if (ride->status != RideStatus::Simulating) + if (ride->status != RideStatus::simulating) { - auto gameAction = RideSetStatusAction(ride->id, RideStatus::Closed); + auto gameAction = RideSetStatusAction(ride->id, RideStatus::closed); GameActions::Execute(&gameAction); } @@ -988,16 +988,16 @@ bool RideModify(const CoordsXYE& input) ride_create_or_find_construction_window(rideIndex); - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) { return ride_modify_maze(tileElement); } - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::cannotHaveGaps)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::cannotHaveGaps)) { CoordsXYE endOfTrackElement{}; - if (ride->FindTrackGap(tileElement, &endOfTrackElement)) + if (ride->findTrackGap(tileElement, &endOfTrackElement)) tileElement = endOfTrackElement; } @@ -1007,7 +1007,7 @@ bool RideModify(const CoordsXYE& input) auto tileCoords = CoordsXYZ{ tileElement, tileElement.element->GetBaseZ() }; auto direction = tileElement.element->GetDirection(); auto type = tileElement.element->AsTrack()->GetTrackType(); - auto newCoords = GetTrackElementOriginAndApplyChanges({ tileCoords, direction }, type, 0, nullptr, 0); + auto newCoords = GetTrackElementOriginAndApplyChanges({ tileCoords, direction }, type, 0, nullptr, {}); if (!newCoords.has_value()) return false; @@ -1016,11 +1016,11 @@ bool RideModify(const CoordsXYE& input) _currentTrackBegin = newCoords.value(); _currentTrackPieceDirection = direction; _currentTrackPieceType = type; - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); _rideConstructionNextArrowPulse = 0; gMapSelectFlags &= ~MAP_SELECT_FLAG_ENABLE_ARROW; - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { WindowRideConstructionUpdateActiveElements(); return true; @@ -1037,7 +1037,7 @@ bool RideModify(const CoordsXYE& input) _currentTrackBegin = *newCoords; _currentTrackPieceDirection = direction; _currentTrackPieceType = type; - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); RideSelectPreviousSection(); @@ -1047,7 +1047,7 @@ bool RideModify(const CoordsXYE& input) _currentTrackBegin = *newCoords; _currentTrackPieceDirection = direction; _currentTrackPieceType = type; - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); } WindowRideConstructionUpdateActiveElements(); @@ -1068,20 +1068,20 @@ int32_t RideInitialiseConstructionWindow(Ride& ride) return 0; RideClearForConstruction(ride); - ride.RemovePeeps(); + ride.removePeeps(); w = ride_create_or_find_construction_window(ride.id); - ToolSet(*w, WC_RIDE_CONSTRUCTION__WIDX_CONSTRUCT, Tool::Crosshair); - InputSetFlag(INPUT_FLAG_6, true); + ToolSet(*w, WC_RIDE_CONSTRUCTION__WIDX_CONSTRUCT, Tool::crosshair); + gInputFlags.set(InputFlag::unk6); - _currentlySelectedTrack = ride.GetRideTypeDescriptor().StartTrackPiece; + _currentlySelectedTrack = ride.getRideTypeDescriptor().StartTrackPiece; _currentTrackPitchEnd = TrackPitch::None; _currentTrackRollEnd = TrackRoll::None; _currentTrackHasLiftHill = false; _currentTrackAlternative.clearAll(); - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::startConstructionInverted)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::startConstructionInverted)) _currentTrackAlternative.set(AlternativeTrackFlag::inverted); _previousTrackRollEnd = TrackRoll::None; @@ -1089,7 +1089,7 @@ int32_t RideInitialiseConstructionWindow(Ride& ride) _currentTrackPieceDirection = 0; _rideConstructionState = RideConstructionState::Place; - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); WindowRideConstructionUpdateActiveElements(); return 1; @@ -1173,9 +1173,9 @@ money64 SetOperatingSettingNested(RideId rideId, RideSetSetting setting, uint8_t * * rct2: 0x006CB945 */ -void Ride::ValidateStations() +void Ride::validateStations() { - const auto& rtd = GetRideTypeDescriptor(); + const auto& rtd = getRideTypeDescriptor(); if (rtd.specialType != RtdSpecialType::maze) { // find the stations of the ride to begin stepping over track elements from @@ -1185,14 +1185,14 @@ void Ride::ValidateStations() continue; CoordsXYZ location = station.GetStart(); - uint8_t direction = INVALID_DIRECTION; + uint8_t direction = kInvalidDirection; bool specialTrack = false; TileElement* tileElement = nullptr; while (true) { // search backwards for the previous station TrackElement (only if the first station TrackElement is found) - if (direction != INVALID_DIRECTION) + if (direction != kInvalidDirection) { location.x -= CoordsDirectionDelta[direction].x; location.y -= CoordsDirectionDelta[direction].y; @@ -1228,12 +1228,12 @@ void Ride::ValidateStations() break; } // update the StationIndex, get the TrackElement's rotation - tileElement->AsTrack()->SetStationIndex(GetStationIndex(&station)); + tileElement->AsTrack()->SetStationIndex(getStationIndex(&station)); direction = tileElement->GetDirection(); // In the future this could look at the TED and see if the station has a sequence longer than 1 // tower ride, flat ride, shop - if (GetRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation)) + if (getRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation)) { // if the track has multiple sequences, stop looking for the next one. specialTrack = true; @@ -1279,7 +1279,7 @@ void Ride::ValidateStations() break; } - tileElement->AsTrack()->SetStationIndex(GetStationIndex(&station)); + tileElement->AsTrack()->SetStationIndex(getStationIndex(&station)); } } } @@ -1381,7 +1381,7 @@ void Ride::ValidateStations() stationId = trackElement->AsTrack()->GetStationIndex(); } - auto& station = GetStation(stationId); + auto& station = getStation(stationId); if (tileElement->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_RIDE_EXIT) { // if the location is already set for this station, big problem! @@ -1435,7 +1435,7 @@ bool RideSelectBackwardsFromFront() _currentTrackBegin.z = trackBeginEnd.begin_z; _currentTrackPieceDirection = trackBeginEnd.begin_direction; _currentTrackPieceType = trackBeginEnd.begin_element->AsTrack()->GetTrackType(); - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); return true; } } @@ -1460,7 +1460,7 @@ bool RideSelectForwardsFromBack() _currentTrackBegin.z = z; _currentTrackPieceDirection = next_track.element->GetDirection(); _currentTrackPieceType = next_track.element->AsTrack()->GetTrackType(); - _currentTrackSelectionFlags = 0; + _currentTrackSelectionFlags.clearAll(); return true; } } @@ -1473,10 +1473,10 @@ bool RideSelectForwardsFromBack() */ ResultWithMessage RideAreAllPossibleEntrancesAndExitsBuilt(const Ride& ride) { - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) return { true }; - for (auto& station : ride.GetStations()) + for (auto& station : ride.getStations()) { if (station.Start.IsNull()) { diff --git a/src/openrct2/ride/RideConstruction.h b/src/openrct2/ride/RideConstruction.h index 41f15cbdea..a9c440f11f 100644 --- a/src/openrct2/ride/RideConstruction.h +++ b/src/openrct2/ride/RideConstruction.h @@ -26,6 +26,29 @@ struct RideTypeDescriptor; struct TrackDrawerDescriptor; struct TrackDrawerEntry; +enum class TrackElementSetFlag : uint8_t +{ + highlightOff, + highlightOn, + colourScheme, + cableLiftOn, + cableLiftOff, + seatRotation, + brakeClosed, + brakeBoosterSpeed, +}; +using TrackElementSetFlags = FlagHolder; + +enum class TrackSelectionFlag : uint8_t +{ + arrow, + track, + entranceOrExit, + recheck, + trackPlaceActionQueued, +}; +using TrackSelectionFlags = FlagHolder; + namespace OpenRCT2 { enum class RideConstructionState : uint8_t @@ -66,7 +89,7 @@ extern CoordsXYZ _currentTrackBegin; extern uint8_t _currentTrackPieceDirection; extern OpenRCT2::TrackElemType _currentTrackPieceType; -extern uint8_t _currentTrackSelectionFlags; +extern TrackSelectionFlags _currentTrackSelectionFlags; extern uint32_t _rideConstructionNextArrowPulse; extern TrackPitch _currentTrackPitchEnd; extern TrackRoll _currentTrackRollEnd; @@ -114,3 +137,7 @@ TrackDrawerDescriptor getCurrentTrackDrawerDescriptor(const RideTypeDescriptor& TrackDrawerEntry getCurrentTrackDrawerEntry(const RideTypeDescriptor& rtd); OpenRCT2::TrackElemType GetTrackTypeFromCurve( TrackCurve curve, bool startsDiagonal, TrackPitch startSlope, TrackPitch endSlope, TrackRoll startBank, TrackRoll endBank); + +std::optional GetTrackElementOriginAndApplyChanges( + const CoordsXYZD& location, OpenRCT2::TrackElemType type, uint16_t extra_params, TileElement** output_element, + TrackElementSetFlags flags); diff --git a/src/openrct2/ride/RideData.cpp b/src/openrct2/ride/RideData.cpp index ebe08fc9f1..08ae7a49b1 100644 --- a/src/openrct2/ride/RideData.cpp +++ b/src/openrct2/ride/RideData.cpp @@ -375,19 +375,19 @@ ResearchCategory RideTypeDescriptor::GetResearchCategory() const { switch (Category) { - case RIDE_CATEGORY_TRANSPORT: + case RideCategory::transport: return ResearchCategory::Transport; - case RIDE_CATEGORY_GENTLE: + case RideCategory::gentle: return ResearchCategory::Gentle; - case RIDE_CATEGORY_ROLLERCOASTER: + case RideCategory::rollerCoaster: return ResearchCategory::Rollercoaster; - case RIDE_CATEGORY_THRILL: + case RideCategory::thrill: return ResearchCategory::Thrill; - case RIDE_CATEGORY_WATER: + case RideCategory::water: return ResearchCategory::Water; - case RIDE_CATEGORY_SHOP: + case RideCategory::shop: return ResearchCategory::Shop; - case RIDE_CATEGORY_NONE: + case RideCategory::none: break; } LOG_ERROR("Cannot get Research Category of invalid RideCategory"); @@ -411,7 +411,7 @@ void UpdateEnabledRideGroups(TrackDrawerDescriptor trackDrawerDescriptor) { trackDrawerDescriptor.Regular.GetAvailableTrackGroups(_enabledRideGroups); - if (!GetGameState().Cheats.enableAllDrawableTrackPieces) + if (!getGameState().cheats.enableAllDrawableTrackPieces) { _enabledRideGroups &= ~_disabledRideGroups; } @@ -425,14 +425,14 @@ void UpdateDisabledRideGroups(const RideTrackGroups& res) void TrackDrawerEntry::GetAvailableTrackGroups(RideTrackGroups& res) const { res = enabledTrackGroups; - if (GetGameState().Cheats.enableAllDrawableTrackPieces) + if (getGameState().cheats.enableAllDrawableTrackPieces) res |= extraTrackGroups; } bool TrackDrawerEntry::SupportsTrackGroup(const TrackGroup trackGroup) const { return enabledTrackGroups.get(EnumValue(trackGroup)) - || (GetGameState().Cheats.enableAllDrawableTrackPieces && extraTrackGroups.get(EnumValue(trackGroup))); + || (getGameState().cheats.enableAllDrawableTrackPieces && extraTrackGroups.get(EnumValue(trackGroup))); } bool TrackDrawerDescriptor::HasCoveredPieces() const diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index 121c02f79c..18261f6e7a 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -464,7 +464,7 @@ constexpr uint64_t kRtdFlagsCommonCoasterNonAlt = EnumsToFlags( struct RideTypeDescriptor { - uint8_t Category{}; + RideCategory Category{}; /** rct2: 0x0097CC68 */ OpenRCT2::TrackElemType StartTrackPiece{}; TrackDrawerDescriptor TrackPaintFunctions{}; @@ -514,7 +514,7 @@ struct RideTypeDescriptor TrackDesignCreateMode DesignCreateMode = TrackDesignCreateMode::Default; RideMusicUpdateFunction MusicUpdateFunction = DefaultMusicUpdate; - RideClassification Classification = RideClassification::Ride; + RideClassification Classification = RideClassification::ride; PeepUpdateRideLeaveEntranceFunc UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault; SpecialElementRatingAdjustmentFunc SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_Default; @@ -586,32 +586,32 @@ constexpr const RideComponentName& GetRideComponentName(const RideComponentType } constexpr uint64_t kAllRideModesAvailable = EnumsToFlags( - RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle, - RideMode::PoweredLaunchPasstrough, RideMode::Shuttle, RideMode::Normal, RideMode::BoatHire, RideMode::UpwardLaunch, - RideMode::RotatingLift, RideMode::StationToStation, RideMode::SingleRidePerAdmission, RideMode::UnlimitedRidesPerAdmission, - RideMode::Maze, RideMode::Race, RideMode::Dodgems, RideMode::Swing, RideMode::ShopStall, RideMode::Rotation, - RideMode::ForwardRotation, RideMode::BackwardRotation, RideMode::FilmAvengingAviators, RideMode::MouseTails3DFilm, - RideMode::SpaceRings, RideMode::Beginners, RideMode::LimPoweredLaunch, RideMode::FilmThrillRiders, - RideMode::StormChasers3DFilm, RideMode::SpaceRaiders3DFilm, RideMode::Intense, RideMode::Berserk, RideMode::HauntedHouse, - RideMode::Circus, RideMode::DownwardLaunch, RideMode::CrookedHouse, RideMode::FreefallDrop, RideMode::PoweredLaunch, - RideMode::PoweredLaunchBlockSectioned); + RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::reverseInclineLaunchedShuttle, + RideMode::poweredLaunchPasstrough, RideMode::shuttle, RideMode::normal, RideMode::boatHire, RideMode::upwardLaunch, + RideMode::rotatingLift, RideMode::stationToStation, RideMode::singleRidePerAdmission, RideMode::unlimitedRidesPerAdmission, + RideMode::maze, RideMode::race, RideMode::dodgems, RideMode::swing, RideMode::shopStall, RideMode::rotation, + RideMode::forwardRotation, RideMode::backwardRotation, RideMode::filmAvengingAviators, RideMode::mouseTails3DFilm, + RideMode::spaceRings, RideMode::beginners, RideMode::limPoweredLaunch, RideMode::filmThrillRiders, + RideMode::stormChasers3DFilm, RideMode::spaceRaiders3DFilm, RideMode::intense, RideMode::berserk, RideMode::hauntedHouse, + RideMode::circus, RideMode::downwardLaunch, RideMode::crookedHouse, RideMode::freefallDrop, RideMode::poweredLaunch, + RideMode::poweredLaunchBlockSectioned); extern const CarEntry kCableLiftVehicle; extern const uint16_t kRideFilmLength[3]; -extern const StringId kRideModeNames[EnumValue(RideMode::Count)]; +extern const StringId kRideModeNames[EnumValue(RideMode::count)]; // clang-format off constexpr RideTypeDescriptor kDummyRTD = { - .Category = RIDE_CATEGORY_NONE, + .Category = RideCategory::none, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = {}, .InvertedTrackPaintFunctions = {}, .Flags = 0, - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = {}, .TrackSpeedSettings = {}, .BoosterSettings = {}, @@ -649,7 +649,7 @@ constexpr RideTypeDescriptor kDummyRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault, }; // clang-format on diff --git a/src/openrct2/ride/RideEntry.h b/src/openrct2/ride/RideEntry.h index 3a26a41c0a..cf43d5b401 100644 --- a/src/openrct2/ride/RideEntry.h +++ b/src/openrct2/ride/RideEntry.h @@ -19,8 +19,7 @@ #include // Set to 255 on all tracked ride entries -static uint8_t constexpr NoFlatRideCars = 0xFF; -static ride_type_t constexpr kRideTypeNull = 0xFF; +static uint8_t constexpr kNoFlatRideCars = 0xFF; struct RideNaming { diff --git a/src/openrct2/ride/RideManager.cpp b/src/openrct2/ride/RideManager.cpp index d843e278f7..44fc958b89 100644 --- a/src/openrct2/ride/RideManager.cpp +++ b/src/openrct2/ride/RideManager.cpp @@ -14,7 +14,7 @@ namespace OpenRCT2 { RideManager::RideManager() - : _gameState(GetGameState()) {}; + : _gameState(getGameState()) {}; RideManager::RideManager(GameState_t& gameState) : _gameState(gameState) {}; @@ -22,9 +22,9 @@ namespace OpenRCT2 size_t RideManager::size() const { size_t count = 0; - for (size_t i = 0; i < _gameState.RidesEndOfUsedRange; i++) + for (size_t i = 0; i < _gameState.ridesEndOfUsedRange; i++) { - if (!_gameState.Rides[i].id.IsNull()) + if (!_gameState.rides[i].id.IsNull()) { count++; } @@ -34,17 +34,17 @@ namespace OpenRCT2 RideManager::Iterator RideManager::begin() { - return RideManager::Iterator(*this, 0u, _gameState.RidesEndOfUsedRange); + return RideManager::Iterator(*this, 0u, _gameState.ridesEndOfUsedRange); } RideManager::Iterator RideManager::end() { - return RideManager::Iterator(*this, _gameState.RidesEndOfUsedRange, _gameState.RidesEndOfUsedRange); + return RideManager::Iterator(*this, _gameState.ridesEndOfUsedRange, _gameState.ridesEndOfUsedRange); } RideManager::Iterator RideManager::get(RideId rideId) { - return RideManager::Iterator(*this, rideId.ToUnderlying(), _gameState.RidesEndOfUsedRange); + return RideManager::Iterator(*this, rideId.ToUnderlying(), _gameState.ridesEndOfUsedRange); } RideManager GetRideManager() diff --git a/src/openrct2/ride/RideRatings.cpp b/src/openrct2/ride/RideRatings.cpp index 5addede1f8..9379c83958 100644 --- a/src/openrct2/ride/RideRatings.cpp +++ b/src/openrct2/ride/RideRatings.cpp @@ -160,7 +160,7 @@ void RideRatingResetUpdateStates() RideRatingUpdateState nullState{}; nullState.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; - auto& updateStates = GetGameState().RideRatingUpdateStates; + auto& updateStates = getGameState().rideRatingUpdateStates; std::fill(updateStates.begin(), updateStates.end(), nullState); } @@ -173,7 +173,7 @@ void RideRatingResetUpdateStates() void RideRatingsUpdateRide(const Ride& ride) { RideRatingUpdateState state; - if (ride.status != RideStatus::Closed) + if (ride.status != RideStatus::closed) { state.CurrentRide = ride.id; state.State = RIDE_RATINGS_STATE_INITIALISE; @@ -192,10 +192,10 @@ void RideRatingsUpdateAll() { PROFILED_FUNCTION(); - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) return; - for (auto& updateState : GetGameState().RideRatingUpdateStates) + for (auto& updateState : getGameState().rideRatingUpdateStates) { for (size_t i = 0; i < MaxRideRatingUpdateSubSteps; ++i) { @@ -235,7 +235,7 @@ static void ride_ratings_update_state(RideRatingUpdateState& state) static bool RideRatingIsUpdatingRide(RideId id) { - const auto& updateStates = GetGameState().RideRatingUpdateStates; + const auto& updateStates = getGameState().rideRatingUpdateStates; return std::any_of(updateStates.begin(), updateStates.end(), [id](auto& state) { return state.CurrentRide == id && state.State != RIDE_RATINGS_STATE_FIND_NEXT_RIDE; }); @@ -244,7 +244,7 @@ static bool RideRatingIsUpdatingRide(RideId id) static bool ShouldSkipRatingCalculation(const Ride& ride) { // Skip rides that are closed. - if (ride.status == RideStatus::Closed) + if (ride.status == RideStatus::closed) { return true; } @@ -256,7 +256,7 @@ static bool ShouldSkipRatingCalculation(const Ride& ride) } // Skip rides that have a fixed rating. - if (ride.lifecycle_flags & RIDE_LIFECYCLE_FIXED_RATINGS) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_FIXED_RATINGS) { return true; } @@ -348,7 +348,7 @@ static void ride_ratings_update_state_2(RideRatingUpdateState& state) { const RideId rideIndex = state.CurrentRide; auto ride = GetRide(rideIndex); - if (ride == nullptr || ride->status == RideStatus::Closed || ride->type >= RIDE_TYPE_COUNT) + if (ride == nullptr || ride->status == RideStatus::closed || ride->type >= RIDE_TYPE_COUNT) { state.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; return; @@ -374,7 +374,7 @@ static void ride_ratings_update_state_2(RideRatingUpdateState& state) if (tileElement->AsTrack()->GetRideIndex() != ride->id) { // Only check that the track belongs to the same ride if ride does not have buildable track - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) continue; } @@ -385,7 +385,7 @@ static void ride_ratings_update_state_2(RideRatingUpdateState& state) { auto entranceIndex = tileElement->AsTrack()->GetStationIndex(); state.StationFlags &= ~RIDE_RATING_STATION_FLAG_NO_ENTRANCE; - if (ride->GetStation(entranceIndex).Entrance.IsNull()) + if (ride->getStation(entranceIndex).Entrance.IsNull()) { state.StationFlags |= RIDE_RATING_STATION_FLAG_NO_ENTRANCE; } @@ -424,7 +424,7 @@ static void ride_ratings_update_state_2(RideRatingUpdateState& state) static void ride_ratings_update_state_3(RideRatingUpdateState& state) { auto ride = GetRide(state.CurrentRide); - if (ride == nullptr || ride->status == RideStatus::Closed) + if (ride == nullptr || ride->status == RideStatus::closed) { state.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; return; @@ -456,7 +456,7 @@ static void ride_ratings_update_state_4(RideRatingUpdateState& state) static void ride_ratings_update_state_5(RideRatingUpdateState& state) { auto ride = GetRide(state.CurrentRide); - if (ride == nullptr || ride->status == RideStatus::Closed) + if (ride == nullptr || ride->status == RideStatus::closed) { state.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; return; @@ -482,7 +482,7 @@ static void ride_ratings_update_state_5(RideRatingUpdateState& state) if (tileElement->AsTrack()->GetRideIndex() != ride->id) { // Only check that the track belongs to the same ride if ride does not have buildable track - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) continue; } @@ -521,20 +521,20 @@ static void ride_ratings_update_state_5(RideRatingUpdateState& state) static void ride_ratings_begin_proximity_loop(RideRatingUpdateState& state) { auto ride = GetRide(state.CurrentRide); - if (ride == nullptr || ride->status == RideStatus::Closed) + if (ride == nullptr || ride->status == RideStatus::closed) { state.State = RIDE_RATINGS_STATE_FIND_NEXT_RIDE; return; } - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) { state.State = RIDE_RATINGS_STATE_CALCULATE; return; } - for (auto& station : ride->GetStations()) + for (auto& station : ride->getStations()) { if (!station.Start.IsNull()) { @@ -875,30 +875,30 @@ static void ride_ratings_score_close_proximity(RideRatingUpdateState& state, Til static void RideRatingsCalculate(RideRatingUpdateState& state, Ride& ride) { - const auto& rrd = ride.GetRideTypeDescriptor().RatingsData; + const auto& rrd = ride.getRideTypeDescriptor().RatingsData; switch (rrd.Type) { case RatingsCalculationType::Normal: - if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycleFlags & RIDE_LIFECYCLE_TESTED)) return; break; case RatingsCalculationType::FlatRide: - ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - ride.lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; + ride.lifecycleFlags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycleFlags |= RIDE_LIFECYCLE_NO_RAW_STATS; break; case RatingsCalculationType::Stall: - ride.upkeep_cost = RideComputeUpkeep(state, ride); - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeepCost = RideComputeUpkeep(state, ride); + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME; // Exit ratings return; } - ride.unreliability_factor = rrd.Unreliability; + ride.unreliabilityFactor = rrd.Unreliability; SetUnreliabilityFactor(ride); const auto shelteredEighths = GetNumOfShelteredEighths(ride); - ride.sheltered_eighths = (rrd.RideShelter == -1) ? shelteredEighths.TotalShelteredEighths : rrd.RideShelter; + ride.shelteredEighths = (rrd.RideShelter == -1) ? shelteredEighths.TotalShelteredEighths : rrd.RideShelter; RatingTuple ratings = rrd.BaseRatings; // Apply Modifiers @@ -1051,8 +1051,8 @@ static void RideRatingsCalculate(RideRatingUpdateState& state, Ride& ride) RideRatingsApplyAdjustments(ride, ratings); ride.ratings = ratings; - ride.upkeep_cost = RideComputeUpkeep(state, ride); - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_INCOME; + ride.upkeepCost = RideComputeUpkeep(state, ride); + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_INCOME; #ifdef ORIGINAL_RATINGS if (!ride.ratings.isNull()) @@ -1066,10 +1066,10 @@ static void RideRatingsCalculate(RideRatingUpdateState& state, Ride& ride) #ifdef ENABLE_SCRIPTING // Only call the 'ride.ratings.calculate' API hook if testing of the ride is complete - if (ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_TESTED) { auto& hookEngine = GetContext()->GetScriptEngine().GetHookEngine(); - if (hookEngine.HasSubscriptions(HOOK_TYPE::RIDE_RATINGS_CALCULATE)) + if (hookEngine.HasSubscriptions(HookType::rideRatingsCalculate)) { auto ctx = GetContext()->GetScriptEngine().GetContext(); auto originalRatings = ride.ratings; @@ -1083,7 +1083,7 @@ static void RideRatingsCalculate(RideRatingUpdateState& state, Ride& ride) // Call the subscriptions auto e = obj.Take(); - hookEngine.Call(HOOK_TYPE::RIDE_RATINGS_CALCULATE, e, true); + hookEngine.Call(HookType::rideRatingsCalculate, e, true); auto scriptExcitement = AsOrDefault(e["excitement"], static_cast(originalRatings.excitement)); auto scriptIntensity = AsOrDefault(e["intensity"], static_cast(originalRatings.intensity)); @@ -1137,15 +1137,15 @@ static void RideRatingsCalculateValue(Ride& ride) } // Start with the base ratings, multiplied by the ride type specific weights for excitement, intensity and nausea. - const auto& ratingsMultipliers = ride.GetRideTypeDescriptor().RatingsMultipliers; + const auto& ratingsMultipliers = ride.getRideTypeDescriptor().RatingsMultipliers; money64 value = (((ride.ratings.excitement * ratingsMultipliers.excitement) * 32) >> 15) + (((ride.ratings.intensity * ratingsMultipliers.intensity) * 32) >> 15) + (((ride.ratings.nausea * ratingsMultipliers.nausea) * 32) >> 15); int32_t monthsOld = 0; - if (!GetGameState().Cheats.disableRideValueAging) + if (!getGameState().cheats.disableRideValueAging) { - monthsOld = ride.GetAge(); + monthsOld = ride.getAge(); } const Row* ageTable = ageTableNew; @@ -1182,7 +1182,7 @@ static void RideRatingsCalculateValue(Ride& ride) const auto& rideManager = GetRideManager(); auto rideType = ride.type; auto otherRidesOfSameType = std::count_if(rideManager.begin(), rideManager.end(), [rideType](const Ride& r) { - return r.status == RideStatus::Open && r.type == rideType; + return r.status == RideStatus::open && r.type == rideType; }); if (otherRidesOfSameType > 1) value -= value / 4; @@ -1199,21 +1199,21 @@ static void RideRatingsCalculateValue(Ride& ride) static money64 RideComputeUpkeep(RideRatingUpdateState& state, const Ride& ride) { // data stored at 0x0057E3A8, incrementing 18 bytes at a time - auto upkeep = ride.GetRideTypeDescriptor().UpkeepCosts.BaseCost; + auto upkeep = ride.getRideTypeDescriptor().UpkeepCosts.BaseCost; - auto trackCost = ride.GetRideTypeDescriptor().UpkeepCosts.CostPerTrackPiece; + auto trackCost = ride.getRideTypeDescriptor().UpkeepCosts.CostPerTrackPiece; upkeep += trackCost * ride.getNumPoweredLifts(); - uint32_t totalLength = ToHumanReadableRideLength(ride.GetTotalLength()); + uint32_t totalLength = ToHumanReadableRideLength(ride.getTotalLength()); // The data originally here was 20's and 0's. The 20's all represented // rides that had tracks. The 0's were fixed rides like crooked house or // dodgems. // Data source is 0x0097E3AC - totalLength *= ride.GetRideTypeDescriptor().UpkeepCosts.TrackLengthMultiplier; + totalLength *= ride.getRideTypeDescriptor().UpkeepCosts.TrackLengthMultiplier; upkeep += static_cast(totalLength >> 10); - if (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) { // The original code read from a table starting at 0x0097E3AE and // incrementing by 0x12 bytes between values. However, all of these @@ -1232,26 +1232,26 @@ static money64 RideComputeUpkeep(RideRatingUpdateState& state, const Ride& ride) // various variables set on the ride itself. // https://gist.github.com/kevinburke/e19b803cd2769d96c540 - upkeep += ride.GetRideTypeDescriptor().UpkeepCosts.CostPerTrain * ride.NumTrains; - upkeep += ride.GetRideTypeDescriptor().UpkeepCosts.CostPerCar * ride.num_cars_per_train; + upkeep += ride.getRideTypeDescriptor().UpkeepCosts.CostPerTrain * ride.numTrains; + upkeep += ride.getRideTypeDescriptor().UpkeepCosts.CostPerCar * ride.numCarsPerTrain; // slight upkeep boosts for some rides - 5 for mini railway, 10 for log // flume/rapids, 10 for roller coaster, 28 for giga coaster - upkeep += ride.GetRideTypeDescriptor().UpkeepCosts.CostPerStation * ride.num_stations; + upkeep += ride.getRideTypeDescriptor().UpkeepCosts.CostPerStation * ride.numStations; - if (ride.mode == RideMode::ReverseInclineLaunchedShuttle) + if (ride.mode == RideMode::reverseInclineLaunchedShuttle) { upkeep += 30; } - else if (ride.mode == RideMode::PoweredLaunchPasstrough) + else if (ride.mode == RideMode::poweredLaunchPasstrough) { upkeep += 160; } - else if (ride.mode == RideMode::LimPoweredLaunch) + else if (ride.mode == RideMode::limPoweredLaunch) { upkeep += 320; } - else if (ride.mode == RideMode::PoweredLaunch || ride.mode == RideMode::PoweredLaunchBlockSectioned) + else if (ride.mode == RideMode::poweredLaunch || ride.mode == RideMode::poweredLaunchBlockSectioned) { upkeep += 220; } @@ -1289,7 +1289,7 @@ static void RideRatingsApplyAdjustments(const Ride& ride, RatingTuple& ratings) // Apply total air time #ifdef ORIGINAL_RATINGS - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasAirTime)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasAirTime)) { uint16_t totalAirTime = ride.totalAirTime; if (rideEntry->flags & RIDE_ENTRY_FLAG_LIMIT_AIRTIME_BONUS) @@ -1308,7 +1308,7 @@ static void RideRatingsApplyAdjustments(const Ride& ride, RatingTuple& ratings) } } #else - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasAirTime)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasAirTime)) { int32_t excitementModifier; if (rideEntry->flags & RIDE_ENTRY_FLAG_LIMIT_AIRTIME_BONUS) @@ -1352,21 +1352,21 @@ static void RideRatingsApplyIntensityPenalty(RatingTuple& ratings) static void SetUnreliabilityFactor(Ride& ride) { // Special unreliability for a few ride types - if (ride.type == RIDE_TYPE_COMPACT_INVERTED_COASTER && ride.mode == RideMode::ReverseInclineLaunchedShuttle) + if (ride.type == RIDE_TYPE_COMPACT_INVERTED_COASTER && ride.mode == RideMode::reverseInclineLaunchedShuttle) { - ride.unreliability_factor += 10; + ride.unreliabilityFactor += 10; } - else if (ride.type == RIDE_TYPE_LOOPING_ROLLER_COASTER && ride.IsPoweredLaunched()) + else if (ride.type == RIDE_TYPE_LOOPING_ROLLER_COASTER && ride.isPoweredLaunched()) { - ride.unreliability_factor += 5; + ride.unreliabilityFactor += 5; } else if (ride.type == RIDE_TYPE_CHAIRLIFT) { - ride.unreliability_factor += (ride.speed * 2); + ride.unreliabilityFactor += (ride.speed * 2); } // The bigger the difference in lift speed and minimum the higher the unreliability - uint8_t minLiftSpeed = ride.GetRideTypeDescriptor().LiftData.minimum_speed; - ride.unreliability_factor += (ride.lift_hill_speed - minLiftSpeed) * 2; + uint8_t minLiftSpeed = ride.getRideTypeDescriptor().LiftData.minimum_speed; + ride.unreliabilityFactor += (ride.liftHillSpeed - minLiftSpeed) * 2; } static uint32_t get_proximity_score_helper_1(uint16_t x, uint16_t max, uint32_t multiplier) @@ -1431,8 +1431,8 @@ static uint32_t ride_ratings_get_proximity_score(RideRatingUpdateState& state) */ static ShelteredEights GetNumOfShelteredEighths(const Ride& ride) { - int32_t totalLength = ride.GetTotalLength(); - int32_t shelteredLength = ride.sheltered_length; + int32_t totalLength = ride.getTotalLength(); + int32_t shelteredLength = ride.shelteredLength; int32_t lengthEighth = totalLength / 8; int32_t lengthCounter = lengthEighth; uint8_t numShelteredEighths = 0; @@ -1545,18 +1545,18 @@ static RatingTuple get_inversions_ratings(uint16_t inversions) void SpecialTrackElementRatingsAjustment_Default(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea) { - if (ride.HasWaterSplash()) + if (ride.hasWaterSplash()) { excitement += 50; intensity += 30; nausea += 20; } - if (ride.HasWaterfall()) + if (ride.hasWaterfall()) { excitement += 55; intensity += 30; } - if (ride.HasWhirlpool()) + if (ride.hasWhirlpool()) { excitement += 35; intensity += 20; @@ -1566,7 +1566,7 @@ void SpecialTrackElementRatingsAjustment_Default(const Ride& ride, int32_t& exci void SpecialTrackElementRatingsAjustment_GhostTrain(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea) { - if (ride.HasSpinningTunnel()) + if (ride.hasSpinningTunnel()) { excitement += 40; intensity += 25; @@ -1576,7 +1576,7 @@ void SpecialTrackElementRatingsAjustment_GhostTrain(const Ride& ride, int32_t& e void SpecialTrackElementRatingsAjustment_LogFlume(const Ride& ride, int32_t& excitement, int32_t& intensity, int32_t& nausea) { - if (ride.HasLogReverser()) + if (ride.hasLogReverser()) { excitement += 48; intensity += 55; @@ -1587,7 +1587,7 @@ void SpecialTrackElementRatingsAjustment_LogFlume(const Ride& ride, int32_t& exc static RatingTuple GetSpecialTrackElementsRating(uint8_t type, const Ride& ride) { int32_t excitement = 0, intensity = 0, nausea = 0; - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); rtd.SpecialElementRatingAdjustment(ride, excitement, intensity, nausea); uint8_t helixSections = RideGetHelixSections(ride); @@ -1634,7 +1634,7 @@ static RatingTuple ride_ratings_get_turns_ratings(const Ride& ride) intensity += slopedTurnsRating.intensity; nausea += slopedTurnsRating.nausea; - auto inversions = ride.GetRideTypeDescriptor().specialType == RtdSpecialType::miniGolf ? ride.holes : ride.inversions; + auto inversions = ride.getRideTypeDescriptor().specialType == RtdSpecialType::miniGolf ? ride.holes : ride.inversions; RatingTuple inversionsRating = get_inversions_ratings(inversions); excitement += inversionsRating.excitement; intensity += inversionsRating.intensity; @@ -1651,7 +1651,7 @@ static RatingTuple ride_ratings_get_turns_ratings(const Ride& ride) */ static RatingTuple ride_ratings_get_sheltered_ratings(const Ride& ride) { - int32_t shelteredLengthShifted = (ride.sheltered_length) >> 16; + int32_t shelteredLengthShifted = (ride.shelteredLength) >> 16; uint32_t shelteredLengthUpTo1000 = std::min(shelteredLengthShifted, 1000); uint32_t shelteredLengthUpTo2000 = std::min(shelteredLengthShifted, 2000); @@ -1660,22 +1660,22 @@ static RatingTuple ride_ratings_get_sheltered_ratings(const Ride& ride) int32_t intensity = (shelteredLengthUpTo2000 * 0x2666) >> 16; int32_t nausea = (shelteredLengthUpTo1000 * 0x4000) >> 16; - /*eax = (ride.var_11C * 30340) >> 16;*/ + /*eax = (ride.var11C * 30340) >> 16;*/ /*nausea += eax;*/ - if (ride.num_sheltered_sections & ShelteredSectionsBits::kBankingWhileSheltered) + if (ride.numShelteredSections & ShelteredSectionsBits::kBankingWhileSheltered) { excitement += 20; nausea += 15; } - if (ride.num_sheltered_sections & ShelteredSectionsBits::kRotatingWhileSheltered) + if (ride.numShelteredSections & ShelteredSectionsBits::kRotatingWhileSheltered) { excitement += 20; nausea += 15; } - uint8_t lowerVal = ride.GetNumShelteredSections(); + uint8_t lowerVal = ride.getNumShelteredSections(); lowerVal = std::min(lowerVal, 11); excitement += (lowerVal * 774516) >> 16; @@ -1697,29 +1697,29 @@ static RatingTuple ride_ratings_get_gforce_ratings(const Ride& ride) }; // Apply maximum positive G force factor - result.excitement += (ride.max_positive_vertical_g * 5242) >> 16; - result.intensity += (ride.max_positive_vertical_g * 52428) >> 16; - result.nausea += (ride.max_positive_vertical_g * 17039) >> 16; + result.excitement += (ride.maxPositiveVerticalG * 5242) >> 16; + result.intensity += (ride.maxPositiveVerticalG * 52428) >> 16; + result.nausea += (ride.maxPositiveVerticalG * 17039) >> 16; // Apply maximum negative G force factor - fixed16_2dp gforce = ride.max_negative_vertical_g; + fixed16_2dp gforce = ride.maxNegativeVerticalG; result.excitement += (std::clamp(gforce, -MakeRideRating(2, 50), MakeRideRating(0, 00)) * -15728) >> 16; result.intensity += ((gforce - MakeRideRating(1, 00)) * -52428) >> 16; result.nausea += ((gforce - MakeRideRating(1, 00)) * -14563) >> 16; // Apply lateral G force factor - result.excitement += (std::min(MakeRideRating(1, 50), ride.max_lateral_g) * 26214) >> 16; - result.intensity += ride.max_lateral_g; - result.nausea += (ride.max_lateral_g * 21845) >> 16; + result.excitement += (std::min(MakeRideRating(1, 50), ride.maxLateralG) * 26214) >> 16; + result.intensity += ride.maxLateralG; + result.nausea += (ride.maxLateralG * 21845) >> 16; // Very high lateral G force penalty #ifdef ORIGINAL_RATINGS - if (ride.max_lateral_g > MakeFixed16_2dp(2, 80)) + if (ride.maxLateralG > MakeFixed16_2dp(2, 80)) { result.intensity += MakeRideRating(3, 75); result.nausea += MakeRideRating(2, 00); } - if (ride.max_lateral_g > MakeFixed16_2dp(3, 10)) + if (ride.maxLateralG > MakeFixed16_2dp(3, 10)) { result.excitement /= 2; result.intensity += MakeRideRating(8, 50); @@ -1750,8 +1750,8 @@ static RatingTuple ride_ratings_get_drop_ratings(const Ride& ride) // Apply highest drop factor RideRatingsAdd( - result, ((ride.highest_drop_height * 2) * 16000) >> 16, ((ride.highest_drop_height * 2) * 32000) >> 16, - ((ride.highest_drop_height * 2) * 10240) >> 16); + result, ((ride.highestDropHeight * 2) * 16000) >> 16, ((ride.highestDropHeight * 2) * 32000) >> 16, + ((ride.highestDropHeight * 2) * 10240) >> 16); return result; } @@ -1770,20 +1770,20 @@ static int32_t ride_ratings_get_scenery_score(const Ride& ride) return 0; } - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) { - location = ride.GetStation().Entrance.ToCoordsXY(); + location = ride.getStation().Entrance.ToCoordsXY(); } else { - location = ride.GetStation(stationIndex).Start; + location = ride.getStation(stationIndex).Start; } int32_t z = TileElementHeight(location); // Check if station is underground, returns a fixed mediocre score since you can't have scenery underground - if (z > ride.GetStation(stationIndex).GetBaseZ()) + if (z > ride.getStation(stationIndex).GetBaseZ()) { return 40; } @@ -1791,10 +1791,10 @@ static int32_t ride_ratings_get_scenery_score(const Ride& ride) // Count surrounding scenery items int32_t numSceneryItems = 0; auto tileLocation = TileCoordsXY(location); - auto& gameState = GetGameState(); - for (int32_t yy = std::max(tileLocation.y - 5, 0); yy <= std::min(tileLocation.y + 5, gameState.MapSize.y - 1); yy++) + auto& gameState = getGameState(); + for (int32_t yy = std::max(tileLocation.y - 5, 0); yy <= std::min(tileLocation.y + 5, gameState.mapSize.y - 1); yy++) { - for (int32_t xx = std::max(tileLocation.x - 5, 0); xx <= std::min(tileLocation.x + 5, gameState.MapSize.x - 1); xx++) + for (int32_t xx = std::max(tileLocation.x - 5, 0); xx <= std::min(tileLocation.x + 5, gameState.mapSize.x - 1); xx++) { // Count scenery items on this tile TileElement* tileElement = MapGetFirstElementAt(TileCoordsXY{ xx, yy }); @@ -1841,13 +1841,13 @@ static void RideRatingsAdd(RatingTuple& ratings, int32_t excitement, int32_t int static void RideRatingsApplyBonusLength(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { RideRatingsAdd( - ratings, (std::min(ToHumanReadableRideLength(ride.GetTotalLength()), modifier.threshold) * modifier.excitement) >> 16, + ratings, (std::min(ToHumanReadableRideLength(ride.getTotalLength()), modifier.threshold) * modifier.excitement) >> 16, 0, 0); } static void RideRatingsApplyBonusSynchronisation(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if ((ride.depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) && RideHasAdjacentStation(ride)) + if ((ride.departFlags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) && RideHasAdjacentStation(ride)) { RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); } @@ -1855,12 +1855,12 @@ static void RideRatingsApplyBonusSynchronisation(RatingTuple& ratings, const Rid static void RideRatingsApplyBonusTrainLength(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - RideRatingsAdd(ratings, ((ride.num_cars_per_train - 1) * modifier.excitement) >> 16, 0, 0); + RideRatingsAdd(ratings, ((ride.numCarsPerTrain - 1) * modifier.excitement) >> 16, 0, 0); } static void RideRatingsApplyBonusMaxSpeed(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - int32_t maxSpeedMod = ride.max_speed >> 16; + int32_t maxSpeedMod = ride.maxSpeed >> 16; RideRatingsAdd( ratings, (maxSpeedMod * modifier.excitement) >> 16, (maxSpeedMod * modifier.intensity) >> 16, (maxSpeedMod * modifier.nausea) >> 16); @@ -1868,13 +1868,13 @@ static void RideRatingsApplyBonusMaxSpeed(RatingTuple& ratings, const Ride& ride static void RideRatingsApplyBonusAverageSpeed(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - int32_t avgSpeedMod = ride.average_speed >> 16; + int32_t avgSpeedMod = ride.averageSpeed >> 16; RideRatingsAdd(ratings, (avgSpeedMod * modifier.excitement) >> 16, (avgSpeedMod * modifier.intensity) >> 16, 0); } static void RideRatingsApplyBonusDuration(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - RideRatingsAdd(ratings, (std::min(ride.GetTotalTime(), modifier.threshold) * modifier.excitement) >> 16, 0, 0); + RideRatingsAdd(ratings, (std::min(ride.getTotalTime(), modifier.threshold) * modifier.excitement) >> 16, 0, 0); } static void RideRatingsApplyBonusGForces(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) @@ -1917,14 +1917,14 @@ static void RideRatingsApplyBonusRotations(RatingTuple& ratings, const Ride& rid static void RideRatingsApplyBonusOperationOption(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - int32_t intensity = (modifier.intensity >= 0) ? (ride.operation_option * modifier.intensity) - : (ride.operation_option / std::abs(modifier.intensity)); - RideRatingsAdd(ratings, ride.operation_option * modifier.excitement, intensity, ride.operation_option * modifier.nausea); + int32_t intensity = (modifier.intensity >= 0) ? (ride.operationOption * modifier.intensity) + : (ride.operationOption / std::abs(modifier.intensity)); + RideRatingsAdd(ratings, ride.operationOption * modifier.excitement, intensity, ride.operationOption * modifier.nausea); } static void RideRatingsApplyBonusReversedTrains(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.HasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)) + if (ride.hasLifecycleFlag(RIDE_LIFECYCLE_REVERSED_TRAINS)) { RideRatingsAdd( ratings, ((ratings.excitement * modifier.excitement) >> 7), (ratings.intensity * modifier.intensity) >> 7, @@ -1934,18 +1934,18 @@ static void RideRatingsApplyBonusReversedTrains(RatingTuple& ratings, const Ride static void RideRatingsApplyBonusGoKartRace(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.mode == RideMode::Race && ride.NumTrains >= modifier.threshold) + if (ride.mode == RideMode::race && ride.numTrains >= modifier.threshold) { RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); - int32_t lapsFactor = (ride.NumLaps - 1) * 30; + int32_t lapsFactor = (ride.numLaps - 1) * 30; RideRatingsAdd(ratings, lapsFactor, lapsFactor / 2, 0); } } static void RideRatingsApplyBonusTowerRide(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - int32_t lengthFactor = ToHumanReadableRideLength(ride.GetTotalLength()); + int32_t lengthFactor = ToHumanReadableRideLength(ride.getTotalLength()); RideRatingsAdd( ratings, (lengthFactor * modifier.excitement) >> 16, (lengthFactor * modifier.intensity) >> 16, (lengthFactor * modifier.nausea) >> 16); @@ -1953,20 +1953,20 @@ static void RideRatingsApplyBonusTowerRide(RatingTuple& ratings, const Ride& rid static void RideRatingsApplyBonusRotoDrop(RatingTuple& ratings, const Ride& ride) { - int32_t lengthFactor = (ToHumanReadableRideLength(ride.GetTotalLength()) * 209715) >> 16; + int32_t lengthFactor = (ToHumanReadableRideLength(ride.getTotalLength()) * 209715) >> 16; RideRatingsAdd(ratings, lengthFactor, lengthFactor * 2, lengthFactor * 2); } static void RideRatingsApplyBonusMazeSize(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - int32_t size = std::min(ride.maze_tiles, modifier.threshold); + int32_t size = std::min(ride.mazeTiles, modifier.threshold); RideRatingsAdd(ratings, size * modifier.excitement, size * modifier.intensity, size * modifier.nausea); } static void RideRatingsApplyBonusBoatHireNoCircuit(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { // Most likely checking if the ride has does not have a circuit - if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycleFlags & RIDE_LIFECYCLE_TESTED)) { RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); } @@ -1974,7 +1974,7 @@ static void RideRatingsApplyBonusBoatHireNoCircuit(RatingTuple& ratings, const R static void RideRatingsApplyBonusSlideUnlimitedRides(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.mode == RideMode::UnlimitedRidesPerAdmission) + if (ride.mode == RideMode::unlimitedRidesPerAdmission) { RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); } @@ -1983,7 +1983,7 @@ static void RideRatingsApplyBonusSlideUnlimitedRides(RatingTuple& ratings, const static void RideRatingsApplyBonusMotionSimulatorMode(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { // Hardcoded until ride mode refactor - if (ride.mode == RideMode::FilmThrillRiders) + if (ride.mode == RideMode::filmThrillRiders) { RideRatingsSet(ratings, MakeRideRating(3, 25), MakeRideRating(4, 10), MakeRideRating(3, 30)); } @@ -1999,13 +1999,13 @@ static void RideRatingsApplyBonus3DCinemaMode(RatingTuple& ratings, const Ride& switch (ride.mode) { default: - case RideMode::MouseTails3DFilm: + case RideMode::mouseTails3DFilm: RideRatingsSet(ratings, MakeRideRating(3, 50), MakeRideRating(2, 40), MakeRideRating(1, 40)); break; - case RideMode::StormChasers3DFilm: + case RideMode::stormChasers3DFilm: RideRatingsSet(ratings, MakeRideRating(4, 00), MakeRideRating(2, 65), MakeRideRating(1, 55)); break; - case RideMode::SpaceRaiders3DFilm: + case RideMode::spaceRaiders3DFilm: RideRatingsSet(ratings, MakeRideRating(4, 20), MakeRideRating(2, 60), MakeRideRating(1, 48)); break; } @@ -2017,13 +2017,13 @@ static void RideRatingsApplyBonusTopSpinMode(RatingTuple& ratings, const Ride& r switch (ride.mode) { default: - case RideMode::Beginners: + case RideMode::beginners: RideRatingsSet(ratings, MakeRideRating(2, 00), MakeRideRating(4, 80), MakeRideRating(5, 74)); break; - case RideMode::Intense: + case RideMode::intense: RideRatingsSet(ratings, MakeRideRating(3, 00), MakeRideRating(5, 75), MakeRideRating(6, 64)); break; - case RideMode::Berserk: + case RideMode::berserk: RideRatingsSet(ratings, MakeRideRating(3, 20), MakeRideRating(6, 80), MakeRideRating(7, 94)); break; } @@ -2047,7 +2047,7 @@ static void RideRatingsApplyBonusNumTrains(RatingTuple& ratings, const Ride& rid { // For some reason the original code ran this twice, before and after the operation option bonus // Has been changed to call once with double value - if (ride.NumTrains >= modifier.threshold) + if (ride.numTrains >= modifier.threshold) { RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); } @@ -2055,7 +2055,7 @@ static void RideRatingsApplyBonusNumTrains(RatingTuple& ratings, const Ride& rid static void RideRatingsApplyBonusDownwardLaunch(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.mode == RideMode::DownwardLaunch) + if (ride.mode == RideMode::downwardLaunch) { RideRatingsAdd(ratings, modifier.excitement, modifier.intensity, modifier.nausea); } @@ -2064,21 +2064,21 @@ static void RideRatingsApplyBonusDownwardLaunch(RatingTuple& ratings, const Ride static void RideRatingsApplyBonusOperationOptionFreefall(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { RideRatingsAdd( - ratings, (ride.operation_option * modifier.excitement) >> 16, (ride.operation_option * modifier.intensity) >> 16, - (ride.operation_option * modifier.nausea) >> 16); + ratings, (ride.operationOption * modifier.excitement) >> 16, (ride.operationOption * modifier.intensity) >> 16, + (ride.operationOption * modifier.nausea) >> 16); } static void RideRatingsApplyBonusLaunchedFreefallSpecial( RatingTuple& ratings, const Ride& ride, RideRatingUpdateState& state, RatingsModifier modifier) { - int32_t excitement = (ToHumanReadableRideLength(ride.GetTotalLength()) * 32768) >> 16; + int32_t excitement = (ToHumanReadableRideLength(ride.getTotalLength()) * 32768) >> 16; RideRatingsAdd(ratings, excitement, 0, 0); #ifdef ORIGINAL_RATINGS RideRatingsApplyBonusOperationOptionFreefall(ratings, ride, modifier); #else // Only apply "launch speed" effects when the setting can be modified - if (ride.mode == RideMode::UpwardLaunch) + if (ride.mode == RideMode::upwardLaunch) { RideRatingsApplyBonusOperationOptionFreefall(ratings, ride, modifier); } @@ -2087,7 +2087,7 @@ static void RideRatingsApplyBonusLaunchedFreefallSpecial( // Fix #3282: When the ride mode is in downward launch mode, the intensity and // nausea were fixed regardless of how high the ride is. The following // calculation is based on roto-drop which is a similar mechanic. - int32_t lengthFactor = (ToHumanReadableRideLength(ride.GetTotalLength()) * 209715) >> 16; + int32_t lengthFactor = (ToHumanReadableRideLength(ride.getTotalLength()) * 209715) >> 16; RideRatingsAdd(ratings, lengthFactor, lengthFactor * 2, lengthFactor * 2); } #endif @@ -2106,7 +2106,7 @@ static void RideRatingsApplyBonusScenery(RatingTuple& ratings, const Ride& ride, static void RideRatingsApplyRequirementLength(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.GetStation().SegmentLength < modifier.threshold) + if (ride.getStation().SegmentLength < modifier.threshold) { ratings.excitement /= modifier.excitement; ratings.intensity /= modifier.intensity; @@ -2116,7 +2116,7 @@ static void RideRatingsApplyRequirementLength(RatingTuple& ratings, const Ride& static void RideRatingsApplyRequirementDropHeight(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.highest_drop_height < modifier.threshold) + if (ride.highestDropHeight < modifier.threshold) { ratings.excitement /= modifier.excitement; ratings.intensity /= modifier.intensity; @@ -2126,7 +2126,7 @@ static void RideRatingsApplyRequirementDropHeight(RatingTuple& ratings, const Ri static void RideRatingsApplyRequirementMaxSpeed(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.max_speed < modifier.threshold) + if (ride.maxSpeed < modifier.threshold) { ratings.excitement /= modifier.excitement; ratings.intensity /= modifier.intensity; @@ -2146,7 +2146,7 @@ static void RideRatingsApplyRequirementNumDrops(RatingTuple& ratings, const Ride static void RideRatingsApplyRequirementNegativeGs(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.max_negative_vertical_g >= modifier.threshold) + if (ride.maxNegativeVerticalG >= modifier.threshold) { ratings.excitement /= modifier.excitement; ratings.intensity /= modifier.intensity; @@ -2156,7 +2156,7 @@ static void RideRatingsApplyRequirementNegativeGs(RatingTuple& ratings, const Ri static void RideRatingsApplyRequirementLateralGs(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.max_lateral_g < modifier.threshold) + if (ride.maxLateralG < modifier.threshold) { ratings.excitement /= modifier.excitement; ratings.intensity /= modifier.intensity; @@ -2208,7 +2208,7 @@ static void RideRatingsApplyRequirementHoles(RatingTuple& ratings, const Ride& r static void RideRatingsApplyRequirementStations(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (ride.num_stations <= modifier.threshold) + if (ride.numStations <= modifier.threshold) { // Excitement is set to 0 in original code - this could be changed for consistency ratings.excitement = 0; @@ -2219,7 +2219,7 @@ static void RideRatingsApplyRequirementStations(RatingTuple& ratings, const Ride static void RideRatingsApplyRequirementSplashdown(RatingTuple& ratings, const Ride& ride, RatingsModifier modifier) { - if (!(ride.special_track_elements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS)) + if (!(ride.specialTrackElements & RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS)) { ratings.excitement /= modifier.excitement; ratings.intensity /= modifier.intensity; @@ -2231,23 +2231,23 @@ static void RideRatingsApplyRequirementSplashdown(RatingTuple& ratings, const Ri static RatingTuple ride_ratings_get_excessive_lateral_g_penalty(const Ride& ride) { RatingTuple result{}; - if (ride.max_lateral_g > MakeFixed16_2dp(2, 80)) + if (ride.maxLateralG > MakeFixed16_2dp(2, 80)) { result.intensity = MakeRideRating(3, 75); result.nausea = MakeRideRating(2, 00); } - if (ride.max_lateral_g > MakeFixed16_2dp(3, 10)) + if (ride.maxLateralG > MakeFixed16_2dp(3, 10)) { // Remove half of the ride_ratings_get_gforce_ratings - result.excitement = (ride.max_positive_vertical_g * 5242) >> 16; + result.excitement = (ride.maxPositiveVerticalG * 5242) >> 16; // Apply maximum negative G force factor - fixed16_2dp gforce = ride.max_negative_vertical_g; + fixed16_2dp gforce = ride.maxNegativeVerticalG; result.excitement += (std::clamp(gforce, -MakeRideRating(2, 50), MakeRideRating(0, 00)) * -15728) >> 16; // Apply lateral G force factor - result.excitement += (std::min(MakeRideRating(1, 50), ride.max_lateral_g) * 26214) >> 16; + result.excitement += (std::min(MakeRideRating(1, 50), ride.maxLateralG) * 26214) >> 16; // Remove half of the ride_ratings_get_gforce_ratings result.excitement /= 2; diff --git a/src/openrct2/ride/RideTypes.h b/src/openrct2/ride/RideTypes.h index 4fd21fe245..c03540692f 100644 --- a/src/openrct2/ride/RideTypes.h +++ b/src/openrct2/ride/RideTypes.h @@ -19,14 +19,15 @@ struct Ride; using ride_type_t = uint16_t; +static ride_type_t constexpr kRideTypeNull = 0xFF; /** * Couples a ride type and subtype together. */ struct RideSelection { - ride_type_t Type; - ObjectEntryIndex EntryIndex; + ride_type_t Type = kRideTypeNull; + ObjectEntryIndex EntryIndex = kObjectEntryIndexNull; bool operator==(const RideSelection& other) const { diff --git a/src/openrct2/ride/ShopItem.cpp b/src/openrct2/ride/ShopItem.cpp index d42097ee1b..ecc2ff5d05 100644 --- a/src/openrct2/ride/ShopItem.cpp +++ b/src/openrct2/ride/ShopItem.cpp @@ -122,7 +122,7 @@ money64 ShopItemGetCommonPrice(Ride* forRide, const ShopItem shopItem) { if (&ride != forRide) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry == nullptr) { continue; @@ -135,7 +135,7 @@ money64 ShopItemGetCommonPrice(Ride* forRide, const ShopItem shopItem) { return ride.price[1]; } - if (GetShopItemDescriptor(shopItem).IsPhoto() && (ride.lifecycle_flags & RIDE_LIFECYCLE_ON_RIDE_PHOTO)) + if (GetShopItemDescriptor(shopItem).IsPhoto() && (ride.lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO)) { return ride.price[1]; } @@ -147,7 +147,7 @@ money64 ShopItemGetCommonPrice(Ride* forRide, const ShopItem shopItem) bool ShopItemHasCommonPrice(const ShopItem shopItem) { - return (GetGameState().SamePriceThroughoutPark & EnumToFlag(shopItem)) != 0; + return (getGameState().samePriceThroughoutPark & EnumToFlag(shopItem)) != 0; } bool ShopItemDescriptor::IsFood() const diff --git a/src/openrct2/ride/Station.cpp b/src/openrct2/ride/Station.cpp index 5a45a47ba1..7faa4de6a1 100644 --- a/src/openrct2/ride/Station.cpp +++ b/src/openrct2/ride/Station.cpp @@ -12,7 +12,6 @@ #include "../Game.h" #include "../GameState.h" #include "../entity/Guest.h" -#include "../scenario/Scenario.h" #include "../world/Location.hpp" #include "../world/tile_element/TileElement.h" #include "../world/tile_element/TrackElement.h" @@ -35,19 +34,19 @@ static void RideInvalidateStationStart(Ride& ride, StationIndex stationIndex, bo */ void RideUpdateStation(Ride& ride, StationIndex stationIndex) { - if (ride.GetStation(stationIndex).Start.IsNull()) + if (ride.getStation(stationIndex).Start.IsNull()) return; switch (ride.mode) { - case RideMode::Race: + case RideMode::race: RideUpdateStationRace(ride, stationIndex); break; - case RideMode::Dodgems: + case RideMode::dodgems: RideUpdateStationDodgems(ride, stationIndex); break; - case RideMode::ContinuousCircuitBlockSectioned: - case RideMode::PoweredLaunchBlockSectioned: + case RideMode::continuousCircuitBlockSectioned: + case RideMode::poweredLaunchBlockSectioned: RideUpdateStationBlockSection(ride, stationIndex); break; default: @@ -63,9 +62,9 @@ void RideUpdateStation(Ride& ride, StationIndex stationIndex) static void RideUpdateStationBlockSection(Ride& ride, StationIndex stationIndex) { TileElement* tileElement = RideGetStationStartTrackElement(ride, stationIndex); - auto& station = ride.GetStation(stationIndex); + auto& station = ride.getStation(stationIndex); - if ((ride.status == RideStatus::Closed && ride.num_riders == 0) + if ((ride.status == RideStatus::closed && ride.numRiders == 0) || (tileElement != nullptr && tileElement->AsTrack()->IsBrakeClosed())) { station.Depart &= ~kStationDepartFlag; @@ -93,21 +92,21 @@ static void RideUpdateStationBlockSection(Ride& ride, StationIndex stationIndex) */ static void RideUpdateStationDodgems(Ride& ride, StationIndex stationIndex) { - auto& station = ride.GetStation(stationIndex); + auto& station = ride.getStation(stationIndex); // Change of station depart flag should really call invalidate_station_start // but since dodgems do not have station lights there is no point. - if (ride.status == RideStatus::Closed || (ride.lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED))) + if (ride.status == RideStatus::closed || (ride.lifecycleFlags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED))) { station.Depart &= ~kStationDepartFlag; return; } - if (ride.lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) { - int32_t dx = ride.time_limit * 32; + int32_t dx = ride.timeLimit * 32; int32_t dh = (dx >> 8) & 0xFF; - for (size_t i = 0; i < ride.NumTrains; i++) + for (size_t i = 0; i < ride.numTrains; i++) { Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) @@ -117,7 +116,7 @@ static void RideUpdateStationDodgems(Ride& ride, StationIndex stationIndex) continue; // End match - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; station.Depart &= ~kStationDepartFlag; return; } @@ -128,7 +127,7 @@ static void RideUpdateStationDodgems(Ride& ride, StationIndex stationIndex) else { // Check if all vehicles are ready to go - for (size_t i = 0; i < ride.NumTrains; i++) + for (size_t i = 0; i < ride.numTrains; i++) { Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) @@ -142,9 +141,9 @@ static void RideUpdateStationDodgems(Ride& ride, StationIndex stationIndex) } // Begin the match - ride.lifecycle_flags |= RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; + ride.lifecycleFlags |= RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; station.Depart |= kStationDepartFlag; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } @@ -154,11 +153,11 @@ static void RideUpdateStationDodgems(Ride& ride, StationIndex stationIndex) */ static void RideUpdateStationNormal(Ride& ride, StationIndex stationIndex) { - auto& station = ride.GetStation(stationIndex); + auto& station = ride.getStation(stationIndex); int32_t time = station.Depart & kStationDepartMask; - const auto currentTicks = GetGameState().CurrentTicks; - if ((ride.lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) - || (ride.status == RideStatus::Closed && ride.num_riders == 0)) + const auto currentTicks = getGameState().currentTicks; + if ((ride.lifecycleFlags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) + || (ride.status == RideStatus::closed && ride.numRiders == 0)) { if (time != 0 && time != 127 && !(currentTicks & 7)) time--; @@ -190,8 +189,8 @@ static void RideUpdateStationNormal(Ride& ride, StationIndex stationIndex) */ static void RideUpdateStationRace(Ride& ride, StationIndex stationIndex) { - auto& station = ride.GetStation(stationIndex); - if (ride.status == RideStatus::Closed || (ride.lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED))) + auto& station = ride.getStation(stationIndex); + if (ride.status == RideStatus::closed || (ride.lifecycleFlags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED))) { if (station.Depart & kStationDepartFlag) { @@ -201,11 +200,11 @@ static void RideUpdateStationRace(Ride& ride, StationIndex stationIndex) return; } - if (ride.lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) { - int32_t numLaps = ride.NumLaps; + int32_t numLaps = ride.numLaps; - for (size_t i = 0; i < ride.NumTrains; i++) + for (size_t i = 0; i < ride.numTrains; i++) { Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) @@ -219,13 +218,13 @@ static void RideUpdateStationRace(Ride& ride, StationIndex stationIndex) auto* peep = GetEntity(vehicle->peep[0]); if (peep != nullptr) { - ride.race_winner = peep->Id; - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride.raceWinner = peep->Id; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } // Race is over - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; if (station.Depart & kStationDepartFlag) { station.Depart &= ~kStationDepartFlag; @@ -241,7 +240,7 @@ static void RideUpdateStationRace(Ride& ride, StationIndex stationIndex) else { // Check if all vehicles are ready to go - for (size_t i = 0; i < ride.NumTrains; i++) + for (size_t i = 0; i < ride.numTrains; i++) { Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) @@ -260,13 +259,13 @@ static void RideUpdateStationRace(Ride& ride, StationIndex stationIndex) // Begin the race RideRaceInitVehicleSpeeds(ride); - ride.lifecycle_flags |= RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; + ride.lifecycleFlags |= RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; if (!(station.Depart & kStationDepartFlag)) { station.Depart |= kStationDepartFlag; RideInvalidateStationStart(ride, stationIndex, true); } - ride.window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + ride.windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; } } @@ -278,7 +277,7 @@ static void RideUpdateStationRace(Ride& ride, StationIndex stationIndex) */ static void RideRaceInitVehicleSpeeds(const Ride& ride) { - for (size_t i = 0; i < ride.NumTrains; i++) + for (size_t i = 0; i < ride.numTrains; i++) { Vehicle* vehicle = GetEntity(ride.vehicles[i]); if (vehicle == nullptr) @@ -326,7 +325,7 @@ static void RideRaceInitVehicleSpeeds(const Ride& ride) */ static void RideInvalidateStationStart(Ride& ride, StationIndex stationIndex, bool greenLight) { - auto startPos = ride.GetStation(stationIndex).Start; + auto startPos = ride.getStation(stationIndex).Start; TileElement* tileElement = RideGetStationStartTrackElement(ride, stationIndex); // If no station track found return @@ -341,7 +340,7 @@ static void RideInvalidateStationStart(Ride& ride, StationIndex stationIndex, bo TileElement* RideGetStationStartTrackElement(const Ride& ride, StationIndex stationIndex) { - auto stationStart = ride.GetStation(stationIndex).GetStart(); + auto stationStart = ride.getStation(stationIndex).GetStart(); // Find the station track element TileElement* tileElement = MapGetFirstElementAt(stationStart); @@ -376,11 +375,11 @@ TileElement* RideGetStationExitElement(const CoordsXYZ& elementPos) StationIndex RideGetFirstValidStationExit(const Ride& ride) { - for (const auto& station : ride.GetStations()) + for (const auto& station : ride.getStations()) { if (!station.Exit.IsNull()) { - return ride.GetStationIndex(&station); + return ride.getStationIndex(&station); } } return StationIndex::GetNull(); @@ -388,11 +387,11 @@ StationIndex RideGetFirstValidStationExit(const Ride& ride) StationIndex RideGetFirstValidStationStart(const Ride& ride) { - for (const auto& station : ride.GetStations()) + for (const auto& station : ride.getStations()) { if (!station.Start.IsNull()) { - return ride.GetStationIndex(&station); + return ride.getStationIndex(&station); } } return StationIndex::GetNull(); @@ -400,11 +399,11 @@ StationIndex RideGetFirstValidStationStart(const Ride& ride) StationIndex RideGetFirstEmptyStationStart(const Ride& ride) { - for (const auto& station : ride.GetStations()) + for (const auto& station : ride.getStations()) { if (station.Start.IsNull()) { - return ride.GetStationIndex(&station); + return ride.getStationIndex(&station); } } return StationIndex::GetNull(); diff --git a/src/openrct2/ride/Track.cpp b/src/openrct2/ride/Track.cpp index 8e41fe2f1f..25c9056a9b 100644 --- a/src/openrct2/ride/Track.cpp +++ b/src/openrct2/ride/Track.cpp @@ -98,13 +98,13 @@ static TileElement* find_station_element(const CoordsXYZD& loc, RideId rideIndex static void ride_remove_station(Ride& ride, const CoordsXYZ& location) { - for (auto& station : ride.GetStations()) + for (auto& station : ride.getStations()) { auto stationStart = station.GetStart(); if (stationStart == location) { station.Start.SetNull(); - ride.num_stations--; + ride.numStations--; break; } } @@ -124,9 +124,9 @@ ResultWithMessage TrackAddStationElement(CoordsXYZD loc, RideId rideIndex, int32 CoordsXY stationFrontLoc = loc; int32_t stationLength = 1; - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation)) { - if (ride->num_stations >= Limits::kMaxStationsPerRide) + if (ride->numStations >= Limits::kMaxStationsPerRide) { return { false, STR_NO_MORE_STATIONS_ALLOWED_ON_THIS_RIDE }; } @@ -135,13 +135,13 @@ ResultWithMessage TrackAddStationElement(CoordsXYZD loc, RideId rideIndex, int32 auto stationIndex = RideGetFirstEmptyStationStart(*ride); assert(!stationIndex.IsNull()); - auto& station = ride->GetStation(stationIndex); + auto& station = ride->getStation(stationIndex); station.Start.x = loc.x; station.Start.y = loc.y; station.Height = loc.z / kCoordsZStep; station.Depart = 1; station.Length = 0; - ride->num_stations++; + ride->numStations++; } return { true }; } @@ -195,7 +195,7 @@ ResultWithMessage TrackAddStationElement(CoordsXYZD loc, RideId rideIndex, int32 // When attempting to place a track design, it sometimes happens that the front and back of station 0 are built, // but the middle is not. Allow this, so the track place function can actually finish building all 4 stations. // This _might_ cause issues if the track designs is bugged and actually has 5. - if (stationBackLoc == stationFrontLoc && ride->num_stations >= Limits::kMaxStationsPerRide && !fromTrackDesign) + if (stationBackLoc == stationFrontLoc && ride->numStations >= Limits::kMaxStationsPerRide && !fromTrackDesign) { return { false, STR_NO_MORE_STATIONS_ALLOWED_ON_THIS_RIDE }; } @@ -227,12 +227,12 @@ ResultWithMessage TrackAddStationElement(CoordsXYZD loc, RideId rideIndex, int32 } else { - auto& station = ride->GetStation(stationIndex); + auto& station = ride->getStation(stationIndex); station.Start = loc; station.Height = loc.z / kCoordsZStep; station.Depart = 1; station.Length = stationLength; - ride->num_stations++; + ride->numStations++; } targetTrackType = TrackElemType::EndStation; @@ -276,7 +276,7 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn int32_t stationLength = 0; int32_t ByteF441D1 = -1; - if (ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation)) + if (ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasSinglePieceStation)) { TileElement* tileElement = MapGetTrackElementAtWithDirectionFromRide(loc, rideIndex); if (tileElement != nullptr) @@ -332,8 +332,7 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn if (!(flags & GAME_COMMAND_FLAG_APPLY)) { - if ((removeLoc != stationBackLoc) && (removeLoc != stationFrontLoc) - && ride->num_stations >= Limits::kMaxStationsPerRide) + if ((removeLoc != stationBackLoc) && (removeLoc != stationFrontLoc) && ride->numStations >= Limits::kMaxStationsPerRide) { return { false, STR_NO_MORE_STATIONS_ALLOWED_ON_THIS_RIDE }; } @@ -362,12 +361,12 @@ ResultWithMessage TrackRemoveStationElement(const CoordsXYZD& loc, RideId rideIn } else { - auto& station = ride->GetStation(stationIndex); + auto& station = ride->getStation(stationIndex); station.Start = currentLoc; station.Height = currentLoc.z / kCoordsZStep; station.Depart = 1; station.Length = stationLength != 0 ? stationLength : ByteF441D1; - ride->num_stations++; + ride->numStations++; } stationLength = 0; diff --git a/src/openrct2/ride/Track.h b/src/openrct2/ride/Track.h index ea52f6cd7c..516cdf64fc 100644 --- a/src/openrct2/ride/Track.h +++ b/src/openrct2/ride/Track.h @@ -727,10 +727,6 @@ bool TrackTypeIsBrakes(OpenRCT2::TrackElemType trackType); bool TrackTypeIsBlockBrakes(OpenRCT2::TrackElemType trackType); bool TrackTypeIsBooster(OpenRCT2::TrackElemType trackType); -std::optional GetTrackElementOriginAndApplyChanges( - const CoordsXYZD& location, OpenRCT2::TrackElemType type, uint16_t extra_params, TileElement** output_element, - uint16_t flags); - TrackRoll TrackGetActualBank(TileElement* tileElement, TrackRoll bank); TrackRoll TrackGetActualBank2(ride_type_t rideType, bool isInverted, TrackRoll bank); TrackRoll TrackGetActualBank3(bool useInvertedSprites, TileElement* tileElement); diff --git a/src/openrct2/ride/TrackDesign.cpp b/src/openrct2/ride/TrackDesign.cpp index 046f452833..7eab5f0dec 100644 --- a/src/openrct2/ride/TrackDesign.cpp +++ b/src/openrct2/ride/TrackDesign.cpp @@ -105,7 +105,7 @@ static void TrackDesignPreviewClearMap(); static u8string_view TrackDesignGetStationObjectIdentifier(const Ride& ride) { - const auto* stationObject = ride.GetStationObject(); + const auto* stationObject = ride.getStationObject(); if (stationObject == nullptr) return ""; @@ -133,38 +133,38 @@ ResultWithMessage TrackDesign::CreateTrackDesign(TrackDesignState& tds, const Ri for (size_t i = 0; i < std::size(appearance.vehicleColours); i++) { - appearance.vehicleColours[i] = ride.vehicle_colours[i]; + appearance.vehicleColours[i] = ride.vehicleColours[i]; } - for (size_t i = 0; i < std::min(std::size(ride.track_colour), std::size(appearance.trackColours)); i++) + for (size_t i = 0; i < std::min(std::size(ride.trackColours), std::size(appearance.trackColours)); i++) { - appearance.trackColours[i] = ride.track_colour[i]; + appearance.trackColours[i] = ride.trackColours[i]; } - operation.departFlags = ride.depart_flags; - trackAndVehicle.numberOfTrains = ride.NumTrains; - trackAndVehicle.numberOfCarsPerTrain = ride.num_cars_per_train; - operation.minWaitingTime = ride.min_waiting_time; - operation.maxWaitingTime = ride.max_waiting_time; - operation.operationSetting = ride.operation_option; - operation.liftHillSpeed = ride.lift_hill_speed; - operation.numCircuits = ride.num_circuits; + operation.departFlags = ride.departFlags; + trackAndVehicle.numberOfTrains = ride.numTrains; + trackAndVehicle.numberOfCarsPerTrain = ride.numCarsPerTrain; + operation.minWaitingTime = ride.minWaitingTime; + operation.maxWaitingTime = ride.maxWaitingTime; + operation.operationSetting = ride.operationOption; + operation.liftHillSpeed = ride.liftHillSpeed; + operation.numCircuits = ride.numCircuits; appearance.stationObjectIdentifier = TrackDesignGetStationObjectIdentifier(ride); - statistics.maxSpeed = static_cast(ride.max_speed / 65536); - statistics.averageSpeed = static_cast(ride.average_speed / 65536); - statistics.rideLength = ToHumanReadableRideLength(ride.GetTotalLength()); - statistics.maxPositiveVerticalG = ride.max_positive_vertical_g; - statistics.maxNegativeVerticalG = ride.max_negative_vertical_g; - statistics.maxLateralG = ride.max_lateral_g; + statistics.maxSpeed = static_cast(ride.maxSpeed / 65536); + statistics.averageSpeed = static_cast(ride.averageSpeed / 65536); + statistics.rideLength = ToHumanReadableRideLength(ride.getTotalLength()); + statistics.maxPositiveVerticalG = ride.maxPositiveVerticalG; + statistics.maxNegativeVerticalG = ride.maxNegativeVerticalG; + statistics.maxLateralG = ride.maxLateralG; statistics.inversions = ride.inversions; statistics.holes = ride.holes; statistics.drops = ride.getNumDrops(); - statistics.highestDropHeight = ride.highest_drop_height; + statistics.highestDropHeight = ride.highestDropHeight; statistics.totalAirTime = ride.totalAirTime; statistics.ratings = ride.ratings; - statistics.upkeepCost = ride.upkeep_cost; + statistics.upkeepCost = ride.upkeepCost; const auto& rtd = GetRideTypeDescriptor(trackAndVehicle.rtdIndex); @@ -195,7 +195,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con uint8_t direction = trackElement.element->GetDirection(); _saveDirection = direction; auto newCoords = GetTrackElementOriginAndApplyChanges( - { trackElement, z, direction }, trackType, 0, &trackElement.element, 0); + { trackElement, z, direction }, trackType, 0, &trackElement.element, {}); if (!newCoords.has_value()) { @@ -241,7 +241,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con if (element->HasChain()) track.SetFlag(TrackDesignTrackElementFlag::hasChain); - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasInvertedVariant) && element->IsInverted()) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasInvertedVariant) && element->IsInverted()) { track.SetFlag(TrackDesignTrackElementFlag::isInverted); } @@ -257,7 +257,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con direction = trackElement.element->GetDirection(); trackType = trackElement.element->AsTrack()->GetTrackType(); newCoords = GetTrackElementOriginAndApplyChanges( - { trackElement, z, direction }, trackType, 0, &trackElement.element, 0); + { trackElement, z, direction }, trackType, 0, &trackElement.element, {}); if (!newCoords.has_value()) { @@ -275,7 +275,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignTrack(TrackDesignState& tds, con // First entrances, second exits for (int32_t i = 0; i < 2; i++) { - for (const auto& station : ride.GetStations()) + for (const auto& station : ride.getStations()) { z = station.GetBaseZ(); @@ -396,7 +396,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, cons x = 0; } - auto location = ride.GetStation().Entrance; + auto location = ride.getStation().Entrance; if (location.IsNull()) { return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; @@ -423,7 +423,7 @@ ResultWithMessage TrackDesign::CreateTrackDesignMaze(TrackDesignState& tds, cons mazeEntrance.isExit = false; entranceElements.push_back(mazeEntrance); - location = ride.GetStation().Exit; + location = ride.getStation().Exit; if (location.IsNull()) { return { false, STR_TRACK_TOO_LARGE_OR_TOO_MUCH_SCENERY }; @@ -727,7 +727,7 @@ static std::optional TrackDesignPlaceSceneryElementGetEntry(c { result.Type = obj->GetObjectType(); result.Index = objectMgr.GetLoadedObjectEntryIndex(obj); - if (!GetGameState().Cheats.ignoreResearchStatus) + if (!getGameState().cheats.ignoreResearchStatus) { objectUnavailable = !ResearchIsInvented(result.Type, result.Index); } @@ -1530,7 +1530,7 @@ static GameActions::Result TrackDesignPlaceMaze( if (tds.placeOperation == TrackPlaceOperation::removeGhost) { - auto gameAction = RideDemolishAction(ride.id, RIDE_MODIFY_DEMOLISH); + auto gameAction = RideDemolishAction(ride.id, RideModifyType::demolish); gameAction.SetFlags(GAME_COMMAND_FLAG_ALLOW_DURING_PAUSED | GAME_COMMAND_FLAG_NO_SPEND | GAME_COMMAND_FLAG_GHOST); GameActions::Execute(&gameAction); } @@ -1713,8 +1713,8 @@ static GameActions::Result TrackDesignPlaceRide( if (tds.placeOperation == TrackPlaceOperation::removeGhost) { - ride.ValidateStations(); - ride.Delete(); + ride.validateStations(); + ride.remove(); } auto res = GameActions::Result(); @@ -1849,7 +1849,7 @@ int32_t TrackDesignGetZPlacement(const TrackDesign& td, Ride& ride, const Coords static money64 TrackDesignCreateRide(int32_t type, int32_t subType, int32_t flags, RideId* outRideIndex) { // Don't set colours as will be set correctly later. - auto gameAction = RideCreateAction(type, subType, 0, 0, GetGameState().LastEntranceStyle); + auto gameAction = RideCreateAction(type, subType, 0, 0, getGameState().lastEntranceStyle); gameAction.SetFlags(flags); auto res = GameActions::ExecuteNested(&gameAction); @@ -1877,7 +1877,7 @@ static bool TrackDesignPlacePreview( *outRide = nullptr; gameStateData.flags = 0; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto& objManager = GetContext()->GetObjectManager(); auto entry_index = objManager.GetLoadedObjectEntryIndex(td.trackAndVehicle.vehicleObject); @@ -1892,34 +1892,34 @@ static bool TrackDesignPlacePreview( if (ride == nullptr) return false; - ride->custom_name = {}; + ride->customName = {}; - ride->entrance_style = objManager.GetLoadedObjectEntryIndex(td.appearance.stationObjectIdentifier); - if (ride->entrance_style == kObjectEntryIndexNull) + ride->entranceStyle = objManager.GetLoadedObjectEntryIndex(td.appearance.stationObjectIdentifier); + if (ride->entranceStyle == kObjectEntryIndexNull) { - ride->entrance_style = gameState.LastEntranceStyle; + ride->entranceStyle = gameState.lastEntranceStyle; } - for (size_t i = 0; i < std::min(std::size(ride->track_colour), std::size(td.appearance.trackColours)); i++) + for (size_t i = 0; i < std::min(std::size(ride->trackColours), std::size(td.appearance.trackColours)); i++) { - ride->track_colour[i] = td.appearance.trackColours[i]; + ride->trackColours[i] = td.appearance.trackColours[i]; } // Flat rides need their vehicle colours loaded for display // in the preview window if (!GetRideTypeDescriptor(td.trackAndVehicle.rtdIndex).HasFlag(RtdFlag::hasTrack)) { - for (size_t i = 0; i < std::size(ride->vehicle_colours); i++) + for (size_t i = 0; i < std::size(ride->vehicleColours); i++) { - ride->vehicle_colours[i] = td.appearance.vehicleColours[i]; + ride->vehicleColours[i] = td.appearance.vehicleColours[i]; } } _trackDesignDrawingPreview = true; uint8_t backup_rotation = _currentTrackPieceDirection; - uint32_t backup_park_flags = gameState.Park.Flags; - gameState.Park.Flags &= ~PARK_FLAGS_FORBID_HIGH_CONSTRUCTION; - auto mapSize = TileCoordsXY{ gameState.MapSize.x * 16, gameState.MapSize.y * 16 }; + uint32_t backup_park_flags = gameState.park.Flags; + gameState.park.Flags &= ~PARK_FLAGS_FORBID_HIGH_CONSTRUCTION; + auto mapSize = TileCoordsXY{ gameState.mapSize.x * 16, gameState.mapSize.y * 16 }; _currentTrackPieceDirection = 0; int32_t z = TrackDesignGetZPlacement( @@ -1942,7 +1942,7 @@ static bool TrackDesignPlacePreview( auto res = TrackDesignPlaceVirtual( tds, td, TrackPlaceOperation::placeTrackPreview, placeScenery, *ride, { mapSize.x, mapSize.y, z, _currentTrackPieceDirection }); - gameState.Park.Flags = backup_park_flags; + gameState.park.Flags = backup_park_flags; if (res.Error == GameActions::Status::Ok) { @@ -1950,7 +1950,7 @@ static bool TrackDesignPlacePreview( { gameStateData.setFlag(TrackDesignGameStateFlag::VehicleUnavailable, true); } - else if (!RideEntryIsInvented(entry_index) && !GetGameState().Cheats.ignoreResearchStatus) + else if (!RideEntryIsInvented(entry_index) && !getGameState().cheats.ignoreResearchStatus) { gameStateData.setFlag(TrackDesignGameStateFlag::VehicleUnavailable, true); } @@ -1963,7 +1963,7 @@ static bool TrackDesignPlacePreview( } _currentTrackPieceDirection = backup_rotation; - ride->Delete(); + ride->remove(); _trackDesignDrawingPreview = false; return false; } @@ -2062,7 +2062,7 @@ void TrackDesignDrawPreview(TrackDesign& td, uint8_t* pixels) StashMap(); TrackDesignPreviewClearMap(); - if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + if (gLegacyScene == LegacyScene::trackDesignsManager) { TrackDesignLoadSceneryObjects(td); } @@ -2141,7 +2141,7 @@ void TrackDesignDrawPreview(TrackDesign& td, uint8_t* pixels) dpi.bits += kTrackPreviewImageSize; } - ride->Delete(); + ride->remove(); UnstashMap(); } @@ -2153,8 +2153,8 @@ static void TrackDesignPreviewClearMap() { auto numTiles = kMaximumMapSizeTechnical * kMaximumMapSizeTechnical; - auto& gameState = GetGameState(); - gameState.MapSize = TRACK_DESIGN_PREVIEW_MAP_SIZE; + auto& gameState = getGameState(); + gameState.mapSize = TRACK_DESIGN_PREVIEW_MAP_SIZE; // Reserve ~8 elements per tile std::vector tileElements; diff --git a/src/openrct2/ride/TrackDesignRepository.cpp b/src/openrct2/ride/TrackDesignRepository.cpp index c2bd99c39f..6a5877f89c 100644 --- a/src/openrct2/ride/TrackDesignRepository.cpp +++ b/src/openrct2/ride/TrackDesignRepository.cpp @@ -16,6 +16,7 @@ #include "../core/File.h" #include "../core/FileIndex.hpp" #include "../core/FileStream.h" +#include "../core/FlagHolder.hpp" #include "../core/Path.hpp" #include "../core/String.hpp" #include "../localisation/LocalisationService.h" @@ -28,18 +29,19 @@ using namespace OpenRCT2; +enum TrackRepoItemFlag : uint8_t +{ + readOnly, +}; +using TrackRepoItemFlags = FlagHolder; + struct TrackRepositoryItem { std::string Name; std::string Path; ride_type_t RideType = kRideTypeNull; std::string ObjectEntry; - uint32_t Flags = 0; -}; - -enum TRACK_REPO_ITEM_FLAGS -{ - TRIF_READ_ONLY = (1 << 0), + TrackRepoItemFlags flags{}; }; std::string GetNameFromTrackPath(const std::string& path) @@ -53,18 +55,18 @@ std::string GetNameFromTrackPath(const std::string& path) class TrackDesignFileIndex final : public FileIndex { private: - static constexpr uint32_t MAGIC_NUMBER = 0x58444954; // TIDX - static constexpr uint16_t VERSION = 5; - static constexpr auto PATTERN = "*.td4;*.td6"; + static constexpr uint32_t kMagicNumber = 0x58444954; // TIDX + static constexpr uint16_t kVersion = 5; + static constexpr auto kPattern = "*.td4;*.td6"; public: explicit TrackDesignFileIndex(const IPlatformEnvironment& env) : FileIndex( - "track design index", MAGIC_NUMBER, VERSION, env.GetFilePath(PATHID::CACHE_TRACKS), std::string(PATTERN), + "track design index", kMagicNumber, kVersion, env.GetFilePath(PathId::cacheTracks), std::string(kPattern), std::vector({ - env.GetDirectoryPath(DIRBASE::RCT1, DIRID::TRACK), - env.GetDirectoryPath(DIRBASE::RCT2, DIRID::TRACK), - env.GetDirectoryPath(DIRBASE::USER, DIRID::TRACK), + env.GetDirectoryPath(DirBase::rct1, DirId::trackDesigns), + env.GetDirectoryPath(DirBase::rct2, DirId::trackDesigns), + env.GetDirectoryPath(DirBase::user, DirId::trackDesigns), })) { } @@ -75,15 +77,14 @@ public: auto td = TrackDesignImport(path.c_str()); if (td != nullptr) { - TrackRepositoryItem item; + TrackRepositoryItem item{}; item.Name = GetNameFromTrackPath(path); item.Path = path; item.RideType = td->trackAndVehicle.rtdIndex; item.ObjectEntry = std::string(td->trackAndVehicle.vehicleObject.Entry.name, 8); - item.Flags = 0; if (IsTrackReadOnly(path)) { - item.Flags |= TRIF_READ_ONLY; + item.flags.set(TrackRepoItemFlag::readOnly); } return item; } @@ -98,7 +99,7 @@ protected: ds << item.Path; ds << item.RideType; ds << item.ObjectEntry; - ds << item.Flags; + ds << item.flags.holder; } private: @@ -219,7 +220,7 @@ public: if (index != SIZE_MAX) { const TrackRepositoryItem* item = &_items[index]; - if (!(item->Flags & TRIF_READ_ONLY)) + if (!item->flags.has(TrackRepoItemFlag::readOnly)) { if (File::Delete(path)) { @@ -238,7 +239,7 @@ public: if (index != SIZE_MAX) { TrackRepositoryItem* item = &_items[index]; - if (!(item->Flags & TRIF_READ_ONLY)) + if (!item->flags.has(TrackRepoItemFlag::readOnly)) { std::string directory = Path::GetDirectory(path); std::string newPath = Path::Combine(directory, newName + Path::GetExtension(path)); @@ -257,7 +258,7 @@ public: std::string Install(const std::string& path, const std::string& name) override { std::string result; - std::string installDir = _env->GetDirectoryPath(DIRBASE::USER, DIRID::TRACK); + std::string installDir = _env->GetDirectoryPath(DirBase::user, DirId::trackDesigns); std::string newPath = Path::Combine(installDir, name + Path::GetExtension(path)); if (File::Copy(path, newPath, false)) diff --git a/src/openrct2/ride/TrackDesignSave.cpp b/src/openrct2/ride/TrackDesignSave.cpp index c537eb4dd0..d19c61e983 100644 --- a/src/openrct2/ride/TrackDesignSave.cpp +++ b/src/openrct2/ride/TrackDesignSave.cpp @@ -272,7 +272,7 @@ static TrackDesignAddStatus TrackDesignSaveAddLargeScenery(const CoordsXY& loc, { auto entryIndex = tileElement->GetEntryIndex(); auto& objectMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objectMgr.GetLoadedObject(ObjectType::largeScenery, entryIndex); + auto obj = objectMgr.GetLoadedObject(entryIndex); if (obj != nullptr && TrackDesignSaveIsSupportedObject(obj)) { auto sceneryEntry = reinterpret_cast(obj->GetLegacyData()); @@ -488,7 +488,7 @@ static void TrackDesignSaveRemoveLargeScenery(const CoordsXY& loc, LargeSceneryE auto entryIndex = tileElement->GetEntryIndex(); auto& objectMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objectMgr.GetLoadedObject(ObjectType::largeScenery, entryIndex); + auto obj = objectMgr.GetLoadedObject(entryIndex); if (obj != nullptr) { auto sceneryEntry = reinterpret_cast(obj->GetLegacyData()); diff --git a/src/openrct2/ride/TrackPaint.cpp b/src/openrct2/ride/TrackPaint.cpp index 58fd847ccc..23c0a405fe 100644 --- a/src/openrct2/ride/TrackPaint.cpp +++ b/src/openrct2/ride/TrackPaint.cpp @@ -26,7 +26,6 @@ #include "../paint/tile_element/Segment.h" #include "../paint/track/Segment.h" #include "../paint/track/Support.h" -#include "../scenario/Scenario.h" #include "../world/Map.h" #include "../world/tile_element/TrackElement.h" #include "RideData.h" @@ -100,8 +99,8 @@ enum bool TrackPaintUtilHasFence( enum edge_t edge, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride, uint8_t rotation) { - const auto* stationObject = ride.GetStationObject(); - if (stationObject != nullptr && stationObject->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS) + const auto* stationObject = ride.getStationObject(); + if (stationObject != nullptr && stationObject->Flags & StationObjectFlags::noPlatforms) return false; TileCoordsXY offset; @@ -123,7 +122,7 @@ bool TrackPaintUtilHasFence( auto entranceLoc = TileCoordsXY(position) + offset; auto entranceId = trackElement.GetStationIndex(); - const auto& station = ride.GetStation(entranceId); + const auto& station = ride.getStation(entranceId); return (entranceLoc != station.Entrance && entranceLoc != station.Exit); } @@ -132,7 +131,7 @@ void TrackPaintUtilPaintFloor( PaintSession& session, uint8_t edges, ImageId colourFlags, uint16_t height, const uint32_t floorSprites[4], const StationObject* stationStyle) { - if (stationStyle != nullptr && stationStyle->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS) + if (stationStyle != nullptr && stationStyle->Flags & StationObjectFlags::noPlatforms) return; uint32_t imageId; @@ -195,46 +194,57 @@ bool TrackPaintUtilShouldPaintSupports(const CoordsXY& position) return false; } -static void TrackPaintUtilDrawStationImpl( +static constexpr ImageIndex kStationBaseTypeSpriteIndexes[][2] = { + { kImageIndexUndefined, kImageIndexUndefined }, + { SPR_STATION_BASE_A_SW_NE, SPR_STATION_BASE_A_NW_SE }, + { SPR_STATION_BASE_B_SW_NE, SPR_STATION_BASE_B_NW_SE }, + { SPR_STATION_BASE_C_SW_NE, SPR_STATION_BASE_C_NW_SE }, +}; +static_assert(std::size(kStationBaseTypeSpriteIndexes) == kStationBaseTypeCount); + +static bool TrackPaintUtilDrawStationImpl( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight, - const TrackElement& trackElement, int32_t fenceOffsetA, int32_t fenceOffsetB); + const TrackElement& trackElement, const StationBaseType baseType, const int32_t baseOffsetZ, int32_t fenceOffsetA, + int32_t fenceOffsetB); -void TrackPaintUtilDrawStation( - PaintSession& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement) -{ - TrackPaintUtilDrawStationImpl(session, ride, direction, height, height, trackElement, 5, 7); -} - -void TrackPaintUtilDrawStation2( +bool TrackPaintUtilDrawStation( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement, - int32_t fenceOffsetA, int32_t fenceOffsetB) + const StationBaseType baseType, const int32_t baseOffsetZ) { - TrackPaintUtilDrawStationImpl(session, ride, direction, height, height, trackElement, fenceOffsetA, fenceOffsetB); + return TrackPaintUtilDrawStationImpl(session, ride, direction, height, height, trackElement, baseType, baseOffsetZ, 5, 7); } -void TrackPaintUtilDrawStation3( - PaintSession& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight, - const TrackElement& trackElement) +bool TrackPaintUtilDrawStation2( + PaintSession& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement, + const StationBaseType baseType, const int32_t baseOffsetZ, int32_t fenceOffsetA, int32_t fenceOffsetB) { - TrackPaintUtilDrawStationImpl(session, ride, direction, height, coverHeight, trackElement, 5, 7); + return TrackPaintUtilDrawStationImpl( + session, ride, direction, height, height, trackElement, baseType, baseOffsetZ, fenceOffsetA, fenceOffsetB); } -static void TrackPaintUtilDrawStationImpl( +static bool TrackPaintUtilDrawStationImpl( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight, - const TrackElement& trackElement, int32_t fenceOffsetA, int32_t fenceOffsetB) + const TrackElement& trackElement, const StationBaseType baseType, const int32_t baseOffsetZ, int32_t fenceOffsetA, + int32_t fenceOffsetB) { CoordsXY position = session.MapPosition; - const auto* stationObj = ride.GetStationObject(); + const auto* stationObj = ride.getStationObject(); const bool hasGreenLight = trackElement.HasGreenLight(); - if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS) - return; + if (stationObj != nullptr && stationObj->Flags & StationObjectFlags::noPlatforms) + return false; bool hasFence; ImageId imageId; + ImageId stationColourScheme = GetStationColourScheme(session, trackElement); + if (direction == 0 || direction == 2) { + PaintAddImageAsParent( + session, stationColourScheme.WithIndex(kStationBaseTypeSpriteIndexes[EnumValue(baseType)][0]), + { 0, 0, height + baseOffsetZ }, { { 0, 2, height }, { 32, 28, 1 } }); + // height += 5 (height + 5); hasFence = TrackPaintUtilHasFence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); @@ -263,8 +273,7 @@ static void TrackPaintUtilDrawStationImpl( } PaintAddImageAsParent(session, imageId, { 0, 0, height + fenceOffsetA }, { 32, 8, 1 }); // height -= 5 (height) - TrackPaintUtilDrawStationCovers( - session, EDGE_NW, hasFence, stationObj, coverHeight, GetStationColourScheme(session, trackElement)); + TrackPaintUtilDrawStationCovers(session, EDGE_NW, hasFence, stationObj, coverHeight, stationColourScheme); // height += 5 (height + 5) if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 0) @@ -313,8 +322,7 @@ static void TrackPaintUtilDrawStationImpl( PaintAddImageAsParent(session, imageId, { 31, 23, height + fenceOffsetB }, { 1, 8, 7 }); } // height -= 7 (height) - TrackPaintUtilDrawStationCovers( - session, EDGE_SE, hasFence, stationObj, coverHeight, GetStationColourScheme(session, trackElement)); + TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, coverHeight, stationColourScheme); // height += 7 (height + 7) if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 0) @@ -330,6 +338,10 @@ static void TrackPaintUtilDrawStationImpl( } else if (direction == 1 || direction == 3) { + PaintAddImageAsParent( + session, stationColourScheme.WithIndex(kStationBaseTypeSpriteIndexes[EnumValue(baseType)][1]), + { 0, 0, height + baseOffsetZ }, { { 2, 0, height }, { 28, 32, 1 } }); + // height += 5 (height + 5); hasFence = TrackPaintUtilHasFence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); @@ -358,8 +370,7 @@ static void TrackPaintUtilDrawStationImpl( } PaintAddImageAsParent(session, imageId, { 0, 0, height + fenceOffsetA }, { 8, 32, 1 }); // height -= 5 (height) - TrackPaintUtilDrawStationCovers( - session, EDGE_NE, hasFence, stationObj, coverHeight, GetStationColourScheme(session, trackElement)); + TrackPaintUtilDrawStationCovers(session, EDGE_NE, hasFence, stationObj, coverHeight, stationColourScheme); // height += 5 (height + 5) if (trackElement.GetTrackType() == TrackElemType::EndStation && direction == 3) @@ -409,8 +420,7 @@ static void TrackPaintUtilDrawStationImpl( } // height -= 7 (height) - TrackPaintUtilDrawStationCovers( - session, EDGE_SW, hasFence, stationObj, coverHeight, GetStationColourScheme(session, trackElement)); + TrackPaintUtilDrawStationCovers(session, EDGE_SW, hasFence, stationObj, coverHeight, stationColourScheme); // height += 7 (height + 7) if (trackElement.GetTrackType() == TrackElemType::BeginStation && direction == 3) @@ -424,18 +434,19 @@ static void TrackPaintUtilDrawStationImpl( PaintAddImageAsParent(session, imageId, { 0, 31, height + fenceOffsetB }, { 8, 1, 7 }); } } + return true; } -void TrackPaintUtilDrawStationInverted( +bool TrackPaintUtilDrawStationInverted( PaintSession& session, const Ride& ride, Direction direction, int32_t height, const TrackElement& trackElement, uint8_t stationVariant) { CoordsXY position = session.MapPosition; - const auto* stationObj = ride.GetStationObject(); + const auto* stationObj = ride.getStationObject(); const bool hasGreenLight = trackElement.HasGreenLight(); - if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS) - return; + if (stationObj != nullptr && stationObj->Flags & StationObjectFlags::noPlatforms) + return false; auto colour = GetStationColourScheme(session, trackElement); bool hasFence; @@ -443,6 +454,10 @@ void TrackPaintUtilDrawStationInverted( if (direction == 0 || direction == 2) { + PaintAddImageAsParent( + session, colour.WithIndex(kStationBaseTypeSpriteIndexes[EnumValue(StationBaseType::c)][0]), { 0, 0, height }, + { { 0, 2, height }, { 32, 28, 1 } }); + // height += 5 (height + 5); hasFence = TrackPaintUtilHasFence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); @@ -536,6 +551,10 @@ void TrackPaintUtilDrawStationInverted( } else if (direction == 1 || direction == 3) { + PaintAddImageAsParent( + session, colour.WithIndex(kStationBaseTypeSpriteIndexes[EnumValue(StationBaseType::c)][1]), { 0, 0, height }, + { { 2, 0, height }, { 28, 32, 1 } }); + // height += 5 (height + 5); hasFence = TrackPaintUtilHasFence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); @@ -628,6 +647,7 @@ void TrackPaintUtilDrawStationInverted( PaintAddImageAsParent(session, imageId, { 0, 31, height + 8 }, { 8, 1, 7 }); } } + return true; } bool TrackPaintUtilDrawStationCovers( @@ -688,30 +708,42 @@ bool TrackPaintUtilDrawStationCovers2( imageOffset += SPR_STATION_COVER_OFFSET_TALL; } - auto imageTemplate = session.TrackColours; - auto imageId = imageTemplate.WithIndex(baseImageIndex + imageOffset); + auto imageId = session.TrackColours.WithIndex(baseImageIndex + imageOffset); + if (!session.TrackColours.IsRemap()) + { + imageId = ImageId(baseImageIndex + imageOffset); + if (stationObject->Flags & StationObjectFlags::hasPrimaryColour) + imageId = imageId.WithPrimary(session.TrackColours.GetPrimary()); + if (stationObject->Flags & StationObjectFlags::hasSecondaryColour) + imageId = imageId.WithSecondary(session.TrackColours.GetSecondary()); + } + PaintAddImageAsParent(session, imageId, offset, boundBox); // Glass - if (colour == TrackStationColour && (stationObject->Flags & STATION_OBJECT_FLAGS::IS_TRANSPARENT)) + if (colour == TrackStationColour && (stationObject->Flags & StationObjectFlags::isTransparent)) { - imageId = ImageId(baseImageIndex + imageOffset + 12).WithTransparency(imageTemplate.GetPrimary()); + imageId = ImageId(baseImageIndex + imageOffset + 12).WithTransparency(session.TrackColours.GetPrimary()); PaintAddImageAsChild(session, imageId, offset, boundBox); } return true; } -void TrackPaintUtilDrawNarrowStationPlatform( +bool TrackPaintUtilDrawNarrowStationPlatform( PaintSession& session, const Ride& ride, Direction direction, int32_t height, int32_t zOffset, - const TrackElement& trackElement) + const TrackElement& trackElement, const StationBaseType baseType, const int32_t baseOffsetZ) { CoordsXY position = session.MapPosition; - const auto* stationObj = ride.GetStationObject(); - if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS) - return; + const auto* stationObj = ride.getStationObject(); + if (stationObj != nullptr && stationObj->Flags & StationObjectFlags::noPlatforms) + return false; auto colour = GetStationColourScheme(session, trackElement); if (direction & 1) { + PaintAddImageAsParent( + session, colour.WithIndex(kStationBaseTypeSpriteIndexes[EnumValue(baseType)][0]), { 0, 0, height + baseOffsetZ }, + { { 0, 2, height }, { 32, 28, 1 } }); + bool hasFence = TrackPaintUtilHasFence(EDGE_NE, position, trackElement, ride, session.CurrentRotation); ImageId imageId = session.SupportColours.WithIndex( (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NE : SPR_STATION_NARROW_EDGE_NE)); @@ -731,6 +763,10 @@ void TrackPaintUtilDrawNarrowStationPlatform( } else { + PaintAddImageAsParent( + session, colour.WithIndex(kStationBaseTypeSpriteIndexes[EnumValue(baseType)][0]), { 0, 0, height + baseOffsetZ }, + { { 2, 0, height }, { 28, 32, 1 } }); + bool hasFence = TrackPaintUtilHasFence(EDGE_NW, position, trackElement, ride, session.CurrentRotation); ImageId imageId = session.SupportColours.WithIndex( (hasFence ? SPR_STATION_NARROW_EDGE_FENCED_NW : SPR_STATION_NARROW_EDGE_NW)); @@ -748,13 +784,14 @@ void TrackPaintUtilDrawNarrowStationPlatform( } TrackPaintUtilDrawStationCovers(session, EDGE_SE, hasFence, stationObj, height, colour); } + return true; } void TrackPaintUtilDrawPier( PaintSession& session, const Ride& ride, const StationObject* stationObj, const CoordsXY& position, Direction direction, int32_t height, const TrackElement& trackElement, uint8_t rotation) { - if (stationObj != nullptr && stationObj->Flags & STATION_OBJECT_FLAGS::NO_PLATFORMS) + if (stationObj != nullptr && stationObj->Flags & StationObjectFlags::noPlatforms) return; auto colour = GetStationColourScheme(session, trackElement); bool hasFence; @@ -1727,7 +1764,7 @@ void TrackPaintUtilLeftQuarterTurn1TilePaint( void TrackPaintUtilSpinningTunnelPaint(PaintSession& session, int8_t thickness, int16_t height, Direction direction) { - int32_t frame = (GetGameState().CurrentTicks >> 2) & 3; + int32_t frame = (getGameState().currentTicks >> 2) & 3; auto colourFlags = session.SupportColours; auto colourFlags2 = session.TrackColours; @@ -1842,27 +1879,27 @@ void TrackPaintUtilOnridePhotoPaint( static constexpr uint16_t RightVerticalLoopSegments[] = { EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), - EnumsToFlags(PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), + EnumsToFlags(PaintSegment::bottom, PaintSegment::centre, PaintSegment::bottomLeft, PaintSegment::bottomRight), EnumsToFlags( - PaintSegment::rightCorner, PaintSegment::bottomCorner, PaintSegment::centre, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide, PaintSegment::bottomRightSide), + PaintSegment::right, PaintSegment::bottom, PaintSegment::centre, PaintSegment::topRight, PaintSegment::bottomLeft, + PaintSegment::bottomRight), 0, 0, EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), - EnumsToFlags(PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), + EnumsToFlags(PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight), EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), EnumsToFlags( - PaintSegment::topCorner, PaintSegment::leftCorner, PaintSegment::centre, PaintSegment::topLeftSide, - PaintSegment::topRightSide, PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::left, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), }; void TrackPaintUtilRightVerticalLoopSegments(PaintSession& session, Direction direction, uint8_t trackSequence) @@ -1886,8 +1923,8 @@ void TrackPaintUtilLeftCorkscrewUpSupports(PaintSession& session, Direction dire session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); } @@ -1899,8 +1936,8 @@ void TrackPaintUtilLeftCorkscrewUpSupports(PaintSession& session, Direction dire session, PaintUtilRotateSegments( EnumsToFlags( - PaintSegment::topCorner, PaintSegment::centre, PaintSegment::topLeftSide, PaintSegment::topRightSide, - PaintSegment::bottomLeftSide), + PaintSegment::top, PaintSegment::centre, PaintSegment::topLeft, PaintSegment::topRight, + PaintSegment::bottomLeft), direction), 0xFFFF, 0); } @@ -1959,7 +1996,7 @@ void PaintTrack(PaintSession& session, Direction direction, int32_t height, cons const auto& ted = GetTrackElementDescriptor(trackType); if (ted.heightMarkerPositions & (1 << trackSequence)) { - uint16_t ax = ride->GetRideTypeDescriptor().Heights.VehicleZOffset; + uint16_t ax = ride->getRideTypeDescriptor().Heights.VehicleZOffset; // 0x1689 represents 0 height there are -127 to 128 heights above and below it // There are 3 arrays of 256 heights (units, m, ft) chosen with the GetHeightMarkerOffset() auto heightNum = (height + 8) / 16 - kMapBaseZ; @@ -1972,12 +2009,12 @@ void PaintTrack(PaintSession& session, Direction direction, int32_t height, cons if (LightFx::IsAvailable()) { uint8_t zOffset = 16; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::toilet || rtd.specialType == RtdSpecialType::firstAid || rtd.specialType == RtdSpecialType::cashMachine) zOffset = 23; - const auto* originElement = ride->GetOriginElement(StationIndex::FromUnderlying(0)); + const auto* originElement = ride->getOriginElement(StationIndex::FromUnderlying(0)); if (originElement != nullptr && originElement->GetTrackType() == TrackElemType::FlatTrack1x1B) LightFx::AddKioskLights(session.MapPosition, height, zOffset); else if (kRideTypeDescriptors[ride->type].HasFlag(RtdFlag::isShopOrFacility)) @@ -1986,9 +2023,9 @@ void PaintTrack(PaintSession& session, Direction direction, int32_t height, cons session.InteractionType = ViewportInteractionItem::Ride; session.TrackColours = ImageId( - 0, ride->track_colour[trackColourScheme].main, ride->track_colour[trackColourScheme].additional); + 0, ride->trackColours[trackColourScheme].main, ride->trackColours[trackColourScheme].additional); session.SupportColours = ImageId( - 0, ride->track_colour[trackColourScheme].supports, ride->track_colour[trackColourScheme].additional); + 0, ride->trackColours[trackColourScheme].supports, ride->trackColours[trackColourScheme].additional); if (trackElement.IsHighlighted() || session.SelectedElement == reinterpret_cast(&trackElement)) { session.TrackColours = HighlightMarker; diff --git a/src/openrct2/ride/TrackPaint.h b/src/openrct2/ride/TrackPaint.h index 2a5c41b9d2..f375a79e14 100644 --- a/src/openrct2/ride/TrackPaint.h +++ b/src/openrct2/ride/TrackPaint.h @@ -412,24 +412,32 @@ void TrackPaintUtilPaintFloor( void TrackPaintUtilPaintFences( PaintSession& session, uint8_t edges, const CoordsXY& position, const TrackElement& trackElement, const Ride& ride, const ImageId colourFlags, uint16_t height, const uint32_t fenceSprites[4], uint8_t rotation); + +enum class StationBaseType +{ + none, + a, + b, + c, +}; +constexpr uint32_t kStationBaseTypeCount = 4; + bool TrackPaintUtilDrawStationCovers( PaintSession& session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height, ImageId colour); bool TrackPaintUtilDrawStationCovers2( PaintSession& session, enum edge_t edge, bool hasFence, const StationObject* stationObject, uint16_t height, uint8_t stationVariant, ImageId colour); -void TrackPaintUtilDrawNarrowStationPlatform( +bool TrackPaintUtilDrawNarrowStationPlatform( PaintSession& session, const Ride& ride, Direction direction, int32_t height, int32_t zOffset, - const TrackElement& trackElement); -void TrackPaintUtilDrawStation( - PaintSession& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement); -void TrackPaintUtilDrawStation2( + const TrackElement& trackElement, const StationBaseType baseType, const int32_t baseOffsetZ); +bool TrackPaintUtilDrawStation( PaintSession& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement, - int32_t fenceOffsetA, int32_t fenceOffsetB); -void TrackPaintUtilDrawStation3( - PaintSession& session, const Ride& ride, Direction direction, uint16_t height, uint16_t coverHeight, - const TrackElement& trackElement); -void TrackPaintUtilDrawStationInverted( + const StationBaseType baseType, const int32_t baseOffsetZ); +bool TrackPaintUtilDrawStation2( + PaintSession& session, const Ride& ride, Direction direction, uint16_t height, const TrackElement& trackElement, + const StationBaseType baseType, const int32_t baseOffsetZ, int32_t fenceOffsetA, int32_t fenceOffsetB); +bool TrackPaintUtilDrawStationInverted( PaintSession& session, const Ride& ride, Direction direction, int32_t height, const TrackElement& trackElement, uint8_t stationVariant); bool TrackPaintUtilShouldPaintSupports(const CoordsXY& position); diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index 24f15441fa..3622e21799 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -24,7 +24,9 @@ #include "../core/FixedPoint.hpp" #include "../core/Memory.hpp" #include "../core/Speed.hpp" +#include "../entity/EntityList.h" #include "../entity/EntityRegistry.h" +#include "../entity/EntityTweener.h" #include "../entity/Particle.h" #include "../entity/Yaw.hpp" #include "../interface/Viewport.h" @@ -36,7 +38,6 @@ #include "../platform/Platform.h" #include "../profiling/Profiling.h" #include "../rct12/RCT12.h" -#include "../scenario/Scenario.h" #include "../scripting/HookEngine.h" #include "../scripting/ScriptEngine.h" #include "../ui/WindowManager.h" @@ -468,7 +469,7 @@ bool EntityBase::Is() const static void InvokeVehicleCrashHook(const EntityId vehicleId, const std::string_view crashId) { auto& hookEngine = OpenRCT2::GetContext()->GetScriptEngine().GetHookEngine(); - if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HOOK_TYPE::VEHICLE_CRASH)) + if (hookEngine.HasSubscriptions(OpenRCT2::Scripting::HookType::vehicleCrash)) { auto ctx = OpenRCT2::GetContext()->GetScriptEngine().GetContext(); @@ -479,7 +480,7 @@ static void InvokeVehicleCrashHook(const EntityId vehicleId, const std::string_v // Call the subscriptions auto e = obj.Take(); - hookEngine.Call(OpenRCT2::Scripting::HOOK_TYPE::VEHICLE_CRASH, e, true); + hookEngine.Call(OpenRCT2::Scripting::HookType::vehicleCrash, e, true); } } #endif @@ -587,6 +588,24 @@ void Vehicle::MoveRelativeDistance(int32_t distance) ClearFlag(VehicleFlags::MoveSingleCar | VehicleFlags::CollisionDisabled); } +void Vehicle::UpdateTrackChange() +{ + auto curRide = GetRide(); + if (curRide == nullptr) + return; + + const auto moveInfo = GetMoveInfo(); + if (moveInfo == nullptr || moveInfo->IsInvalid()) + return; + + _vehicleCurPosition = TrackLocation + + CoordsXYZ{ moveInfo->x, moveInfo->y, moveInfo->z + GetRideTypeDescriptor((*curRide).type).Heights.VehicleZOffset }; + Orientation = moveInfo->direction; + bank_rotation = moveInfo->bank_rotation; + Pitch = moveInfo->Pitch; + MoveTo(_vehicleCurPosition); +} + Vehicle* TryGetVehicle(EntityId spriteIndex) { return TryGetEntity(spriteIndex); @@ -606,10 +625,10 @@ void VehicleUpdateAll() { PROFILED_FUNCTION(); - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) return; - if ((gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) && GetGameState().EditorStep != EditorStep::RollercoasterDesigner) + if (gLegacyScene == LegacyScene::trackDesigner && getGameState().editorStep != EditorStep::RollercoasterDesigner) return; for (auto vehicle : TrainManager::View()) @@ -634,26 +653,26 @@ bool Vehicle::CloseRestraints() vehicle = GetEntity(vehicle->next_vehicle_on_train)) { if (vehicle->HasFlag(VehicleFlags::CarIsBroken) && vehicle->restraints_position != 0 - && (curRide->breakdown_reason_pending == BREAKDOWN_RESTRAINTS_STUCK_OPEN - || curRide->breakdown_reason_pending == BREAKDOWN_DOORS_STUCK_OPEN)) + && (curRide->breakdownReasonPending == BREAKDOWN_RESTRAINTS_STUCK_OPEN + || curRide->breakdownReasonPending == BREAKDOWN_DOORS_STUCK_OPEN)) { - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { - curRide->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_BROKEN_DOWN; RideBreakdownAddNewsItem(*curRide); - curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST + curRide->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; - curRide->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; + curRide->mechanicStatus = RIDE_MECHANIC_STATUS_CALLING; - Vehicle* broken_vehicle = GetEntity(curRide->vehicles[curRide->broken_vehicle]); + Vehicle* broken_vehicle = GetEntity(curRide->vehicles[curRide->brokenTrain]); if (broken_vehicle != nullptr) { - curRide->inspection_station = broken_vehicle->current_station; + curRide->inspectionStation = broken_vehicle->current_station; } - curRide->breakdown_reason = curRide->breakdown_reason_pending; + curRide->breakdownReason = curRide->breakdownReasonPending; } } else @@ -750,26 +769,26 @@ bool Vehicle::OpenRestraints() } if (vehicle->HasFlag(VehicleFlags::CarIsBroken) && vehicle->restraints_position != 0xFF - && (curRide->breakdown_reason_pending == BREAKDOWN_RESTRAINTS_STUCK_CLOSED - || curRide->breakdown_reason_pending == BREAKDOWN_DOORS_STUCK_CLOSED)) + && (curRide->breakdownReasonPending == BREAKDOWN_RESTRAINTS_STUCK_CLOSED + || curRide->breakdownReasonPending == BREAKDOWN_DOORS_STUCK_CLOSED)) { - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { - curRide->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_BROKEN_DOWN; RideBreakdownAddNewsItem(*curRide); - curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST + curRide->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; - curRide->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; + curRide->mechanicStatus = RIDE_MECHANIC_STATUS_CALLING; - Vehicle* broken_vehicle = GetEntity(curRide->vehicles[curRide->broken_vehicle]); + Vehicle* broken_vehicle = GetEntity(curRide->vehicles[curRide->brokenTrain]); if (broken_vehicle != nullptr) { - curRide->inspection_station = broken_vehicle->current_station; + curRide->inspectionStation = broken_vehicle->current_station; } - curRide->breakdown_reason = curRide->breakdown_reason_pending; + curRide->breakdownReason = curRide->breakdownReasonPending; } } else @@ -814,7 +833,7 @@ void RideUpdateMeasurementsSpecialElements_WaterCoaster(Ride& ride, const OpenRC { if (trackType >= TrackElemType::FlatCovered && trackType <= TrackElemType::RightQuarterTurn3TilesCovered) { - ride.special_track_elements |= RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; + ride.specialTrackElements |= RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; } } @@ -830,9 +849,9 @@ void Vehicle::UpdateMeasurements() if (status == Vehicle::Status::TravellingBoat) { - curRide->lifecycle_flags |= RIDE_LIFECYCLE_TESTED; - curRide->lifecycle_flags |= RIDE_LIFECYCLE_NO_RAW_STATS; - curRide->lifecycle_flags &= ~RIDE_LIFECYCLE_TEST_IN_PROGRESS; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_TESTED; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_NO_RAW_STATS; + curRide->lifecycleFlags &= ~RIDE_LIFECYCLE_TEST_IN_PROGRESS; ClearFlag(VehicleFlags::Testing); auto* windowMgr = Ui::GetWindowManager(); @@ -840,29 +859,29 @@ void Vehicle::UpdateMeasurements() return; } - if (curRide->current_test_station.IsNull()) + if (curRide->currentTestStation.IsNull()) return; - const auto& currentStation = curRide->GetStation(curRide->current_test_station); + const auto& currentStation = curRide->getStation(curRide->currentTestStation); if (!currentStation.Entrance.IsNull()) { - uint8_t test_segment = curRide->current_test_segment; + uint8_t test_segment = curRide->currentTestSegment; StationIndex stationIndex = StationIndex::FromUnderlying(test_segment); - auto& stationForTestSegment = curRide->GetStation(stationIndex); + auto& stationForTestSegment = curRide->getStation(stationIndex); - curRide->average_speed_test_timeout++; - if (curRide->average_speed_test_timeout >= 32) - curRide->average_speed_test_timeout = 0; + curRide->averageSpeedTestTimeout++; + if (curRide->averageSpeedTestTimeout >= 32) + curRide->averageSpeedTestTimeout = 0; int32_t absVelocity = abs(velocity); - if (absVelocity > curRide->max_speed) + if (absVelocity > curRide->maxSpeed) { - curRide->max_speed = absVelocity; + curRide->maxSpeed = absVelocity; } - if (curRide->average_speed_test_timeout == 0 && absVelocity > 0) + if (curRide->averageSpeedTestTimeout == 0 && absVelocity > 0) { - curRide->average_speed = AddClamp(curRide->average_speed, absVelocity); + curRide->averageSpeed = AddClamp(curRide->averageSpeed, absVelocity); stationForTestSegment.SegmentTime++; } @@ -872,37 +891,37 @@ void Vehicle::UpdateMeasurements() stationForTestSegment.SegmentLength = AddClamp(stationForTestSegment.SegmentLength, distance); } - if (curRide->GetRideTypeDescriptor().HasFlag(RtdFlag::hasGForces)) + if (curRide->getRideTypeDescriptor().HasFlag(RtdFlag::hasGForces)) { auto gForces = GetGForces(); - gForces.VerticalG += curRide->previous_vertical_g; - gForces.LateralG += curRide->previous_lateral_g; + gForces.VerticalG += curRide->previousVerticalG; + gForces.LateralG += curRide->previousLateralG; gForces.VerticalG /= 2; gForces.LateralG /= 2; - curRide->previous_vertical_g = gForces.VerticalG; - curRide->previous_lateral_g = gForces.LateralG; + curRide->previousVerticalG = gForces.VerticalG; + curRide->previousLateralG = gForces.LateralG; if (gForces.VerticalG <= 0) { curRide->totalAirTime++; } - if (gForces.VerticalG > curRide->max_positive_vertical_g) - curRide->max_positive_vertical_g = gForces.VerticalG; + if (gForces.VerticalG > curRide->maxPositiveVerticalG) + curRide->maxPositiveVerticalG = gForces.VerticalG; - if (gForces.VerticalG < curRide->max_negative_vertical_g) - curRide->max_negative_vertical_g = gForces.VerticalG; + if (gForces.VerticalG < curRide->maxNegativeVerticalG) + curRide->maxNegativeVerticalG = gForces.VerticalG; gForces.LateralG = std::abs(gForces.LateralG); - curRide->max_lateral_g = std::max(curRide->max_lateral_g, static_cast(gForces.LateralG)); + curRide->maxLateralG = std::max(curRide->maxLateralG, static_cast(gForces.LateralG)); } } // If we have already evaluated this track piece skip to next section TileCoordsXYZ curTrackLoc{ TrackLocation }; - if (curTrackLoc != curRide->CurTestTrackLocation) + if (curTrackLoc != curRide->curTestTrackLocation) { - curRide->CurTestTrackLocation = curTrackLoc; + curRide->curTestTrackLocation = curTrackLoc; if (currentStation.Entrance.IsNull()) return; @@ -910,9 +929,9 @@ void Vehicle::UpdateMeasurements() auto trackElemType = GetTrackType(); if (trackElemType == TrackElemType::PoweredLift || HasFlag(VehicleFlags::OnLiftHill)) { - if (!(curRide->testing_flags & RIDE_TESTING_POWERED_LIFT)) + if (!(curRide->testingFlags.has(RideTestingFlag::poweredLift))) { - curRide->testing_flags |= RIDE_TESTING_POWERED_LIFT; + curRide->testingFlags.set(RideTestingFlag::poweredLift); auto numPoweredLifts = curRide->getNumPoweredLifts(); if (numPoweredLifts < kRideMaxNumPoweredLiftsCount) { @@ -923,29 +942,29 @@ void Vehicle::UpdateMeasurements() } else { - curRide->testing_flags &= ~RIDE_TESTING_POWERED_LIFT; + curRide->testingFlags.unset(RideTestingFlag::poweredLift); } - const auto& rtd = curRide->GetRideTypeDescriptor(); + const auto& rtd = curRide->getRideTypeDescriptor(); rtd.UpdateMeasurementsSpecialElements(*curRide, trackElemType); switch (trackElemType) { case TrackElemType::Rapids: case TrackElemType::SpinningTunnel: - curRide->special_track_elements |= RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; + curRide->specialTrackElements |= RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; break; case TrackElemType::Waterfall: case TrackElemType::LogFlumeReverser: - curRide->special_track_elements |= RIDE_ELEMENT_REVERSER_OR_WATERFALL; + curRide->specialTrackElements |= RIDE_ELEMENT_REVERSER_OR_WATERFALL; break; case TrackElemType::Whirlpool: - curRide->special_track_elements |= RIDE_ELEMENT_WHIRLPOOL; + curRide->specialTrackElements |= RIDE_ELEMENT_WHIRLPOOL; break; case TrackElemType::Watersplash: if (velocity >= 11.0_mph) { - curRide->special_track_elements |= RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; + curRide->specialTrackElements |= RIDE_ELEMENT_TUNNEL_SPLASH_OR_RAPIDS; } default: break; @@ -953,32 +972,33 @@ void Vehicle::UpdateMeasurements() const auto& ted = GetTrackElementDescriptor(trackElemType); uint16_t trackFlags = ted.flags; - uint32_t testingFlags = curRide->testing_flags; - if (testingFlags & RIDE_TESTING_TURN_LEFT && trackFlags & TRACK_ELEM_FLAG_TURN_LEFT) + auto testingFlags = curRide->testingFlags; + if (testingFlags.has(RideTestingFlag::turnLeft) && trackFlags & TRACK_ELEM_FLAG_TURN_LEFT) { // 0x800 as this is masked to kCurrentTurnCountMask - curRide->turn_count_default += 0x800; + curRide->turnCountDefault += 0x800; } - else if (testingFlags & RIDE_TESTING_TURN_RIGHT && trackFlags & TRACK_ELEM_FLAG_TURN_RIGHT) + else if (testingFlags.has(RideTestingFlag::turnRight) && trackFlags & TRACK_ELEM_FLAG_TURN_RIGHT) { // 0x800 as this is masked to kCurrentTurnCountMask - curRide->turn_count_default += 0x800; + curRide->turnCountDefault += 0x800; } - else if (testingFlags & RIDE_TESTING_TURN_RIGHT || testingFlags & RIDE_TESTING_TURN_LEFT) + else if (testingFlags.has(RideTestingFlag::turnRight) || testingFlags.has(RideTestingFlag::turnLeft)) { - curRide->testing_flags &= ~( - RIDE_TESTING_TURN_LEFT | RIDE_TESTING_TURN_RIGHT | RIDE_TESTING_TURN_BANKED | RIDE_TESTING_TURN_SLOPED); + curRide->testingFlags.unset( + RideTestingFlag::turnLeft, RideTestingFlag::turnRight, RideTestingFlag::turnBanked, + RideTestingFlag::turnSloped); uint8_t turnType = 1; - if (!(testingFlags & RIDE_TESTING_TURN_BANKED)) + if (!(testingFlags.has(RideTestingFlag::turnBanked))) { turnType = 2; - if (!(testingFlags & RIDE_TESTING_TURN_SLOPED)) + if (!(testingFlags.has(RideTestingFlag::turnSloped))) { turnType = 0; } } - switch (curRide->turn_count_default >> 11) + switch (curRide->turnCountDefault >> 11) { case 0: IncrementTurnCount1Element(*curRide, turnType); @@ -998,94 +1018,94 @@ void Vehicle::UpdateMeasurements() { if (trackFlags & TRACK_ELEM_FLAG_TURN_LEFT) { - curRide->testing_flags |= RIDE_TESTING_TURN_LEFT; - curRide->turn_count_default &= ~kCurrentTurnCountMask; + curRide->testingFlags.set(RideTestingFlag::turnLeft); + curRide->turnCountDefault &= ~kCurrentTurnCountMask; if (trackFlags & TRACK_ELEM_FLAG_TURN_BANKED) { - curRide->testing_flags |= RIDE_TESTING_TURN_BANKED; + curRide->testingFlags.set(RideTestingFlag::turnBanked); } if (trackFlags & TRACK_ELEM_FLAG_TURN_SLOPED) { - curRide->testing_flags |= RIDE_TESTING_TURN_SLOPED; + curRide->testingFlags.set(RideTestingFlag::turnSloped); } } if (trackFlags & TRACK_ELEM_FLAG_TURN_RIGHT) { - curRide->testing_flags |= RIDE_TESTING_TURN_RIGHT; - curRide->turn_count_default &= ~kCurrentTurnCountMask; + curRide->testingFlags.set(RideTestingFlag::turnRight); + curRide->turnCountDefault &= ~kCurrentTurnCountMask; if (trackFlags & TRACK_ELEM_FLAG_TURN_BANKED) { - curRide->testing_flags |= RIDE_TESTING_TURN_BANKED; + curRide->testingFlags.set(RideTestingFlag::turnBanked); } if (trackFlags & TRACK_ELEM_FLAG_TURN_SLOPED) { - curRide->testing_flags |= RIDE_TESTING_TURN_SLOPED; + curRide->testingFlags.set(RideTestingFlag::turnSloped); } } } - if (testingFlags & RIDE_TESTING_DROP_DOWN) + if (testingFlags.has(RideTestingFlag::dropDown)) { if (velocity < 0 || !(trackFlags & TRACK_ELEM_FLAG_DOWN)) { - curRide->testing_flags &= ~RIDE_TESTING_DROP_DOWN; + curRide->testingFlags.unset(RideTestingFlag::dropDown); - int16_t curZ = z / kCoordsZStep - curRide->start_drop_height; + int16_t curZ = z / kCoordsZStep - curRide->startDropHeight; if (curZ < 0) { curZ = abs(curZ); - if (curZ > curRide->highest_drop_height) + if (curZ > curRide->highestDropHeight) { - curRide->highest_drop_height = static_cast(curZ); + curRide->highestDropHeight = static_cast(curZ); } } } } else if (trackFlags & TRACK_ELEM_FLAG_DOWN && velocity >= 0) { - curRide->testing_flags &= ~RIDE_TESTING_DROP_UP; - curRide->testing_flags |= RIDE_TESTING_DROP_DOWN; + curRide->testingFlags.unset(RideTestingFlag::dropUp); + curRide->testingFlags.set(RideTestingFlag::dropDown); uint8_t drops = curRide->getNumDrops(); if (drops < kRideMaxDropsCount) drops++; curRide->setNumDrops(drops); - curRide->start_drop_height = z / kCoordsZStep; - testingFlags &= ~RIDE_TESTING_DROP_UP; + curRide->startDropHeight = z / kCoordsZStep; + testingFlags.unset(RideTestingFlag::dropUp); } - if (testingFlags & RIDE_TESTING_DROP_UP) + if (testingFlags.has(RideTestingFlag::dropUp)) { if (velocity > 0 || !(trackFlags & TRACK_ELEM_FLAG_UP)) { - curRide->testing_flags &= ~RIDE_TESTING_DROP_UP; + curRide->testingFlags.unset(RideTestingFlag::dropUp); - int16_t curZ = z / kCoordsZStep - curRide->start_drop_height; + int16_t curZ = z / kCoordsZStep - curRide->startDropHeight; if (curZ < 0) { curZ = abs(curZ); - if (curZ > curRide->highest_drop_height) + if (curZ > curRide->highestDropHeight) { - curRide->highest_drop_height = static_cast(curZ); + curRide->highestDropHeight = static_cast(curZ); } } } } else if (trackFlags & TRACK_ELEM_FLAG_UP && velocity <= 0) { - curRide->testing_flags &= ~RIDE_TESTING_DROP_DOWN; - curRide->testing_flags |= RIDE_TESTING_DROP_UP; + curRide->testingFlags.unset(RideTestingFlag::dropDown); + curRide->testingFlags.set(RideTestingFlag::dropUp); auto drops = curRide->getNumDrops(); if (drops != kRideMaxDropsCount) drops++; curRide->setNumDrops(drops); - curRide->start_drop_height = z / kCoordsZStep; + curRide->startDropHeight = z / kCoordsZStep; } if (trackFlags & TRACK_ELEM_FLAG_HELIX) @@ -1094,8 +1114,8 @@ void Vehicle::UpdateMeasurements() if (helixes != OpenRCT2::Limits::kMaxHelices) helixes++; - curRide->special_track_elements &= ~0x1F; - curRide->special_track_elements |= helixes; + curRide->specialTrackElements &= ~0x1F; + curRide->specialTrackElements |= helixes; } } @@ -1104,7 +1124,7 @@ void Vehicle::UpdateMeasurements() if (x == kLocationNull) { - curRide->testing_flags &= ~RIDE_TESTING_SHELTERED; + curRide->testingFlags.unset(RideTestingFlag::sheltered); return; } @@ -1154,25 +1174,25 @@ void Vehicle::UpdateMeasurements() if (!coverFound) { - curRide->testing_flags &= ~RIDE_TESTING_SHELTERED; + curRide->testingFlags.unset(RideTestingFlag::sheltered); return; } } - if (!(curRide->testing_flags & RIDE_TESTING_SHELTERED)) + if (!(curRide->testingFlags.has(RideTestingFlag::sheltered))) { - curRide->testing_flags |= RIDE_TESTING_SHELTERED; + curRide->testingFlags.set(RideTestingFlag::sheltered); - curRide->IncreaseNumShelteredSections(); + curRide->increaseNumShelteredSections(); if (Pitch != 0) { - curRide->num_sheltered_sections |= ShelteredSectionsBits::kRotatingWhileSheltered; + curRide->numShelteredSections |= ShelteredSectionsBits::kRotatingWhileSheltered; } if (bank_rotation != 0) { - curRide->num_sheltered_sections |= ShelteredSectionsBits::kBankingWhileSheltered; + curRide->numShelteredSections |= ShelteredSectionsBits::kBankingWhileSheltered; } } @@ -1180,7 +1200,7 @@ void Vehicle::UpdateMeasurements() if (distance < 0) return; - curRide->sheltered_length = AddClamp(curRide->sheltered_length, distance); + curRide->shelteredLength = AddClamp(curRide->shelteredLength, distance); } struct SoundIdVolume @@ -1257,11 +1277,11 @@ void Vehicle::Update() UpdateMeasurements(); _vehicleBreakdown = 255; - if (curRide->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) + if (curRide->lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) { - _vehicleBreakdown = curRide->breakdown_reason_pending; + _vehicleBreakdown = curRide->breakdownReasonPending; auto carEntry = &rideEntry->Cars[vehicle_type]; - if ((carEntry->flags & CAR_ENTRY_FLAG_POWERED) && curRide->breakdown_reason_pending == BREAKDOWN_SAFETY_CUT_OUT) + if ((carEntry->flags & CAR_ENTRY_FLAG_POWERED) && curRide->breakdownReasonPending == BREAKDOWN_SAFETY_CUT_OUT) { if (!(carEntry->flags & CAR_ENTRY_FLAG_WATER_RIDE) || (Pitch == 2 && velocity <= 2.0_mph)) { @@ -1360,10 +1380,10 @@ void Vehicle::UpdateMovingToEndOfStation() switch (curRide->mode) { - case RideMode::UpwardLaunch: - case RideMode::RotatingLift: - case RideMode::DownwardLaunch: - case RideMode::FreefallDrop: + case RideMode::upwardLaunch: + case RideMode::rotatingLift: + case RideMode::downwardLaunch: + case RideMode::freefallDrop: if (velocity >= -131940) { acceleration = -3298; @@ -1377,23 +1397,23 @@ void Vehicle::UpdateMovingToEndOfStation() if (!(curFlags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_5)) break; [[fallthrough]]; - case RideMode::Dodgems: - case RideMode::Swing: - case RideMode::Rotation: - case RideMode::ForwardRotation: - case RideMode::BackwardRotation: - case RideMode::FilmAvengingAviators: - case RideMode::FilmThrillRiders: - case RideMode::Beginners: - case RideMode::Intense: - case RideMode::Berserk: - case RideMode::MouseTails3DFilm: - case RideMode::StormChasers3DFilm: - case RideMode::SpaceRaiders3DFilm: - case RideMode::SpaceRings: - case RideMode::HauntedHouse: - case RideMode::CrookedHouse: - case RideMode::Circus: + case RideMode::dodgems: + case RideMode::swing: + case RideMode::rotation: + case RideMode::forwardRotation: + case RideMode::backwardRotation: + case RideMode::filmAvengingAviators: + case RideMode::filmThrillRiders: + case RideMode::beginners: + case RideMode::intense: + case RideMode::berserk: + case RideMode::mouseTails3DFilm: + case RideMode::stormChasers3DFilm: + case RideMode::spaceRaiders3DFilm: + case RideMode::spaceRings: + case RideMode::hauntedHouse: + case RideMode::crookedHouse: + case RideMode::circus: current_station = StationIndex::FromUnderlying(0); velocity = 0; acceleration = 0; @@ -1430,7 +1450,7 @@ void Vehicle::UpdateMovingToEndOfStation() acceleration = 0; sub_state++; - if (curRide->mode == RideMode::Race && sub_state >= 40) + if (curRide->mode == RideMode::race && sub_state >= 40) { SetState(Vehicle::Status::WaitingForPassengers); break; @@ -1469,30 +1489,30 @@ void Vehicle::TrainReadyToDepart(uint8_t num_peeps_on_train, uint8_t num_used_se if (curRide == nullptr) return; - if (curRide->status == RideStatus::Open && !(curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (curRide->status == RideStatus::open && !(curRide->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) && !HasFlag(VehicleFlags::ReadyToDepart)) { return; } - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { // Original code did not check if the ride was a boat hire, causing empty boats to leave the platform when closing a // Boat Hire with passengers on it. - if (curRide->status != RideStatus::Closed || (curRide->num_riders != 0 && curRide->type != RIDE_TYPE_BOAT_HIRE)) + if (curRide->status != RideStatus::closed || (curRide->numRiders != 0 && curRide->type != RIDE_TYPE_BOAT_HIRE)) { - curRide->GetStation(current_station).TrainAtStation = RideStation::kNoTrain; + curRide->getStation(current_station).TrainAtStation = RideStation::kNoTrain; sub_state = 2; return; } } - if (curRide->mode == RideMode::ForwardRotation || curRide->mode == RideMode::BackwardRotation) + if (curRide->mode == RideMode::forwardRotation || curRide->mode == RideMode::backwardRotation) { uint8_t seat = ((-Pitch) / 8) & 0xF; if (!peep[seat].IsNull()) { - curRide->GetStation(current_station).TrainAtStation = RideStation::kNoTrain; + curRide->getStation(current_station).TrainAtStation = RideStation::kNoTrain; SetState(Vehicle::Status::UnloadingPassengers); return; } @@ -1500,7 +1520,7 @@ void Vehicle::TrainReadyToDepart(uint8_t num_peeps_on_train, uint8_t num_used_se if (num_peeps == 0) return; - curRide->GetStation(current_station).TrainAtStation = RideStation::kNoTrain; + curRide->getStation(current_station).TrainAtStation = RideStation::kNoTrain; sub_state = 2; return; } @@ -1508,7 +1528,7 @@ void Vehicle::TrainReadyToDepart(uint8_t num_peeps_on_train, uint8_t num_used_se if (num_peeps_on_train == 0) return; - curRide->GetStation(current_station).TrainAtStation = RideStation::kNoTrain; + curRide->getStation(current_station).TrainAtStation = RideStation::kNoTrain; SetState(Vehicle::Status::WaitingForPassengers); } @@ -1518,7 +1538,7 @@ static std::optional ride_get_train_index_from_vehicle(const Ride& rid while (ride.vehicles[trainIndex] != spriteIndex) { trainIndex++; - if (trainIndex >= ride.NumTrains) + if (trainIndex >= ride.numTrains) { // This should really return nullopt, but doing so // would break some hacked parks that hide track by setting tracked rides' @@ -1550,7 +1570,7 @@ void Vehicle::UpdateWaitingForPassengers() if (!OpenRestraints()) return; - auto& station = curRide->GetStation(current_station); + auto& station = curRide->getStation(current_station); if (station.Entrance.IsNull()) { station.TrainAtStation = RideStation::kNoTrain; @@ -1594,7 +1614,7 @@ void Vehicle::UpdateWaitingForPassengers() num_seats_on_train &= 0x7F; - if (curRide->SupportsStatus(RideStatus::Testing)) + if (curRide->supportsStatus(RideStatus::testing)) { if (time_waiting < 20) { @@ -1611,19 +1631,19 @@ void Vehicle::UpdateWaitingForPassengers() } } - if (curRide->GetRideTypeDescriptor().HasFlag(RtdFlag::hasLoadOptions)) + if (curRide->getRideTypeDescriptor().HasFlag(RtdFlag::hasLoadOptions)) { - if (curRide->depart_flags & RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH) + if (curRide->departFlags & RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH) { - if (curRide->min_waiting_time * 32 > time_waiting) + if (curRide->minWaitingTime * 32 > time_waiting) { TrainReadyToDepart(num_peeps_on_train, num_used_seats_on_train); return; } } - if (curRide->depart_flags & RIDE_DEPART_WAIT_FOR_MAXIMUM_LENGTH) + if (curRide->departFlags & RIDE_DEPART_WAIT_FOR_MAXIMUM_LENGTH) { - if (curRide->max_waiting_time * 32 < time_waiting) + if (curRide->maxWaitingTime * 32 < time_waiting) { SetFlag(VehicleFlags::ReadyToDepart); TrainReadyToDepart(num_peeps_on_train, num_used_seats_on_train); @@ -1632,7 +1652,7 @@ void Vehicle::UpdateWaitingForPassengers() } } - if (curRide->depart_flags & RIDE_DEPART_LEAVE_WHEN_ANOTHER_ARRIVES) + if (curRide->departFlags & RIDE_DEPART_LEAVE_WHEN_ANOTHER_ARRIVES) { for (auto train_id : curRide->vehicles) { @@ -1656,8 +1676,8 @@ void Vehicle::UpdateWaitingForPassengers() } } - if (curRide->GetRideTypeDescriptor().HasFlag(RtdFlag::hasLoadOptions) - && curRide->depart_flags & RIDE_DEPART_WAIT_FOR_LOAD) + if (curRide->getRideTypeDescriptor().HasFlag(RtdFlag::hasLoadOptions) + && curRide->departFlags & RIDE_DEPART_WAIT_FOR_LOAD) { if (num_peeps_on_train == num_seats_on_train) { @@ -1667,7 +1687,7 @@ void Vehicle::UpdateWaitingForPassengers() } // any load: load=4 , full: load=3 , 3/4s: load=2 , half: load=1 , quarter: load=0 - uint8_t load = curRide->depart_flags & RIDE_DEPART_WAIT_FOR_LOAD_MASK; + uint8_t load = curRide->departFlags & RIDE_DEPART_WAIT_FOR_LOAD_MASK; // We want to wait for ceiling((load+1)/4 * num_seats_on_train) peeps, the +3 below is used instead of // ceil() to prevent issues on different cpus/platforms with floats. Note that vanilla RCT1/2 rounded @@ -1695,7 +1715,7 @@ void Vehicle::UpdateWaitingForPassengers() velocity = 0; ClearFlag(VehicleFlags::WaitingOnAdjacentStation); - if (curRide->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) + if (curRide->departFlags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) { SetFlag(VehicleFlags::WaitingOnAdjacentStation); } @@ -1735,7 +1755,7 @@ void Vehicle::UpdateDodgemsMode() TimeActive++; } - if (curRide->lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) + if (curRide->lifecycleFlags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) return; // Mark the dodgem as not in use. @@ -1756,12 +1776,12 @@ void Vehicle::UpdateWaitingToDepart() if (curRide == nullptr) return; - const auto& currentStation = curRide->GetStation(current_station); + const auto& currentStation = curRide->getStation(current_station); bool shouldBreak = false; - if (curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (curRide->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) { - switch (curRide->breakdown_reason_pending) + switch (curRide->breakdownReasonPending) { case BREAKDOWN_RESTRAINTS_STUCK_CLOSED: case BREAKDOWN_RESTRAINTS_STUCK_OPEN: @@ -1775,9 +1795,9 @@ void Vehicle::UpdateWaitingToDepart() } bool skipCheck = false; - if (shouldBreak || curRide->status != RideStatus::Open) + if (shouldBreak || curRide->status != RideStatus::open) { - if (curRide->mode == RideMode::ForwardRotation || curRide->mode == RideMode::BackwardRotation) + if (curRide->mode == RideMode::forwardRotation || curRide->mode == RideMode::backwardRotation) { uint8_t seat = ((-Pitch) >> 3) & 0xF; if (peep[seat * 2].IsNull()) @@ -1820,9 +1840,9 @@ void Vehicle::UpdateWaitingToDepart() return; } - if (curRide->GetRideTypeDescriptor().HasFlag(RtdFlag::canSynchroniseWithAdjacentStations)) + if (curRide->getRideTypeDescriptor().HasFlag(RtdFlag::canSynchroniseWithAdjacentStations)) { - if (curRide->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) + if (curRide->departFlags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS) { if (HasFlag(VehicleFlags::WaitingOnAdjacentStation)) { @@ -1836,7 +1856,7 @@ void Vehicle::UpdateWaitingToDepart() SetState(Vehicle::Status::Departing); - if (curRide->lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT) + if (curRide->lifecycleFlags & RIDE_LIFECYCLE_CABLE_LIFT) { CoordsXYE track; int32_t zUnused; @@ -1854,48 +1874,48 @@ void Vehicle::UpdateWaitingToDepart() switch (curRide->mode) { - case RideMode::Dodgems: + case RideMode::dodgems: // Dodgems mode uses sub_state and TimeActive to tell how long // the vehicle has been ridden. SetState(Vehicle::Status::TravellingDodgems); TimeActive = 0; UpdateDodgemsMode(); break; - case RideMode::Swing: + case RideMode::swing: SetState(Vehicle::Status::Swinging); NumSwings = 0; current_time = -1; UpdateSwinging(); break; - case RideMode::Rotation: + case RideMode::rotation: SetState(Vehicle::Status::Rotating); NumRotations = 0; current_time = -1; UpdateRotating(); break; - case RideMode::FilmAvengingAviators: + case RideMode::filmAvengingAviators: SetState(Vehicle::Status::SimulatorOperating); current_time = -1; UpdateSimulatorOperating(); break; - case RideMode::FilmThrillRiders: + case RideMode::filmThrillRiders: SetState(Vehicle::Status::SimulatorOperating, 1); current_time = -1; UpdateSimulatorOperating(); break; - case RideMode::Beginners: - case RideMode::Intense: - case RideMode::Berserk: + case RideMode::beginners: + case RideMode::intense: + case RideMode::berserk: SetState(Vehicle::Status::TopSpinOperating, sub_state); switch (curRide->mode) { - case RideMode::Beginners: + case RideMode::beginners: sub_state = 0; break; - case RideMode::Intense: + case RideMode::intense: sub_state = 1; break; - case RideMode::Berserk: + case RideMode::berserk: sub_state = 2; break; default: @@ -1909,27 +1929,27 @@ void Vehicle::UpdateWaitingToDepart() bank_rotation = 0; UpdateTopSpinOperating(); break; - case RideMode::ForwardRotation: - case RideMode::BackwardRotation: + case RideMode::forwardRotation: + case RideMode::backwardRotation: SetState(Vehicle::Status::FerrisWheelRotating, Pitch); NumRotations = 0; ferris_wheel_var_0 = 8; ferris_wheel_var_1 = 8; UpdateFerrisWheelRotating(); break; - case RideMode::MouseTails3DFilm: - case RideMode::StormChasers3DFilm: - case RideMode::SpaceRaiders3DFilm: + case RideMode::mouseTails3DFilm: + case RideMode::stormChasers3DFilm: + case RideMode::spaceRaiders3DFilm: SetState(Vehicle::Status::ShowingFilm, sub_state); switch (curRide->mode) { - case RideMode::MouseTails3DFilm: + case RideMode::mouseTails3DFilm: sub_state = 0; break; - case RideMode::StormChasers3DFilm: + case RideMode::stormChasers3DFilm: sub_state = 1; break; - case RideMode::SpaceRaiders3DFilm: + case RideMode::spaceRaiders3DFilm: sub_state = 2; break; default: @@ -1941,24 +1961,24 @@ void Vehicle::UpdateWaitingToDepart() current_time = -1; UpdateShowingFilm(); break; - case RideMode::Circus: + case RideMode::circus: SetState(Vehicle::Status::DoingCircusShow); current_time = -1; UpdateDoingCircusShow(); break; - case RideMode::SpaceRings: + case RideMode::spaceRings: SetState(Vehicle::Status::SpaceRingsOperating); Pitch = 0; current_time = -1; UpdateSpaceRingsOperating(); break; - case RideMode::HauntedHouse: + case RideMode::hauntedHouse: SetState(Vehicle::Status::HauntedHouseOperating); Pitch = 0; current_time = -1; UpdateHauntedHouseOperating(); break; - case RideMode::CrookedHouse: + case RideMode::crookedHouse: SetState(Vehicle::Status::CrookedHouseOperating); Pitch = 0; current_time = -1; @@ -2008,7 +2028,7 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) auto rideIndex = tileElement->AsTrack()->GetRideIndex(); auto ride = GetRide(rideIndex); - if (ride == nullptr || !(ride->depart_flags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) + if (ride == nullptr || !(ride->departFlags & RIDE_DEPART_SYNCHRONISE_WITH_ADJACENT_STATIONS)) { /* Ride is not set to synchronise with adjacent stations. */ return false; @@ -2029,20 +2049,20 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) /* Ride vehicles are not on the track (e.g. ride is/was under * construction), so just return; vehicle_id for this station * is SPRITE_INDEX_NULL. */ - if (!(ride->lifecycle_flags & RIDE_LIFECYCLE_ON_TRACK)) + if (!(ride->lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK)) { return true; } /* Station is not ready to depart, so just return; * vehicle_id for this station is SPRITE_INDEX_NULL. */ - if (!(ride->GetStation(stationIndex).Depart & kStationDepartFlag)) + if (!(ride->getStation(stationIndex).Depart & kStationDepartFlag)) { return true; } // Look for a vehicle on this station waiting to depart. - for (int32_t i = 0; i < ride->NumTrains; i++) + for (int32_t i = 0; i < ride->numTrains; i++) { auto* vehicle = GetEntity(ride->vehicles[i]); if (vehicle == nullptr) @@ -2090,7 +2110,7 @@ static bool try_add_synchronised_station(const CoordsXYZ& coords) */ static bool ride_station_can_depart_synchronised(const Ride& ride, StationIndex stationIndex) { - const auto& station = ride.GetStation(stationIndex); + const auto& station = ride.getStation(stationIndex); auto location = station.GetStart(); auto tileElement = MapGetTrackElementAt(location); @@ -2153,13 +2173,13 @@ static bool ride_station_can_depart_synchronised(const Ride& ride, StationIndex { Ride* sv_ride = GetRide(sv->ride_id); - if (!(sv_ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)) + if (!(sv_ride->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN)) { - if (sv_ride->status != RideStatus::Closed) + if (sv_ride->status != RideStatus::closed) { - if (sv_ride->IsBlockSectioned()) + if (sv_ride->isBlockSectioned()) { - if (!(sv_ride->GetStation(sv->stationIndex).Depart & kStationDepartFlag)) + if (!(sv_ride->getStation(sv->stationIndex).Depart & kStationDepartFlag)) { sv = _synchronisedVehicles; RideId rideId = RideId::GetNull(); @@ -2180,7 +2200,7 @@ static bool ride_station_can_depart_synchronised(const Ride& ride, StationIndex auto curRide = GetRide(rideId); if (curRide != nullptr) { - for (int32_t i = 0; i < curRide->NumTrains; i++) + for (int32_t i = 0; i < curRide->numTrains; i++) { Vehicle* v = GetEntity(curRide->vehicles[i]); if (v == nullptr) @@ -2218,7 +2238,7 @@ static bool ride_station_can_depart_synchronised(const Ride& ride, StationIndex int32_t numTrainsAtStation = 0; int32_t numTravelingTrains = 0; auto currentStation = sv->stationIndex; - for (int32_t i = 0; i < sv_ride->NumTrains; i++) + for (int32_t i = 0; i < sv_ride->numTrains; i++) { auto* otherVehicle = GetEntity(sv_ride->vehicles[i]); if (otherVehicle == nullptr) @@ -2243,9 +2263,9 @@ static bool ride_station_can_depart_synchronised(const Ride& ride, StationIndex } int32_t totalTrains = numTrainsAtStation + numTravelingTrains; - if (totalTrains != sv_ride->NumTrains || numTravelingTrains >= sv_ride->NumTrains / 2) + if (totalTrains != sv_ride->numTrains || numTravelingTrains >= sv_ride->numTrains / 2) { - // if (numArrivingTrains > 0 || numTravelingTrains >= sv_ride->NumTrains / 2) { + // if (numArrivingTrains > 0 || numTravelingTrains >= sv_ride->numTrains / 2) { /* Sync condition: If there are trains arriving at the * station or half or more of the ride trains are * travelling, this station must be sync-ed before the @@ -2309,11 +2329,11 @@ void Vehicle::PeepEasterEggHereWeAre() const */ static void test_finish(Ride& ride) { - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_TEST_IN_PROGRESS; - ride.lifecycle_flags |= RIDE_LIFECYCLE_TESTED; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_TEST_IN_PROGRESS; + ride.lifecycleFlags |= RIDE_LIFECYCLE_TESTED; - auto rideStations = ride.GetStations(); - for (int32_t i = ride.num_stations - 1; i >= 1; i--) + auto rideStations = ride.getStations(); + for (int32_t i = ride.numStations - 1; i >= 1; i--) { if (rideStations[i - 1].SegmentTime != 0) continue; @@ -2328,13 +2348,13 @@ static void test_finish(Ride& ride) } uint32_t totalTime = 0; - for (uint8_t i = 0; i < ride.num_stations; ++i) + for (uint8_t i = 0; i < ride.numStations; ++i) { totalTime += rideStations[i].SegmentTime; } totalTime = std::max(totalTime, 1u); - ride.average_speed = ride.average_speed / totalTime; + ride.averageSpeed = ride.averageSpeed / totalTime; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); @@ -2355,38 +2375,38 @@ void Vehicle::UpdateTestFinish() */ static void test_reset(Ride& ride, StationIndex curStation) { - ride.lifecycle_flags |= RIDE_LIFECYCLE_TEST_IN_PROGRESS; - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_NO_RAW_STATS; - ride.max_speed = 0; - ride.average_speed = 0; - ride.current_test_segment = 0; - ride.average_speed_test_timeout = 0; - ride.max_positive_vertical_g = MakeFixed16_2dp(1, 0); - ride.max_negative_vertical_g = MakeFixed16_2dp(1, 0); - ride.max_lateral_g = 0; - ride.previous_vertical_g = 0; - ride.previous_lateral_g = 0; - ride.testing_flags = 0; - ride.CurTestTrackLocation.SetNull(); - ride.turn_count_default = 0; - ride.turn_count_banked = 0; - ride.turn_count_sloped = 0; + ride.lifecycleFlags |= RIDE_LIFECYCLE_TEST_IN_PROGRESS; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_NO_RAW_STATS; + ride.maxSpeed = 0; + ride.averageSpeed = 0; + ride.currentTestSegment = 0; + ride.averageSpeedTestTimeout = 0; + ride.maxPositiveVerticalG = MakeFixed16_2dp(1, 0); + ride.maxNegativeVerticalG = MakeFixed16_2dp(1, 0); + ride.maxLateralG = 0; + ride.previousVerticalG = 0; + ride.previousLateralG = 0; + ride.testingFlags.clearAll(); + ride.curTestTrackLocation.SetNull(); + ride.turnCountDefault = 0; + ride.turnCountBanked = 0; + ride.turnCountSloped = 0; ride.inversions = 0; ride.holes = 0; - ride.sheltered_eighths = 0; + ride.shelteredEighths = 0; ride.dropsPoweredLifts = 0; - ride.sheltered_length = 0; - ride.var_11C = 0; - ride.num_sheltered_sections = 0; - ride.highest_drop_height = 0; - ride.special_track_elements = 0; - for (auto& station : ride.GetStations()) + ride.shelteredLength = 0; + ride.var11C = 0; + ride.numShelteredSections = 0; + ride.highestDropHeight = 0; + ride.specialTrackElements = 0; + for (auto& station : ride.getStations()) { station.SegmentLength = 0; station.SegmentTime = 0; } ride.totalAirTime = 0; - ride.current_test_station = curStation; + ride.currentTestStation = curStation; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); @@ -2468,9 +2488,9 @@ void Vehicle::UpdateDepartingBoatHire() if (curRide == nullptr) return; - auto& station = curRide->GetStation(current_station); + auto& station = curRide->getStation(current_station); station.Depart &= kStationDepartFlag; - uint8_t waitingTime = std::max(curRide->min_waiting_time, static_cast(3)); + uint8_t waitingTime = std::max(curRide->minWaitingTime, static_cast(3)); waitingTime = std::min(waitingTime, static_cast(127)); station.Depart |= waitingTime; UpdateTravellingBoatHireSetup(); @@ -2494,17 +2514,17 @@ void Vehicle::UpdateDeparting() { if (HasFlag(VehicleFlags::TrainIsBroken)) { - if (curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (curRide->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) return; - curRide->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_BROKEN_DOWN; RideBreakdownAddNewsItem(*curRide); - curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST + curRide->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; - curRide->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; - curRide->inspection_station = current_station; - curRide->breakdown_reason = curRide->breakdown_reason_pending; + curRide->mechanicStatus = RIDE_MECHANIC_STATUS_CALLING; + curRide->inspectionStation = current_station; + curRide->breakdownReason = curRide->breakdownReasonPending; velocity = 0; return; } @@ -2520,26 +2540,26 @@ void Vehicle::UpdateDeparting() OpenRCT2::Audio::Play3D(soundId, GetLocation()); } - if (curRide->mode == RideMode::UpwardLaunch || (curRide->mode == RideMode::DownwardLaunch && NumLaunches > 1)) + if (curRide->mode == RideMode::upwardLaunch || (curRide->mode == RideMode::downwardLaunch && NumLaunches > 1)) { OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::RideLaunch2, GetLocation()); } - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_TESTED)) { if (HasFlag(VehicleFlags::Testing)) { - if (curRide->current_test_segment + 1 < curRide->num_stations) + if (curRide->currentTestSegment + 1 < curRide->numStations) { - curRide->current_test_segment++; - curRide->current_test_station = current_station; + curRide->currentTestSegment++; + curRide->currentTestStation = current_station; } else { UpdateTestFinish(); } } - else if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TEST_IN_PROGRESS) && !IsGhost()) + else if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_TEST_IN_PROGRESS) && !IsGhost()) { TestReset(); } @@ -2547,24 +2567,24 @@ void Vehicle::UpdateDeparting() } const auto& carEntry = rideEntry->Cars[vehicle_type]; - const auto& rtd = curRide->GetRideTypeDescriptor(); + const auto& rtd = curRide->getRideTypeDescriptor(); switch (curRide->mode) { - case RideMode::ReverseInclineLaunchedShuttle: + case RideMode::reverseInclineLaunchedShuttle: if (velocity >= -131940) acceleration = -3298; break; - case RideMode::PoweredLaunchPasstrough: - case RideMode::PoweredLaunch: - case RideMode::PoweredLaunchBlockSectioned: - case RideMode::LimPoweredLaunch: - case RideMode::UpwardLaunch: - if ((curRide->launch_speed << 16) > velocity) + case RideMode::poweredLaunchPasstrough: + case RideMode::poweredLaunch: + case RideMode::poweredLaunchBlockSectioned: + case RideMode::limPoweredLaunch: + case RideMode::upwardLaunch: + if ((curRide->launchSpeed << 16) > velocity) { - acceleration = curRide->launch_speed << rtd.BoosterSettings.AccelerationFactor; + acceleration = curRide->launchSpeed << rtd.BoosterSettings.AccelerationFactor; } break; - case RideMode::DownwardLaunch: + case RideMode::downwardLaunch: if (NumLaunches >= 1) { if ((14 << 16) > velocity) @@ -2572,11 +2592,11 @@ void Vehicle::UpdateDeparting() break; } [[fallthrough]]; - case RideMode::ContinuousCircuit: - case RideMode::ContinuousCircuitBlockSectioned: - case RideMode::RotatingLift: - case RideMode::FreefallDrop: - case RideMode::BoatHire: + case RideMode::continuousCircuit: + case RideMode::continuousCircuitBlockSectioned: + case RideMode::rotatingLift: + case RideMode::freefallDrop: + case RideMode::boatHire: if (carEntry.flags & CAR_ENTRY_FLAG_POWERED) break; @@ -2594,7 +2614,7 @@ void Vehicle::UpdateDeparting() if (curFlags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_8) { - if (curRide->mode == RideMode::ReverseInclineLaunchedShuttle) + if (curRide->mode == RideMode::reverseInclineLaunchedShuttle) { velocity = -velocity; FinishDeparting(); @@ -2604,18 +2624,18 @@ void Vehicle::UpdateDeparting() if (curFlags & (VEHICLE_UPDATE_MOTION_TRACK_FLAG_5 | VEHICLE_UPDATE_MOTION_TRACK_FLAG_12)) { - if (curRide->mode == RideMode::BoatHire) + if (curRide->mode == RideMode::boatHire) { UpdateDepartingBoatHire(); return; } - if (curRide->mode == RideMode::ReverseInclineLaunchedShuttle) + if (curRide->mode == RideMode::reverseInclineLaunchedShuttle) { velocity = -velocity; FinishDeparting(); return; } - if (curRide->mode == RideMode::Shuttle) + if (curRide->mode == RideMode::shuttle) { Flags ^= VehicleFlags::PoweredCarInReverse; velocity = 0; @@ -2628,9 +2648,9 @@ void Vehicle::UpdateDeparting() if (curFlags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_ON_LIFT_HILL) { sound2_flags |= VEHICLE_SOUND2_FLAGS_LIFT_HILL; - if (curRide->mode != RideMode::ReverseInclineLaunchedShuttle) + if (curRide->mode != RideMode::reverseInclineLaunchedShuttle) { - int32_t curSpeed = curRide->lift_hill_speed * 31079; + int32_t curSpeed = curRide->liftHillSpeed * 31079; if (velocity <= curSpeed) { acceleration = 15539; @@ -2648,7 +2668,7 @@ void Vehicle::UpdateDeparting() } else { - int32_t curSpeed = curRide->lift_hill_speed * -31079; + int32_t curSpeed = curRide->liftHillSpeed * -31079; if (velocity >= curSpeed) { acceleration = -15539; @@ -2666,14 +2686,14 @@ void Vehicle::UpdateDeparting() } } - if (curRide->mode == RideMode::FreefallDrop) + if (curRide->mode == RideMode::freefallDrop) { animation_frame++; } else { bool shouldLaunch = true; - if (curRide->mode == RideMode::DownwardLaunch) + if (curRide->mode == RideMode::downwardLaunch) { if (NumLaunches < 1) shouldLaunch = false; @@ -2689,8 +2709,8 @@ void Vehicle::UpdateDeparting() if (!(curFlags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_5)) return; - if (curRide->mode == RideMode::BoatHire || curRide->mode == RideMode::RotatingLift - || curRide->mode == RideMode::Shuttle) + if (curRide->mode == RideMode::boatHire || curRide->mode == RideMode::rotatingLift + || curRide->mode == RideMode::shuttle) return; UpdateCrashSetup(); @@ -2700,7 +2720,7 @@ void Vehicle::UpdateDeparting() if (!CurrentTowerElementIsTop()) { - if (curRide->mode == RideMode::FreefallDrop) + if (curRide->mode == RideMode::freefallDrop) Invalidate(); return; } @@ -2723,7 +2743,7 @@ void Vehicle::FinishDeparting() if (curRide == nullptr) return; - if (curRide->mode == RideMode::DownwardLaunch) + if (curRide->mode == RideMode::downwardLaunch) { if (NumLaunches >= 1 && (14 << 16) > velocity) return; @@ -2731,22 +2751,22 @@ void Vehicle::FinishDeparting() OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::RideLaunch1, GetLocation()); } - if (curRide->mode == RideMode::UpwardLaunch) + if (curRide->mode == RideMode::upwardLaunch) { - if ((curRide->launch_speed << 16) > velocity) + if ((curRide->launchSpeed << 16) > velocity) return; OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::RideLaunch1, GetLocation()); } - if (curRide->mode != RideMode::Race && !curRide->IsBlockSectioned()) + if (curRide->mode != RideMode::race && !curRide->isBlockSectioned()) { - auto& currentStation = curRide->GetStation(current_station); + auto& currentStation = curRide->getStation(current_station); currentStation.Depart &= kStationDepartFlag; uint8_t waitingTime = 3; - if (curRide->depart_flags & RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH) + if (curRide->departFlags & RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH) { - waitingTime = std::max(curRide->min_waiting_time, static_cast(3)); + waitingTime = std::max(curRide->minWaitingTime, static_cast(3)); waitingTime = std::min(waitingTime, static_cast(127)); } @@ -2768,17 +2788,17 @@ void Vehicle::CheckIfMissing() if (curRide == nullptr) return; - if (curRide->lifecycle_flags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) + if (curRide->lifecycleFlags & (RIDE_LIFECYCLE_BROKEN_DOWN | RIDE_LIFECYCLE_CRASHED)) return; - if (curRide->IsBlockSectioned()) + if (curRide->isBlockSectioned()) return; - if (!curRide->GetRideTypeDescriptor().HasFlag(RtdFlag::checkForStalling)) + if (!curRide->getRideTypeDescriptor().HasFlag(RtdFlag::checkForStalling)) return; lost_time_out++; - if (curRide->lifecycle_flags & RIDE_LIFECYCLE_HAS_STALLED_VEHICLE) + if (curRide->lifecycleFlags & RIDE_LIFECYCLE_HAS_STALLED_VEHICLE) return; uint16_t limit = curRide->type == RIDE_TYPE_BOAT_HIRE ? 15360 : 9600; @@ -2786,7 +2806,7 @@ void Vehicle::CheckIfMissing() if (lost_time_out <= limit) return; - curRide->lifecycle_flags |= RIDE_LIFECYCLE_HAS_STALLED_VEHICLE; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_HAS_STALLED_VEHICLE; if (Config::Get().notifications.RideStalledVehicles) { @@ -2794,13 +2814,13 @@ void Vehicle::CheckIfMissing() ft.Add(GetRideComponentName(GetRideTypeDescriptor(curRide->type).NameConvention.vehicle).number); uint8_t vehicleIndex = 0; - for (; vehicleIndex < curRide->NumTrains; ++vehicleIndex) + for (; vehicleIndex < curRide->numTrains; ++vehicleIndex) if (curRide->vehicles[vehicleIndex] == Id) break; vehicleIndex++; ft.Add(vehicleIndex); - curRide->FormatNameTo(ft); + curRide->formatNameTo(ft); ft.Add(GetRideComponentName(GetRideTypeDescriptor(curRide->type).NameConvention.station).singular); News::AddItemToQueue(News::ItemType::Ride, STR_NEWS_VEHICLE_HAS_STALLED, ride.ToUnderlying(), ft); @@ -2812,7 +2832,7 @@ void Vehicle::SimulateCrash() const auto curRide = GetRide(); if (curRide != nullptr) { - curRide->lifecycle_flags |= RIDE_LIFECYCLE_CRASHED; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_CRASHED; } } @@ -2828,7 +2848,7 @@ void Vehicle::UpdateCollisionSetup() if (curRide == nullptr) return; - if (curRide->status == RideStatus::Simulating) + if (curRide->status == RideStatus::simulating) { SimulateCrash(); return; @@ -2836,7 +2856,7 @@ void Vehicle::UpdateCollisionSetup() SetState(Vehicle::Status::Crashed, sub_state); - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) + if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_CRASHED)) { auto frontVehicle = GetHead(); auto trainIndex = ride_get_train_index_from_vehicle(*curRide, frontVehicle->Id); @@ -2845,18 +2865,18 @@ void Vehicle::UpdateCollisionSetup() return; } - curRide->Crash(trainIndex.value()); + curRide->crash(trainIndex.value()); - if (curRide->status != RideStatus::Closed) + if (curRide->status != RideStatus::closed) { // We require this to execute right away during the simulation, always ignore network and queue. - auto gameAction = RideSetStatusAction(curRide->id, RideStatus::Closed); + auto gameAction = RideSetStatusAction(curRide->id, RideStatus::closed); GameActions::ExecuteNested(&gameAction); } } - curRide->lifecycle_flags |= RIDE_LIFECYCLE_CRASHED; - curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_CRASHED; + curRide->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; KillAllPassengersInTrain(); Vehicle* lastVehicle = this; @@ -2922,7 +2942,7 @@ static constexpr CoordsXY stru_9A3AC4[] = { void Vehicle::UpdateCrashSetup() { auto curRide = GetRide(); - if (curRide != nullptr && curRide->status == RideStatus::Simulating) + if (curRide != nullptr && curRide->status == RideStatus::simulating) { SimulateCrash(); return; @@ -2998,7 +3018,7 @@ void Vehicle::UpdateTravelling() CheckIfMissing(); auto curRide = GetRide(); - if (curRide == nullptr || (_vehicleBreakdown == 0 && curRide->mode == RideMode::RotatingLift)) + if (curRide == nullptr || (_vehicleBreakdown == 0 && curRide->mode == RideMode::rotatingLift)) return; if (sub_state == 2) @@ -3010,7 +3030,7 @@ void Vehicle::UpdateTravelling() sub_state = 0; } - if (curRide->mode == RideMode::FreefallDrop && animation_frame != 0) + if (curRide->mode == RideMode::freefallDrop && animation_frame != 0) { animation_frame++; velocity = 0; @@ -3023,7 +3043,7 @@ void Vehicle::UpdateTravelling() bool skipCheck = false; if (curFlags & (VEHICLE_UPDATE_MOTION_TRACK_FLAG_8 | VEHICLE_UPDATE_MOTION_TRACK_FLAG_9) - && curRide->mode == RideMode::ReverseInclineLaunchedShuttle && sub_state == 0) + && curRide->mode == RideMode::reverseInclineLaunchedShuttle && sub_state == 0) { sub_state = 1; velocity = 0; @@ -3046,7 +3066,7 @@ void Vehicle::UpdateTravelling() if (curFlags & (VEHICLE_UPDATE_MOTION_TRACK_FLAG_5 | VEHICLE_UPDATE_MOTION_TRACK_FLAG_12)) { - if (curRide->mode == RideMode::RotatingLift) + if (curRide->mode == RideMode::rotatingLift) { if (sub_state <= 1) { @@ -3055,12 +3075,12 @@ void Vehicle::UpdateTravelling() return; } } - else if (curRide->mode == RideMode::BoatHire) + else if (curRide->mode == RideMode::boatHire) { UpdateTravellingBoatHireSetup(); return; } - if (curRide->mode == RideMode::Shuttle) + if (curRide->mode == RideMode::shuttle) { Flags ^= VehicleFlags::PoweredCarInReverse; velocity = 0; @@ -3078,7 +3098,7 @@ void Vehicle::UpdateTravelling() } } - if (curRide->mode == RideMode::RotatingLift && sub_state <= 1) + if (curRide->mode == RideMode::rotatingLift && sub_state <= 1) { if (sub_state == 0) { @@ -3104,7 +3124,7 @@ void Vehicle::UpdateTravelling() if (curFlags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_ON_LIFT_HILL) { - if (curRide->mode == RideMode::ReverseInclineLaunchedShuttle) + if (curRide->mode == RideMode::reverseInclineLaunchedShuttle) { if (sub_state == 0) { @@ -3113,7 +3133,7 @@ void Vehicle::UpdateTravelling() if (!HasFlag(VehicleFlags::ReverseInclineCompletedLap)) { - if (velocity >= curRide->lift_hill_speed * -31079) + if (velocity >= curRide->liftHillSpeed * -31079) { acceleration = -15539; @@ -3129,7 +3149,7 @@ void Vehicle::UpdateTravelling() else { sound2_flags |= VEHICLE_SOUND2_FLAGS_LIFT_HILL; - if (velocity <= curRide->lift_hill_speed * 31079) + if (velocity <= curRide->liftHillSpeed * 31079) { acceleration = 15539; if (velocity != 0) @@ -3151,13 +3171,13 @@ void Vehicle::UpdateTravelling() if (!(curFlags & VEHICLE_UPDATE_MOTION_TRACK_FLAG_3)) return; - if (curRide->mode == RideMode::ReverseInclineLaunchedShuttle && velocity >= 0 + if (curRide->mode == RideMode::reverseInclineLaunchedShuttle && velocity >= 0 && !HasFlag(VehicleFlags::ReverseInclineCompletedLap)) { return; } - if (curRide->mode == RideMode::PoweredLaunchPasstrough && velocity < 0) + if (curRide->mode == RideMode::poweredLaunchPasstrough && velocity < 0) return; SetState(Vehicle::Status::Arriving); @@ -3171,7 +3191,7 @@ void Vehicle::UpdateArrivingPassThroughStation(const Ride& curRide, const CarEnt { if (sub_state == 0) { - if (curRide.mode == RideMode::Race && curRide.lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) + if (curRide.mode == RideMode::race && curRide.lifecycleFlags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) { return; } @@ -3193,9 +3213,9 @@ void Vehicle::UpdateArrivingPassThroughStation(const Ride& curRide, const CarEnt return; } - if (curRide.num_circuits != 1) + if (curRide.numCircuits != 1) { - if (NumLaps + 1 < curRide.num_circuits) + if (NumLaps + 1 < curRide.numCircuits) { return; } @@ -3226,20 +3246,20 @@ void Vehicle::UpdateArrivingPassThroughStation(const Ride& curRide, const CarEnt return; } - if (NumLaps + 1 < curRide.num_circuits) + if (NumLaps + 1 < curRide.numCircuits) { return; } - if (NumLaps + 1 != curRide.num_circuits) + if (NumLaps + 1 != curRide.numCircuits) { velocity -= velocity_diff; acceleration = 0; return; } - if (GetRideTypeDescriptor(curRide.type).HasFlag(RtdFlag::allowMultipleCircuits) && curRide.mode != RideMode::Shuttle - && curRide.mode != RideMode::PoweredLaunch) + if (GetRideTypeDescriptor(curRide.type).HasFlag(RtdFlag::allowMultipleCircuits) && curRide.mode != RideMode::shuttle + && curRide.mode != RideMode::poweredLaunch) { SetFlag(VehicleFlags::ReverseInclineCompletedLap); } @@ -3266,22 +3286,22 @@ void Vehicle::UpdateArriving() switch (curRide->mode) { - case RideMode::Swing: - case RideMode::Rotation: - case RideMode::ForwardRotation: - case RideMode::BackwardRotation: - case RideMode::FilmAvengingAviators: - case RideMode::FilmThrillRiders: - case RideMode::Beginners: - case RideMode::Intense: - case RideMode::Berserk: - case RideMode::MouseTails3DFilm: - case RideMode::StormChasers3DFilm: - case RideMode::SpaceRaiders3DFilm: - case RideMode::Circus: - case RideMode::SpaceRings: - case RideMode::HauntedHouse: - case RideMode::CrookedHouse: + case RideMode::swing: + case RideMode::rotation: + case RideMode::forwardRotation: + case RideMode::backwardRotation: + case RideMode::filmAvengingAviators: + case RideMode::filmThrillRiders: + case RideMode::beginners: + case RideMode::intense: + case RideMode::berserk: + case RideMode::mouseTails3DFilm: + case RideMode::stormChasers3DFilm: + case RideMode::spaceRaiders3DFilm: + case RideMode::circus: + case RideMode::spaceRings: + case RideMode::hauntedHouse: + case RideMode::crookedHouse: ClearFlag(VehicleFlags::ReverseInclineCompletedLap); velocity = 0; acceleration = 0; @@ -3294,10 +3314,10 @@ void Vehicle::UpdateArriving() } } - bool hasBrakesFailure = curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN - && curRide->breakdown_reason_pending == BREAKDOWN_BRAKES_FAILURE; - if (hasBrakesFailure && curRide->inspection_station == current_station - && curRide->mechanic_status != RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) + bool hasBrakesFailure = curRide->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN + && curRide->breakdownReasonPending == BREAKDOWN_BRAKES_FAILURE; + if (hasBrakesFailure && curRide->inspectionStation == current_station + && curRide->mechanicStatus != RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) { stationBrakesWork = false; } @@ -3347,26 +3367,26 @@ void Vehicle::UpdateArriving() if (sub_state != 0) { - if (NumLaps < curRide->num_circuits) + if (NumLaps < curRide->numCircuits) { SetState(Vehicle::Status::Departing, 1); return; } - if (NumLaps == curRide->num_circuits && HasFlag(VehicleFlags::ReverseInclineCompletedLap)) + if (NumLaps == curRide->numCircuits && HasFlag(VehicleFlags::ReverseInclineCompletedLap)) { SetState(Vehicle::Status::Departing, 1); return; } } - if (curRide->num_circuits != 1 && NumLaps < curRide->num_circuits) + if (curRide->numCircuits != 1 && NumLaps < curRide->numCircuits) { SetState(Vehicle::Status::Departing, 1); return; } - if ((curRide->mode == RideMode::UpwardLaunch || curRide->mode == RideMode::DownwardLaunch) && NumLaunches < 2) + if ((curRide->mode == RideMode::upwardLaunch || curRide->mode == RideMode::downwardLaunch) && NumLaunches < 2) { OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::RideLaunch2, GetLocation()); velocity = 0; @@ -3375,7 +3395,7 @@ void Vehicle::UpdateArriving() return; } - if (curRide->mode == RideMode::Race && curRide->lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) + if (curRide->mode == RideMode::race && curRide->lifecycleFlags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) { SetState(Vehicle::Status::Departing, 1); return; @@ -3405,9 +3425,9 @@ void Vehicle::UpdateUnloadingPassengers() if (curRide == nullptr) return; - const auto& currentStation = curRide->GetStation(current_station); + const auto& currentStation = curRide->getStation(current_station); - if (curRide->mode == RideMode::ForwardRotation || curRide->mode == RideMode::BackwardRotation) + if (curRide->mode == RideMode::forwardRotation || curRide->mode == RideMode::backwardRotation) { uint8_t seat = ((-Pitch) >> 3) & 0xF; if (restraints_position == 255 && !peep[seat * 2].IsNull()) @@ -3440,8 +3460,8 @@ void Vehicle::UpdateUnloadingPassengers() if (sub_state != 1) return; - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TESTED) && HasFlag(VehicleFlags::Testing) - && curRide->current_test_segment + 1 >= curRide->num_stations) + if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_TESTED) && HasFlag(VehicleFlags::Testing) + && curRide->currentTestSegment + 1 >= curRide->numStations) { UpdateTestFinish(); } @@ -3480,8 +3500,8 @@ void Vehicle::UpdateUnloadingPassengers() return; } - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TESTED) && HasFlag(VehicleFlags::Testing) - && curRide->current_test_segment + 1 >= curRide->num_stations) + if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_TESTED) && HasFlag(VehicleFlags::Testing) + && curRide->currentTestSegment + 1 >= curRide->numStations) { UpdateTestFinish(); } @@ -3498,7 +3518,7 @@ void Vehicle::UpdateWaitingForCableLift() if (curRide == nullptr) return; - Vehicle* cableLift = GetEntity(curRide->cable_lift); + Vehicle* cableLift = GetEntity(curRide->cableLift); if (cableLift == nullptr) return; @@ -3523,38 +3543,38 @@ void Vehicle::UpdateTravellingCableLift() { if (HasFlag(VehicleFlags::TrainIsBroken)) { - if (curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (curRide->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) return; - curRide->lifecycle_flags |= RIDE_LIFECYCLE_BROKEN_DOWN; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_BROKEN_DOWN; RideBreakdownAddNewsItem(*curRide); - curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST + curRide->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST | RIDE_INVALIDATE_RIDE_MAINTENANCE; - curRide->mechanic_status = RIDE_MECHANIC_STATUS_CALLING; - curRide->inspection_station = current_station; - curRide->breakdown_reason = curRide->breakdown_reason_pending; + curRide->mechanicStatus = RIDE_MECHANIC_STATUS_CALLING; + curRide->inspectionStation = current_station; + curRide->breakdownReason = curRide->breakdownReasonPending; velocity = 0; return; } sub_state = 1; PeepEasterEggHereWeAre(); - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_TESTED)) { if (HasFlag(VehicleFlags::Testing)) { - if (curRide->current_test_segment + 1 < curRide->num_stations) + if (curRide->currentTestSegment + 1 < curRide->numStations) { - curRide->current_test_segment++; - curRide->current_test_station = current_station; + curRide->currentTestSegment++; + curRide->currentTestStation = current_station; } else { UpdateTestFinish(); } } - else if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_TEST_IN_PROGRESS) && !IsGhost()) + else if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_TEST_IN_PROGRESS) && !IsGhost()) { TestReset(); } @@ -3582,16 +3602,16 @@ void Vehicle::UpdateTravellingCableLift() sub_state = 2; - if (curRide->IsBlockSectioned()) + if (curRide->isBlockSectioned()) return; // This is slightly different to the vanilla function - auto& currentStation = curRide->GetStation(current_station); + auto& currentStation = curRide->getStation(current_station); currentStation.Depart &= kStationDepartFlag; uint8_t waitingTime = 3; - if (curRide->depart_flags & RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH) + if (curRide->departFlags & RIDE_DEPART_WAIT_FOR_MINIMUM_LENGTH) { - waitingTime = std::max(curRide->min_waiting_time, static_cast(3)); + waitingTime = std::max(curRide->minWaitingTime, static_cast(3)); waitingTime = std::min(waitingTime, static_cast(127)); } @@ -3623,7 +3643,7 @@ void Vehicle::TryReconnectBoatToTrack(const CoordsXY& currentBoatLocation, const if (trackElement != nullptr) SetTrackType(trackElement->GetTrackType()); - SetTrackDirection(curRide->boat_hire_return_direction); + SetTrackDirection(curRide->boatHireReturnDirection); BoatLocation.SetNull(); } @@ -3803,7 +3823,7 @@ void Vehicle::UpdateMotionBoatHire() else { auto flooredTileLoc = TileCoordsXY(flooredLocation); - if (curRide->boat_hire_return_position != flooredTileLoc) + if (curRide->boatHireReturnPosition != flooredTileLoc) { do_Loc6DAA97 = true; } @@ -3820,7 +3840,7 @@ void Vehicle::UpdateMotionBoatHire() break; } - if (!(curRide->boat_hire_return_direction & 1)) + if (!(curRide->boatHireReturnDirection & 1)) { uint16_t tilePart = loc2.y % kCoordsXYStep; if (tilePart == kCoordsXYHalfTile) @@ -3926,8 +3946,8 @@ void Vehicle::UpdateBoatLocation() if (curRide == nullptr) return; - TileCoordsXY returnPosition = curRide->boat_hire_return_position; - uint8_t returnDirection = curRide->boat_hire_return_direction & 3; + TileCoordsXY returnPosition = curRide->boatHireReturnPosition; + uint8_t returnDirection = curRide->boatHireReturnDirection & 3; CoordsXY location = CoordsXY{ x, y } + CoordsDirectionDelta[returnDirection]; @@ -4065,7 +4085,7 @@ void Vehicle::UpdateSwinging() current_time = -1; NumSwings++; - if (curRide->status != RideStatus::Closed) + if (curRide->status != RideStatus::closed) { // It takes 3 swings to get into full swing // ride->rotations already takes this into account @@ -4133,7 +4153,7 @@ void Vehicle::UpdateFerrisWheelRotating() } uint8_t rotation = Pitch; - if (curRide->mode == RideMode::ForwardRotation) + if (curRide->mode == RideMode::forwardRotation) rotation++; else rotation--; @@ -4147,7 +4167,7 @@ void Vehicle::UpdateFerrisWheelRotating() Invalidate(); uint8_t subState = sub_state; - if (curRide->mode == RideMode::ForwardRotation) + if (curRide->mode == RideMode::forwardRotation) subState++; else subState--; @@ -4156,7 +4176,7 @@ void Vehicle::UpdateFerrisWheelRotating() if (subState == Pitch) { bool shouldStop = true; - if (curRide->status != RideStatus::Closed) + if (curRide->status != RideStatus::closed) { if (NumRotations < curRide->rotations) shouldStop = false; @@ -4174,7 +4194,7 @@ void Vehicle::UpdateFerrisWheelRotating() return; subState = sub_state; - if (curRide->mode == RideMode::ForwardRotation) + if (curRide->mode == RideMode::forwardRotation) subState += 8; else subState -= 8; @@ -4267,7 +4287,7 @@ void Vehicle::UpdateRotating() uint16_t time = current_time; if (_vehicleBreakdown == BREAKDOWN_CONTROL_FAILURE) { - time += (curRide->breakdown_sound_modifier >> 6) + 1; + time += (curRide->breakdownSoundModifier >> 6) + 1; } time++; @@ -4287,7 +4307,7 @@ void Vehicle::UpdateRotating() if (_vehicleBreakdown != BREAKDOWN_CONTROL_FAILURE) { bool shouldStop = true; - if (curRide->status != RideStatus::Closed) + if (curRide->status != RideStatus::closed) { sprite = NumRotations + 1; if (curRide->type == RIDE_TYPE_ENTERPRISE) @@ -4352,7 +4372,7 @@ void Vehicle::UpdateHauntedHouseOperating() if (Pitch != 0) { - if (GetGameState().CurrentTicks & 1) + if (getGameState().currentTicks & 1) { Pitch++; Invalidate(); @@ -4541,23 +4561,23 @@ static void ride_train_crash(Ride& ride, uint16_t numFatalities) uint8_t crashType = numFatalities == 0 ? RIDE_CRASH_TYPE_NO_FATALITIES : RIDE_CRASH_TYPE_FATALITIES; - if (crashType >= ride.last_crash_type) - ride.last_crash_type = crashType; + if (crashType >= ride.lastCrashType) + ride.lastCrashType = crashType; if (numFatalities != 0) { if (Config::Get().notifications.RideCasualties) { - ride.FormatNameTo(ft); + ride.formatNameTo(ft); News::AddItemToQueue( News::ItemType::Ride, numFatalities == 1 ? STR_X_PERSON_DIED_ON_X : STR_X_PEOPLE_DIED_ON_X, ride.id.ToUnderlying(), ft); } - auto& gameState = GetGameState(); - if (gameState.Park.RatingCasualtyPenalty < 500) + auto& gameState = getGameState(); + if (gameState.park.RatingCasualtyPenalty < 500) { - gameState.Park.RatingCasualtyPenalty += 200; + gameState.park.RatingCasualtyPenalty += 200; } } } @@ -4613,7 +4633,7 @@ void Vehicle::CrashOnLand() if (curRide == nullptr) return; - if (curRide->status == RideStatus::Simulating) + if (curRide->status == RideStatus::simulating) { SimulateCrash(); return; @@ -4624,7 +4644,7 @@ void Vehicle::CrashOnLand() InvokeVehicleCrashHook(Id, "land"); #endif - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) + if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_CRASHED)) { auto frontVehicle = GetHead(); auto trainIndex = ride_get_train_index_from_vehicle(*curRide, frontVehicle->Id); @@ -4633,17 +4653,17 @@ void Vehicle::CrashOnLand() return; } - curRide->Crash(trainIndex.value()); + curRide->crash(trainIndex.value()); - if (curRide->status != RideStatus::Closed) + if (curRide->status != RideStatus::closed) { // We require this to execute right away during the simulation, always ignore network and queue. - auto gameAction = RideSetStatusAction(curRide->id, RideStatus::Closed); + auto gameAction = RideSetStatusAction(curRide->id, RideStatus::closed); GameActions::ExecuteNested(&gameAction); } } - curRide->lifecycle_flags |= RIDE_LIFECYCLE_CRASHED; - curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_CRASHED; + curRide->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; if (IsHead()) { @@ -4681,7 +4701,7 @@ void Vehicle::CrashOnWater() if (curRide == nullptr) return; - if (curRide->status == RideStatus::Simulating) + if (curRide->status == RideStatus::simulating) { SimulateCrash(); return; @@ -4692,7 +4712,7 @@ void Vehicle::CrashOnWater() InvokeVehicleCrashHook(Id, "water"); #endif - if (!(curRide->lifecycle_flags & RIDE_LIFECYCLE_CRASHED)) + if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_CRASHED)) { auto frontVehicle = GetHead(); auto trainIndex = ride_get_train_index_from_vehicle(*curRide, frontVehicle->Id); @@ -4701,17 +4721,17 @@ void Vehicle::CrashOnWater() return; } - curRide->Crash(trainIndex.value()); + curRide->crash(trainIndex.value()); - if (curRide->status != RideStatus::Closed) + if (curRide->status != RideStatus::closed) { // We require this to execute right away during the simulation, always ignore network and queue. - auto gameAction = RideSetStatusAction(curRide->id, RideStatus::Closed); + auto gameAction = RideSetStatusAction(curRide->id, RideStatus::closed); GameActions::ExecuteNested(&gameAction); } } - curRide->lifecycle_flags |= RIDE_LIFECYCLE_CRASHED; - curRide->window_invalidate_flags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; + curRide->lifecycleFlags |= RIDE_LIFECYCLE_CRASHED; + curRide->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; if (IsHead()) { @@ -4866,7 +4886,7 @@ void Vehicle::UpdateSound() frictionSound.volume = std::min(208 + (ecx & 0xFF), 255); } - const auto currentTicks = GetGameState().CurrentTicks; + const auto currentTicks = getGameState().currentTicks; switch (carEntry.sound_range) { case SOUND_RANGE_WHISTLE: @@ -5091,10 +5111,10 @@ void Vehicle::SetMapToolbar() const auto ft = Formatter(); ft.Add(STR_RIDE_MAP_TIP); ft.Add(STR_MAP_TOOLTIP_STRINGID_STRINGID); - curRide->FormatNameTo(ft); + curRide->formatNameTo(ft); ft.Add(GetRideComponentName(GetRideTypeDescriptor(curRide->type).NameConvention.vehicle).capitalised); ft.Add(vehicleIndex + 1); - curRide->FormatStatusTo(ft); + curRide->formatStatusTo(ft); auto intent = Intent(INTENT_ACTION_SET_MAP_TOOLTIP); intent.PutExtra(INTENT_EXTRA_FORMATTER, &ft); ContextBroadcastIntent(&intent); @@ -5156,8 +5176,8 @@ int32_t Vehicle::UpdateMotionDodgems() return _vehicleMotionTrackFlags; int32_t nextVelocity = velocity + acceleration; - if (curRide->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN) - && curRide->breakdown_reason_pending == BREAKDOWN_SAFETY_CUT_OUT) + if (curRide->lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN) + && curRide->breakdownReasonPending == BREAKDOWN_SAFETY_CUT_OUT) { nextVelocity = 0; } @@ -5168,10 +5188,10 @@ int32_t Vehicle::UpdateMotionDodgems() _vehicleUnkF64E10 = 1; acceleration = 0; - if (!(curRide->lifecycle_flags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) - || curRide->breakdown_reason_pending != BREAKDOWN_SAFETY_CUT_OUT) + if (!(curRide->lifecycleFlags & (RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN)) + || curRide->breakdownReasonPending != BREAKDOWN_SAFETY_CUT_OUT) { - if ((GetGameState().CurrentTicks & 1) && var_34 != 0) + if ((getGameState().currentTicks & 1) && var_34 != 0) { if (var_34 > 0) { @@ -5557,7 +5577,7 @@ void Vehicle::CheckAndApplyBlockSectionStopSite() { case TrackElemType::BlockBrakes: // Check if this brake is the start of a cable lift - if (curRide->lifecycle_flags & RIDE_LIFECYCLE_CABLE_LIFT) + if (curRide->lifecycleFlags & RIDE_LIFECYCLE_CABLE_LIFT) { CoordsXYE track; int32_t zUnused; @@ -5565,13 +5585,13 @@ void Vehicle::CheckAndApplyBlockSectionStopSite() if (TrackBlockGetNextFromZero(TrackLocation, *curRide, GetTrackDirection(), &track, &zUnused, &direction, false) && track.element != nullptr && track.element->AsTrack()->HasCableLift()) { - ApplyCableLiftBlockBrake(curRide->IsBlockSectioned() && trackElement->AsTrack()->IsBrakeClosed()); + ApplyCableLiftBlockBrake(curRide->isBlockSectioned() && trackElement->AsTrack()->IsBrakeClosed()); break; } } [[fallthrough]]; case TrackElemType::DiagBlockBrakes: - if (curRide->IsBlockSectioned() && trackElement->AsTrack()->IsBrakeClosed()) + if (curRide->isBlockSectioned() && trackElement->AsTrack()->IsBrakeClosed()) ApplyStopBlockBrake(); else ApplyNonStopBlockBrake(); @@ -5587,7 +5607,7 @@ void Vehicle::CheckAndApplyBlockSectionStopSite() case TrackElemType::CableLiftHill: case TrackElemType::DiagUp25ToFlat: case TrackElemType::DiagUp60ToFlat: - if (curRide->IsBlockSectioned()) + if (curRide->isBlockSectioned()) { if (trackType == TrackElemType::CableLiftHill || trackElement->AsTrack()->HasChain()) { @@ -6355,7 +6375,7 @@ static void AnimateLandscapeDoor(TrackElement* trackElement, bool isLastVehicle) void Vehicle::UpdateLandscapeDoor() const { const auto* currentRide = GetRide(); - if (currentRide == nullptr || !currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::hasLandscapeDoors)) + if (currentRide == nullptr || !currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::hasLandscapeDoors)) { return; } @@ -6427,7 +6447,7 @@ void Vehicle::UpdateSceneryDoorBackwards() const void Vehicle::UpdateLandscapeDoorBackwards() const { const auto* currentRide = GetRide(); - if (currentRide == nullptr || !currentRide->GetRideTypeDescriptor().HasFlag(RtdFlag::hasLandscapeDoors)) + if (currentRide == nullptr || !currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::hasLandscapeDoors)) { return; } @@ -7003,6 +7023,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack( } // Update VehicleFlags::CarIsInverted flag + const auto previousCarIsInverted = HasFlag(VehicleFlags::CarIsInverted); ClearFlag(VehicleFlags::CarIsInverted); { auto rideType = ::GetRide(tileElement->AsTrack()->GetRideIndex())->type; @@ -7013,6 +7034,10 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack( SetFlag(VehicleFlags::CarIsInverted); } } + if (previousCarIsInverted != HasFlag(VehicleFlags::CarIsInverted)) + { + EntityTweener::Get().RemoveEntity(this); + } } } @@ -7028,7 +7053,7 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack( { trackType = tileElement->AsTrack()->GetTrackType(); if (trackType == TrackElemType::Flat - || ((curRide.lifecycle_flags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) && tileElement->AsTrack()->IsStation())) + || ((curRide.lifecycleFlags & RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING) && tileElement->AsTrack()->IsStation())) { UpdateGoKartAttemptSwitchLanes(); } @@ -7039,11 +7064,11 @@ bool Vehicle::UpdateTrackMotionForwardsGetNewTrack( { TileCoordsXYZ curLocation{ TrackLocation }; - if (curLocation == curRide.ChairliftBullwheelLocation[1]) + if (curLocation == curRide.chairliftBullwheelLocation[1]) { TrackSubposition = VehicleTrackSubposition::ChairliftEndBullwheel; } - else if (curLocation == curRide.ChairliftBullwheelLocation[0]) + else if (curLocation == curRide.chairliftBullwheelLocation[0]) { TrackSubposition = VehicleTrackSubposition::ChairliftStartBullwheel; } @@ -7112,9 +7137,9 @@ bool Vehicle::UpdateTrackMotionForwards(const CarEntry* carEntry, const Ride& cu } else if (TrackTypeIsBrakes(trackType)) { - bool hasBrakesFailure = curRide.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN - && curRide.breakdown_reason_pending == BREAKDOWN_BRAKES_FAILURE; - if (!hasBrakesFailure || curRide.mechanic_status == RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) + bool hasBrakesFailure = curRide.lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN + && curRide.breakdownReasonPending == BREAKDOWN_BRAKES_FAILURE; + if (!hasBrakesFailure || curRide.mechanicStatus == RIDE_MECHANIC_STATUS_HAS_FIXED_STATION_BRAKES) { auto brakeSpeed = ChooseBrakeSpeed() << kTrackSpeedShiftAmount; @@ -7122,7 +7147,7 @@ bool Vehicle::UpdateTrackMotionForwards(const CarEntry* carEntry, const Ride& cu { acceleration = -_vehicleVelocityF64E08 * 16; } - else if (!(GetGameState().CurrentTicks & 0x0F)) + else if (!(getGameState().currentTicks & 0x0F)) { if (_vehicleF64E2C == 0) { @@ -7146,7 +7171,7 @@ bool Vehicle::UpdateTrackMotionForwards(const CarEntry* carEntry, const Ride& cu acceleration += CalculateRiderBraking(); } - if ((trackType == TrackElemType::Flat && curRide.GetRideTypeDescriptor().HasFlag(RtdFlag::hasLsmBehaviourOnFlat)) + if ((trackType == TrackElemType::Flat && curRide.getRideTypeDescriptor().HasFlag(RtdFlag::hasLsmBehaviourOnFlat)) || (trackType == TrackElemType::PoweredLift)) { acceleration = GetRideTypeDescriptor(curRide.type).LegacyBoosterSettings.PoweredLiftAcceleration @@ -7392,6 +7417,7 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(TrackElemType trackType, con } // Update VehicleFlags::CarIsInverted + const auto previousCarIsInverted = HasFlag(VehicleFlags::CarIsInverted); ClearFlag(VehicleFlags::CarIsInverted); if (GetRideTypeDescriptor(curRide.type).HasFlag(RtdFlag::hasInvertedVariant)) { @@ -7399,6 +7425,10 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(TrackElemType trackType, con { SetFlag(VehicleFlags::CarIsInverted); } + if (previousCarIsInverted != HasFlag(VehicleFlags::CarIsInverted)) + { + EntityTweener::Get().RemoveEntity(this); + } } trackPos = { trackBeginEnd.begin_x, trackBeginEnd.begin_y, trackBeginEnd.begin_z }; @@ -7430,11 +7460,11 @@ bool Vehicle::UpdateTrackMotionBackwardsGetNewTrack(TrackElemType trackType, con { TileCoordsXYZ curLocation{ TrackLocation }; - if (curLocation == curRide.ChairliftBullwheelLocation[1]) + if (curLocation == curRide.chairliftBullwheelLocation[1]) { TrackSubposition = VehicleTrackSubposition::ChairliftEndBullwheel; } - else if (curLocation == curRide.ChairliftBullwheelLocation[0]) + else if (curLocation == curRide.chairliftBullwheelLocation[0]) { TrackSubposition = VehicleTrackSubposition::ChairliftStartBullwheel; } @@ -7501,7 +7531,7 @@ bool Vehicle::UpdateTrackMotionBackwards(const CarEntry* carEntry, const Ride& c while (true) { auto trackType = GetTrackType(); - if (trackType == TrackElemType::Flat && curRide.GetRideTypeDescriptor().HasFlag(RtdFlag::hasLsmBehaviourOnFlat)) + if (trackType == TrackElemType::Flat && curRide.getRideTypeDescriptor().HasFlag(RtdFlag::hasLsmBehaviourOnFlat)) { int32_t unkVelocity = _vehicleVelocityF64E08; if (unkVelocity < -524288) @@ -8211,7 +8241,7 @@ void Vehicle::Loc6DCE02(const Ride& curRide) _vehicleMotionTrackFlags |= VEHICLE_UPDATE_MOTION_TRACK_FLAG_VEHICLE_AT_STATION; - for (const auto& station : curRide.GetStations()) + for (const auto& station : curRide.getStations()) { if (TrackLocation != station.Start) { @@ -8221,7 +8251,7 @@ void Vehicle::Loc6DCE02(const Ride& curRide) { continue; } - _vehicleStationIndex = curRide.GetStationIndex(&station); + _vehicleStationIndex = curRide.getStationIndex(&station); } } @@ -8730,7 +8760,7 @@ void Vehicle::UpdateCrossings() const // In shuttle mode, only the train head is considered to be travelling backwards // To prevent path getting blocked incorrectly, only update crossings when this is the train head - if (curRide->mode == RideMode::Shuttle && TrainHead() != this) + if (curRide->mode == RideMode::shuttle && TrainHead() != this) { return; } @@ -8905,7 +8935,7 @@ void Vehicle::SetState(Vehicle::Status vehicleStatus, uint8_t subState) bool Vehicle::IsGhost() const { auto r = GetRide(); - return r != nullptr && r->status == RideStatus::Simulating; + return r != nullptr && r->status == RideStatus::simulating; } void Vehicle::EnableCollisionsForTrain() diff --git a/src/openrct2/ride/Vehicle.h b/src/openrct2/ride/Vehicle.h index bf5e5b835a..11f1374b05 100644 --- a/src/openrct2/ride/Vehicle.h +++ b/src/openrct2/ride/Vehicle.h @@ -47,6 +47,11 @@ struct VehicleInfo uint8_t direction; // 0x06 uint8_t Pitch; // 0x07 uint8_t bank_rotation; // 0x08 + + bool IsInvalid() const + { + return x == 0 && y == 0 && z == 0 && direction == 0 && Pitch == 0 && bank_rotation == 0; + } }; struct SoundIdVolume; @@ -230,12 +235,14 @@ struct Vehicle : EntityBase Ride* GetRide() const; Vehicle* TrainHead() const; Vehicle* TrainTail() const; + uint16_t GetTrackProgress() const; void UpdateAnimationAnimalFlying(); void EnableCollisionsForTrain(); /** * Instantly moves the specific car forward or backwards along the track. */ void MoveRelativeDistance(int32_t distance); + void UpdateTrackChange(); OpenRCT2::TrackElemType GetTrackType() const { return static_cast(TrackTypeAndDirection >> 2); @@ -279,7 +286,6 @@ struct Vehicle : EntityBase private: const VehicleInfo* GetMoveInfo() const; - uint16_t GetTrackProgress() const; void CableLiftUpdate(); bool CableLiftUpdateTrackMotionForwards(); bool CableLiftUpdateTrackMotionBackwards(); diff --git a/src/openrct2/ride/rtd/coaster/AirPoweredVerticalCoaster.h b/src/openrct2/ride/rtd/coaster/AirPoweredVerticalCoaster.h index 4150b53885..d9fdfd9f3d 100644 --- a/src/openrct2/ride/rtd/coaster/AirPoweredVerticalCoaster.h +++ b/src/openrct2/ride/rtd/coaster/AirPoweredVerticalCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor AirPoweredVerticalCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::airPoweredVerticalCoaster, @@ -27,8 +27,8 @@ constexpr RideTypeDescriptor AirPoweredVerticalCoasterRTD = }), .InvertedTrackPaintFunctions = {}, .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::checkGForces), - .RideModes = EnumsToFlags(RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), - .DefaultMode = RideMode::PoweredLaunchPasstrough, + .RideModes = EnumsToFlags(RideMode::poweredLaunchPasstrough, RideMode::poweredLaunch), + .DefaultMode = RideMode::poweredLaunchPasstrough, .OperatingSettings = { 30, 50 }, .TrackSpeedSettings = { 60, 60 }, .BoosterSettings = { 40, 40, 13 }, diff --git a/src/openrct2/ride/rtd/coaster/AlpineCoaster.h b/src/openrct2/ride/rtd/coaster/AlpineCoaster.h index 8db3c165df..908f5cdaa6 100644 --- a/src/openrct2/ride/rtd/coaster/AlpineCoaster.h +++ b/src/openrct2/ride/rtd/coaster/AlpineCoaster.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor AlpineCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::alpineCoaster, @@ -31,8 +31,8 @@ constexpr RideTypeDescriptor AlpineCoasterRTD = RtdFlag::allowMusic, RtdFlag::interestingToLookAt, RtdFlag::supportsMultipleColourSchemes, RtdFlag::canSynchroniseWithAdjacentStations, RtdFlag::hasEntranceAndExit, RtdFlag::noTestMode, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::upInclineRequiresLift), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .TrackSpeedSettings = { 10, 10 }, .Naming = { STR_RIDE_NAME_ALPINE_COASTER, STR_RIDE_DESCRIPTION_ALPINE_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/coaster/BobsleighCoaster.h b/src/openrct2/ride/rtd/coaster/BobsleighCoaster.h index cb72b63038..73f68f3a8d 100644 --- a/src/openrct2/ride/rtd/coaster/BobsleighCoaster.h +++ b/src/openrct2/ride/rtd/coaster/BobsleighCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor BobsleighCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::bobsleighCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor BobsleighCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_BOBSLEIGH_COASTER, STR_RIDE_DESCRIPTION_BOBSLEIGH_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/ClassicMiniRollerCoaster.h b/src/openrct2/ride/rtd/coaster/ClassicMiniRollerCoaster.h index c09636fb54..cd5b45a63c 100644 --- a/src/openrct2/ride/rtd/coaster/ClassicMiniRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ClassicMiniRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor ClassicMiniRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::juniorRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor ClassicMiniRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::allowDoorsOnTrack, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::reverseInclineLaunchedShuttle), + .DefaultMode = RideMode::continuousCircuit, .BoosterSettings = { 17, 16 }, .LegacyBoosterSettings = { 17, 16, 1 }, .Naming = { STR_RIDE_NAME_CLASSIC_MINI_ROLLER_COASTER, STR_RIDE_DESCRIPTION_CLASSIC_MINI_COASTER }, diff --git a/src/openrct2/ride/rtd/coaster/ClassicStandUpRollerCoaster.h b/src/openrct2/ride/rtd/coaster/ClassicStandUpRollerCoaster.h index 691ed3e95c..9707d801c4 100644 --- a/src/openrct2/ride/rtd/coaster/ClassicStandUpRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ClassicStandUpRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor ClassicStandUpRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::classicStandUpRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor ClassicStandUpRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle, RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::reverseInclineLaunchedShuttle, RideMode::poweredLaunchPasstrough, RideMode::poweredLaunch), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 7, 27 }, .Naming = { STR_RIDE_NAME_CLASSIC_STAND_UP_ROLLER_COASTER, STR_RIDE_DESCRIPTION_CLASSIC_STAND_UP_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/coaster/ClassicWoodenRollerCoaster.h b/src/openrct2/ride/rtd/coaster/ClassicWoodenRollerCoaster.h index fb213cc7cd..74146d8c58 100644 --- a/src/openrct2/ride/rtd/coaster/ClassicWoodenRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ClassicWoodenRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor ClassicWoodenRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::classicWoodenRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor ClassicWoodenRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .BoosterSettings = { 0, 68 }, .LegacyBoosterSettings = { 0, 68 }, .Naming = { STR_RIDE_NAME_CLASSIC_WOODEN_ROLLER_COASTER, STR_RIDE_DESCRIPTION_CLASSIC_WOODEN_ROLLER_COASTER }, diff --git a/src/openrct2/ride/rtd/coaster/ClassicWoodenTwisterRollerCoaster.h b/src/openrct2/ride/rtd/coaster/ClassicWoodenTwisterRollerCoaster.h index 655caac098..cb3543e6f7 100644 --- a/src/openrct2/ride/rtd/coaster/ClassicWoodenTwisterRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ClassicWoodenTwisterRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor ClassicWoodenTwisterRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::classicWoodenTwisterRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor ClassicWoodenTwisterRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .BoosterSettings = { 0, 68 }, .LegacyBoosterSettings = { 0, 68 }, .Naming = { STR_RIDE_NAME_CLASSIC_WOODEN_TWISTER_ROLLER_COASTER, STR_RIDE_DESCRIPTION_CLASSIC_WOODEN_TWISTER_ROLLER_COASTER }, diff --git a/src/openrct2/ride/rtd/coaster/CompactInvertedCoaster.h b/src/openrct2/ride/rtd/coaster/CompactInvertedCoaster.h index 2f538ecf97..e30102c0fb 100644 --- a/src/openrct2/ride/rtd/coaster/CompactInvertedCoaster.h +++ b/src/openrct2/ride/rtd/coaster/CompactInvertedCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor CompactInvertedCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::compactInvertedCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor CompactInvertedCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::isSuspended), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::reverseInclineLaunchedShuttle), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 7, 27 }, .Naming = { STR_RIDE_NAME_COMPACT_INVERTED_COASTER, STR_RIDE_DESCRIPTION_COMPACT_INVERTED_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/coaster/CorkscrewRollerCoaster.h b/src/openrct2/ride/rtd/coaster/CorkscrewRollerCoaster.h index ed8030cd5a..260405e8d2 100644 --- a/src/openrct2/ride/rtd/coaster/CorkscrewRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/CorkscrewRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor CorkscrewRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::corkscrewRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor CorkscrewRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch, RideMode::ReverseInclineLaunchedShuttle), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::poweredLaunchPasstrough, RideMode::poweredLaunch, RideMode::reverseInclineLaunchedShuttle), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 25, 25 }, .LegacyBoosterSettings = { 25, 25 }, diff --git a/src/openrct2/ride/rtd/coaster/FlyingRollerCoaster.h b/src/openrct2/ride/rtd/coaster/FlyingRollerCoaster.h index 08815c8573..ce7cd8e4fa 100644 --- a/src/openrct2/ride/rtd/coaster/FlyingRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/FlyingRollerCoaster.h @@ -18,7 +18,7 @@ // Non-inverted variant constexpr RideTypeDescriptor FlyingRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::flyingRollerCoaster, @@ -35,8 +35,8 @@ constexpr RideTypeDescriptor FlyingRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::hasInvertedVariant, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::startConstructionInverted), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 25, 25 }, .LegacyBoosterSettings = { 25, 25 }, @@ -96,7 +96,7 @@ constexpr RideTypeDescriptor FlyingRollerCoasterRTD = constexpr RideTypeDescriptor FlyingRollerCoasterAltRTD = { - .Category = RIDE_CATEGORY_NONE, + .Category = RideCategory::none, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::null, @@ -110,8 +110,8 @@ constexpr RideTypeDescriptor FlyingRollerCoasterAltRTD = }), .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::startConstructionInverted), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 25, 25 }, .LegacyBoosterSettings = { 25, 25 }, diff --git a/src/openrct2/ride/rtd/coaster/GigaCoaster.h b/src/openrct2/ride/rtd/coaster/GigaCoaster.h index ae7bff5135..c6e633a3e6 100644 --- a/src/openrct2/ride/rtd/coaster/GigaCoaster.h +++ b/src/openrct2/ride/rtd/coaster/GigaCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor GigaCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::latticeTriangle, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor GigaCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowCableLiftHill, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .TrackSpeedSettings = { 60, 60 }, .BoosterSettings = { 17, 68 }, diff --git a/src/openrct2/ride/rtd/coaster/HeartlineTwisterCoaster.h b/src/openrct2/ride/rtd/coaster/HeartlineTwisterCoaster.h index 2a05592475..c3e846e95c 100644 --- a/src/openrct2/ride/rtd/coaster/HeartlineTwisterCoaster.h +++ b/src/openrct2/ride/rtd/coaster/HeartlineTwisterCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor HeartlineTwisterCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::heartlineTwisterCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor HeartlineTwisterCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 25, 25 }, .LegacyBoosterSettings = { 25, 25 }, diff --git a/src/openrct2/ride/rtd/coaster/HybridCoaster.h b/src/openrct2/ride/rtd/coaster/HybridCoaster.h index 4dba04120a..93ca86a9ef 100644 --- a/src/openrct2/ride/rtd/coaster/HybridCoaster.h +++ b/src/openrct2/ride/rtd/coaster/HybridCoaster.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor HybridCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::hybridCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor HybridCoasterRTD = EnumsToFlags(RtdFlag::hasTrackColourMain, RtdFlag::hasTrackColourSupports, RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .BoosterSettings = { 15, 52 }, .LegacyBoosterSettings = { 15, 52 }, .Naming = { STR_RIDE_NAME_HYBRID_COASTER, STR_RIDE_DESCRIPTION_HYBRID_COASTER }, diff --git a/src/openrct2/ride/rtd/coaster/HyperTwister.h b/src/openrct2/ride/rtd/coaster/HyperTwister.h index e9725751c5..00bf183a6e 100644 --- a/src/openrct2/ride/rtd/coaster/HyperTwister.h +++ b/src/openrct2/ride/rtd/coaster/HyperTwister.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor HyperTwisterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::twisterRollerCoaster, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor HyperTwisterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .TrackSpeedSettings = { 60, 60 }, .BoosterSettings = { 17, 68 }, diff --git a/src/openrct2/ride/rtd/coaster/Hypercoaster.h b/src/openrct2/ride/rtd/coaster/Hypercoaster.h index e6c9b2320f..5a173a8617 100644 --- a/src/openrct2/ride/rtd/coaster/Hypercoaster.h +++ b/src/openrct2/ride/rtd/coaster/Hypercoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor HypercoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::corkscrewRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor HypercoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch, RideMode::ReverseInclineLaunchedShuttle), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::poweredLaunchPasstrough, RideMode::poweredLaunch, RideMode::reverseInclineLaunchedShuttle), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .TrackSpeedSettings = { 60, 60 }, .BoosterSettings = { 25, 25 }, diff --git a/src/openrct2/ride/rtd/coaster/InvertedHairpinCoaster.h b/src/openrct2/ride/rtd/coaster/InvertedHairpinCoaster.h index f21941f9bf..a44aadd70d 100644 --- a/src/openrct2/ride/rtd/coaster/InvertedHairpinCoaster.h +++ b/src/openrct2/ride/rtd/coaster/InvertedHairpinCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor InvertedHairpinCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::invertedHairpinCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor InvertedHairpinCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::isSuspended), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_INVERTED_HAIRPIN_COASTER, STR_RIDE_DESCRIPTION_INVERTED_HAIRPIN_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/InvertedImpulseCoaster.h b/src/openrct2/ride/rtd/coaster/InvertedImpulseCoaster.h index b624612f24..23097afdba 100644 --- a/src/openrct2/ride/rtd/coaster/InvertedImpulseCoaster.h +++ b/src/openrct2/ride/rtd/coaster/InvertedImpulseCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor InvertedImpulseCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::invertedImpulseCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor InvertedImpulseCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::isSuspended, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), - .DefaultMode = RideMode::PoweredLaunchPasstrough, + .RideModes = EnumsToFlags(RideMode::poweredLaunchPasstrough, RideMode::poweredLaunch), + .DefaultMode = RideMode::poweredLaunchPasstrough, .OperatingSettings = { 10, 33 }, .BoosterSettings = { 25, 25 }, .LegacyBoosterSettings = { 25, 25 }, diff --git a/src/openrct2/ride/rtd/coaster/InvertedRollerCoaster.h b/src/openrct2/ride/rtd/coaster/InvertedRollerCoaster.h index faa5ab2938..c4898c6467 100644 --- a/src/openrct2/ride/rtd/coaster/InvertedRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/InvertedRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor InvertedRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::invertedRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor InvertedRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::isSuspended, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::poweredLaunchPasstrough, RideMode::poweredLaunch), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 7, 27 }, .BoosterSettings = { 0, 38 }, .LegacyBoosterSettings = { 0, 38 }, diff --git a/src/openrct2/ride/rtd/coaster/JuniorRollerCoaster.h b/src/openrct2/ride/rtd/coaster/JuniorRollerCoaster.h index 9e768f4937..733a16c509 100644 --- a/src/openrct2/ride/rtd/coaster/JuniorRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/JuniorRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor JuniorRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::juniorRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor JuniorRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::allowDoorsOnTrack, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .TrackSpeedSettings = { 30, 15 }, .BoosterSettings = { 17, 16 }, .LegacyBoosterSettings = { 17, 16, 1 }, diff --git a/src/openrct2/ride/rtd/coaster/LIMLaunchedRollerCoaster.h b/src/openrct2/ride/rtd/coaster/LIMLaunchedRollerCoaster.h index 189cc517ef..1bf132f47c 100644 --- a/src/openrct2/ride/rtd/coaster/LIMLaunchedRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/LIMLaunchedRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor LIMLaunchedRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::limLaunchedRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor LIMLaunchedRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch, RideMode::PoweredLaunchBlockSectioned), - .DefaultMode = RideMode::PoweredLaunchPasstrough, + .RideModes = EnumsToFlags(RideMode::poweredLaunchPasstrough, RideMode::poweredLaunch, RideMode::poweredLaunchBlockSectioned), + .DefaultMode = RideMode::poweredLaunchPasstrough, .OperatingSettings = { 10, 31 }, .BoosterSettings = { 18, 52 }, .LegacyBoosterSettings = { 18, 52 }, diff --git a/src/openrct2/ride/rtd/coaster/LSMLaunchedRollerCoaster.h b/src/openrct2/ride/rtd/coaster/LSMLaunchedRollerCoaster.h index f815ae6de7..d54ec78ae8 100644 --- a/src/openrct2/ride/rtd/coaster/LSMLaunchedRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/LSMLaunchedRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor LSMLaunchedRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::latticeTriangleAlt, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor LSMLaunchedRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowCableLiftHill, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::PoweredLaunch, RideMode::PoweredLaunchBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::poweredLaunch, RideMode::poweredLaunchBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 2, 10 }, .TrackSpeedSettings = { 60, 60 }, .BoosterSettings = { 17, 68 }, diff --git a/src/openrct2/ride/rtd/coaster/LayDownRollerCoaster.h b/src/openrct2/ride/rtd/coaster/LayDownRollerCoaster.h index 538b990e17..6f35b57fc9 100644 --- a/src/openrct2/ride/rtd/coaster/LayDownRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/LayDownRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor LayDownRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor( { @@ -38,8 +38,8 @@ constexpr RideTypeDescriptor LayDownRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::hasInvertedVariant, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 25, 25 }, .LegacyBoosterSettings = { 25, 25 }, @@ -95,7 +95,7 @@ constexpr RideTypeDescriptor LayDownRollerCoasterRTD = constexpr RideTypeDescriptor LayDownRollerCoasterAltRTD = { - .Category = RIDE_CATEGORY_NONE, + .Category = RideCategory::none, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::null, @@ -109,8 +109,8 @@ constexpr RideTypeDescriptor LayDownRollerCoasterAltRTD = }), .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 25, 25 }, .LegacyBoosterSettings = { 25, 25 }, diff --git a/src/openrct2/ride/rtd/coaster/LoopingRollerCoaster.h b/src/openrct2/ride/rtd/coaster/LoopingRollerCoaster.h index 81f66ca9f1..0236b50d1c 100644 --- a/src/openrct2/ride/rtd/coaster/LoopingRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/LoopingRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor LoopingRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::loopingRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor LoopingRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle, RideMode::PoweredLaunchPasstrough, RideMode::PoweredLaunch), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::reverseInclineLaunchedShuttle, RideMode::poweredLaunchPasstrough, RideMode::poweredLaunch), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 18, 18 }, .LegacyBoosterSettings = { 18, 18 }, diff --git a/src/openrct2/ride/rtd/coaster/MineRide.h b/src/openrct2/ride/rtd/coaster/MineRide.h index 872fa2fc73..afbeac4e73 100644 --- a/src/openrct2/ride/rtd/coaster/MineRide.h +++ b/src/openrct2/ride/rtd/coaster/MineRide.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor MineRideRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::mineRide, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor MineRideRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_MINE_RIDE, STR_RIDE_DESCRIPTION_MINE_RIDE }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/coaster/MineTrainCoaster.h b/src/openrct2/ride/rtd/coaster/MineTrainCoaster.h index 78ebeb0659..0bbc3c475b 100644 --- a/src/openrct2/ride/rtd/coaster/MineTrainCoaster.h +++ b/src/openrct2/ride/rtd/coaster/MineTrainCoaster.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor MineTrainCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::mineTrainCoaster, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor MineTrainCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_MINE_TRAIN_COASTER, STR_RIDE_DESCRIPTION_MINE_TRAIN_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/MiniRollerCoaster.h b/src/openrct2/ride/rtd/coaster/MiniRollerCoaster.h index e0ceab5db1..0a6c5558de 100644 --- a/src/openrct2/ride/rtd/coaster/MiniRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/MiniRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor MiniRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::miniRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor MiniRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .BoosterSettings = { 0, 68 }, .LegacyBoosterSettings = { 0, 68, 4 }, .Naming = { STR_RIDE_NAME_MINI_ROLLER_COASTER, STR_RIDE_DESCRIPTION_MINI_ROLLER_COASTER }, diff --git a/src/openrct2/ride/rtd/coaster/MiniSuspendedCoaster.h b/src/openrct2/ride/rtd/coaster/MiniSuspendedCoaster.h index b17f75fdf2..8ac3be09d3 100644 --- a/src/openrct2/ride/rtd/coaster/MiniSuspendedCoaster.h +++ b/src/openrct2/ride/rtd/coaster/MiniSuspendedCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor MiniSuspendedCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::miniSuspendedCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor MiniSuspendedCoasterRTD = .Flags = kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasTrackColourMain, RtdFlag::hasTrackColourSupports, RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::isSuspended), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_MINI_SUSPENDED_COASTER, STR_RIDE_DESCRIPTION_MINI_SUSPENDED_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/MultiDimensionRollerCoaster.h b/src/openrct2/ride/rtd/coaster/MultiDimensionRollerCoaster.h index 5dc0dd93e6..f4a499bf35 100644 --- a/src/openrct2/ride/rtd/coaster/MultiDimensionRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/MultiDimensionRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor MultiDimensionRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::multiDimensionRollerCoaster, @@ -35,8 +35,8 @@ constexpr RideTypeDescriptor MultiDimensionRollerCoasterRTD = EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::hasInvertedVariant, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::hasSeatRotation, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 25, 25 }, .LegacyBoosterSettings = { 25, 25 }, @@ -95,7 +95,7 @@ constexpr RideTypeDescriptor MultiDimensionRollerCoasterRTD = constexpr RideTypeDescriptor MultiDimensionRollerCoasterAltRTD = { - .Category = RIDE_CATEGORY_NONE, + .Category = RideCategory::none, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::null, @@ -109,8 +109,8 @@ constexpr RideTypeDescriptor MultiDimensionRollerCoasterAltRTD = }), .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::hasSeatRotation), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 25, 25 }, .LegacyBoosterSettings = { 25, 25 }, diff --git a/src/openrct2/ride/rtd/coaster/ReverseFreefallCoaster.h b/src/openrct2/ride/rtd/coaster/ReverseFreefallCoaster.h index 6300ecc894..ea02a69370 100644 --- a/src/openrct2/ride/rtd/coaster/ReverseFreefallCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ReverseFreefallCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor ReverseFreefallCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::reverseFreefallCoaster, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor ReverseFreefallCoasterRTD = .InvertedTrackPaintFunctions = {}, .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::allowReversedTrains, RtdFlag::hasLsmBehaviourOnFlat), - .RideModes = EnumsToFlags(RideMode::LimPoweredLaunch), - .DefaultMode = RideMode::LimPoweredLaunch, + .RideModes = EnumsToFlags(RideMode::limPoweredLaunch), + .DefaultMode = RideMode::limPoweredLaunch, .OperatingSettings = { 7, 30 }, .TrackSpeedSettings = { 60, 60 }, .BoosterSettings = { 40, 40 }, diff --git a/src/openrct2/ride/rtd/coaster/ReverserRollerCoaster.h b/src/openrct2/ride/rtd/coaster/ReverserRollerCoaster.h index c41c49fd88..740abe57ba 100644 --- a/src/openrct2/ride/rtd/coaster/ReverserRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/ReverserRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor ReverserRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::reverserRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor ReverserRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::layeredVehiclePreview), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_REVERSER_ROLLER_COASTER, STR_RIDE_DESCRIPTION_REVERSER_ROLLER_COASTER }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/SideFrictionRollerCoaster.h b/src/openrct2/ride/rtd/coaster/SideFrictionRollerCoaster.h index 31959f4547..520b3c9357 100644 --- a/src/openrct2/ride/rtd/coaster/SideFrictionRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/SideFrictionRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SideFrictionRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::sideFrictionRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor SideFrictionRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_SIDE_FRICTION_ROLLER_COASTER, STR_RIDE_DESCRIPTION_SIDE_FRICTION_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/SingleRailRollerCoaster.h b/src/openrct2/ride/rtd/coaster/SingleRailRollerCoaster.h index ff12b2881a..8560da8090 100644 --- a/src/openrct2/ride/rtd/coaster/SingleRailRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/SingleRailRollerCoaster.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor SingleRailRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::singleRailRollerCoaster, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor SingleRailRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt| EnumsToFlags(RtdFlag::hasTrackColourSupports, RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .BoosterSettings = { 15, 52 }, .LegacyBoosterSettings = { 15, 52 }, .Naming = { STR_RIDE_NAME_SINGLE_RAIL_ROLLER_COASTER, STR_RIDE_DESCRIPTION_SINGLE_RAIL_ROLLER_COASTER }, diff --git a/src/openrct2/ride/rtd/coaster/SpinningWildMouse.h b/src/openrct2/ride/rtd/coaster/SpinningWildMouse.h index 5b3c21321d..9665ae7422 100644 --- a/src/openrct2/ride/rtd/coaster/SpinningWildMouse.h +++ b/src/openrct2/ride/rtd/coaster/SpinningWildMouse.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SpinningWildMouseRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::steelWildMouse, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor SpinningWildMouseRTD = .InvertedTrackPaintFunctions = {}, .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_SPINNING_WILD_MOUSE, STR_RIDE_DESCRIPTION_SPINNING_WILD_MOUSE }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/SpiralRollerCoaster.h b/src/openrct2/ride/rtd/coaster/SpiralRollerCoaster.h index ffa6e13a39..be7bc454b1 100644 --- a/src/openrct2/ride/rtd/coaster/SpiralRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/SpiralRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SpiralRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::miniRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor SpiralRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 17, 17 }, .LegacyBoosterSettings = { 17, 17 }, diff --git a/src/openrct2/ride/rtd/coaster/StandUpRollerCoaster.h b/src/openrct2/ride/rtd/coaster/StandUpRollerCoaster.h index bfcef879d9..bd4b25e3fd 100644 --- a/src/openrct2/ride/rtd/coaster/StandUpRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/StandUpRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor StandUpRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::standUpRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor StandUpRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 7, 27 }, .Naming = { STR_RIDE_NAME_STAND_UP_ROLLER_COASTER, STR_RIDE_DESCRIPTION_STAND_UP_ROLLER_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/coaster/SteelWildMouse.h b/src/openrct2/ride/rtd/coaster/SteelWildMouse.h index be6344a780..583d009678 100644 --- a/src/openrct2/ride/rtd/coaster/SteelWildMouse.h +++ b/src/openrct2/ride/rtd/coaster/SteelWildMouse.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SteelWildMouseRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::steelWildMouse, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor SteelWildMouseRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::allowDoorsOnTrack, RtdFlag::checkGForces), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_WILD_MOUSE, STR_RIDE_DESCRIPTION_WILD_MOUSE }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/Steeplechase.h b/src/openrct2/ride/rtd/coaster/Steeplechase.h index 474bb903a2..8b7a1fed0a 100644 --- a/src/openrct2/ride/rtd/coaster/Steeplechase.h +++ b/src/openrct2/ride/rtd/coaster/Steeplechase.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SteeplechaseRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::steeplechase, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor SteeplechaseRTD = .InvertedTrackPaintFunctions = {}, .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_STEEPLECHASE, STR_RIDE_DESCRIPTION_STEEPLECHASE }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/SuspendedSwingingCoaster.h b/src/openrct2/ride/rtd/coaster/SuspendedSwingingCoaster.h index 4679333a35..d947072046 100644 --- a/src/openrct2/ride/rtd/coaster/SuspendedSwingingCoaster.h +++ b/src/openrct2/ride/rtd/coaster/SuspendedSwingingCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SuspendedSwingingCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::suspendedSwingingCoaster, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor SuspendedSwingingCoasterRTD = .InvertedTrackPaintFunctions = {}, .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::isSuspended), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_SUSPENDED_SWINGING_COASTER, STR_RIDE_DESCRIPTION_SUSPENDED_SWINGING_COASTER }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h b/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h index 5d84ae6e78..6b9b81b2c0 100644 --- a/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/TwisterRollerCoaster.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor TwisterRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::twisterRollerCoaster, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor TwisterRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 17, 68 }, .LegacyBoosterSettings = { 17, 68 }, diff --git a/src/openrct2/ride/rtd/coaster/VerticalDropCoaster.h b/src/openrct2/ride/rtd/coaster/VerticalDropCoaster.h index 8be8ac8eef..9d8e9cf18b 100644 --- a/src/openrct2/ride/rtd/coaster/VerticalDropCoaster.h +++ b/src/openrct2/ride/rtd/coaster/VerticalDropCoaster.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor VerticalDropCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::twisterRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor VerticalDropCoasterRTD = .InvertedTrackPaintFunctions = {}, .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .OperatingSettings = { 10, 27 }, .BoosterSettings = { 17, 68 }, .LegacyBoosterSettings = { 17, 68 }, diff --git a/src/openrct2/ride/rtd/coaster/VirginiaReel.h b/src/openrct2/ride/rtd/coaster/VirginiaReel.h index 23223189cb..98b19d9a4d 100644 --- a/src/openrct2/ride/rtd/coaster/VirginiaReel.h +++ b/src/openrct2/ride/rtd/coaster/VirginiaReel.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor VirginiaReelRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::virginiaReel, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor VirginiaReelRTD = .InvertedTrackPaintFunctions = {}, .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_VIRGINIA_REEL, STR_RIDE_DESCRIPTION_VIRGINIA_REEL }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/coaster/WaterCoaster.h b/src/openrct2/ride/rtd/coaster/WaterCoaster.h index 2e6efd337a..6a8be28ae2 100644 --- a/src/openrct2/ride/rtd/coaster/WaterCoaster.h +++ b/src/openrct2/ride/rtd/coaster/WaterCoaster.h @@ -19,7 +19,7 @@ // clang-format off constexpr RideTypeDescriptor WaterCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor( { @@ -42,8 +42,8 @@ constexpr RideTypeDescriptor WaterCoasterRTD = .InvertedTrackPaintFunctions = {}, .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::hasCoveredPieces, RtdFlag::checkGForces), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned), + .DefaultMode = RideMode::continuousCircuit, .TrackSpeedSettings = { 30, 15 }, .BoosterSettings = { 17, 16 }, .LegacyBoosterSettings = { 17, 16, 1 }, @@ -101,7 +101,7 @@ constexpr RideTypeDescriptor WaterCoasterRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault, .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_Default, .GetGuestWaypointLocation = GetGuestWaypointLocationDefault, diff --git a/src/openrct2/ride/rtd/coaster/WoodenRollerCoaster.h b/src/openrct2/ride/rtd/coaster/WoodenRollerCoaster.h index 59196b30ae..867bd76975 100644 --- a/src/openrct2/ride/rtd/coaster/WoodenRollerCoaster.h +++ b/src/openrct2/ride/rtd/coaster/WoodenRollerCoaster.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor WoodenRollerCoasterRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::woodenRollerCoaster, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor WoodenRollerCoasterRTD = .Flags = kRtdFlagsHasThreeColours | kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::checkGForces, RtdFlag::allowMultipleCircuits, RtdFlag::allowReversedTrains), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::ContinuousCircuitBlockSectioned, RideMode::ReverseInclineLaunchedShuttle), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::continuousCircuitBlockSectioned, RideMode::reverseInclineLaunchedShuttle), + .DefaultMode = RideMode::continuousCircuit, .BoosterSettings = { 0, 68 }, .LegacyBoosterSettings = { 0, 68 }, .Naming = { STR_RIDE_NAME_WOODEN_ROLLER_COASTER, STR_RIDE_DESCRIPTION_WOODEN_ROLLER_COASTER }, diff --git a/src/openrct2/ride/rtd/coaster/WoodenWildMouse.h b/src/openrct2/ride/rtd/coaster/WoodenWildMouse.h index 59438d4525..88bc46a803 100644 --- a/src/openrct2/ride/rtd/coaster/WoodenWildMouse.h +++ b/src/openrct2/ride/rtd/coaster/WoodenWildMouse.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor WoodenWildMouseRTD = { - .Category = RIDE_CATEGORY_ROLLERCOASTER, + .Category = RideCategory::rollerCoaster, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::woodenWildMouse, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor WoodenWildMouseRTD = .Flags = kRtdFlagsCommonCoaster | kRtdFlagsCommonCoasterNonAlt | EnumsToFlags(RtdFlag::hasTrackColourMain, RtdFlag::hasTrackColourSupports, RtdFlag::hasLeaveWhenAnotherVehicleArrivesAtStation, RtdFlag::allowDoorsOnTrack, RtdFlag::checkGForces), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_WOODEN_WILD_MOUSE, STR_RIDE_DESCRIPTION_WOODEN_WILD_MOUSE }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION) | (1 << BREAKDOWN_BRAKES_FAILURE), diff --git a/src/openrct2/ride/rtd/gentle/CarRide.h b/src/openrct2/ride/rtd/gentle/CarRide.h index 395f338777..418e2e02e7 100644 --- a/src/openrct2/ride/rtd/gentle/CarRide.h +++ b/src/openrct2/ride/rtd/gentle/CarRide.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor CarRideRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::carRide, @@ -33,8 +33,8 @@ constexpr RideTypeDescriptor CarRideRTD = RtdFlag::allowDoorsOnTrack, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::showInTrackDesigner, RtdFlag::slightlyInterestingToLookAt), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_CAR_RIDE, STR_RIDE_DESCRIPTION_CAR_RIDE }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/gentle/Circus.h b/src/openrct2/ride/rtd/gentle/Circus.h index 0e5a52864e..b47f17b50e 100644 --- a/src/openrct2/ride/rtd/gentle/Circus.h +++ b/src/openrct2/ride/rtd/gentle/Circus.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor CircusRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack3x3, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::circus, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor CircusRTD = RtdFlag::isFlatRide, RtdFlag::describeAsInside, RtdFlag::hasVehicleColours, RtdFlag::hasMusicByDefault, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::Circus), - .DefaultMode = RideMode::Circus, + .RideModes = EnumsToFlags(RideMode::circus), + .DefaultMode = RideMode::circus, .Naming = { STR_RIDE_NAME_CIRCUS, STR_RIDE_DESCRIPTION_CIRCUS }, .NameConvention = { RideComponentType::Building, RideComponentType::Structure, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT), @@ -63,7 +63,7 @@ constexpr RideTypeDescriptor CircusRTD = .StartRideMusic = OpenRCT2::RideAudio::CircusStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = CircusMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault, .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_Default, .GetGuestWaypointLocation = GetGuestWaypointLocationDefault, diff --git a/src/openrct2/ride/rtd/gentle/CrookedHouse.h b/src/openrct2/ride/rtd/gentle/CrookedHouse.h index e6b840ef02..03c35d9a83 100644 --- a/src/openrct2/ride/rtd/gentle/CrookedHouse.h +++ b/src/openrct2/ride/rtd/gentle/CrookedHouse.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor CrookedHouseRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack3x3, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::crookedHouse, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor CrookedHouseRTD = RtdFlag::isFlatRide, RtdFlag::describeAsInside, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::CrookedHouse), - .DefaultMode = RideMode::CrookedHouse, + .RideModes = EnumsToFlags(RideMode::crookedHouse), + .DefaultMode = RideMode::crookedHouse, .Naming = { STR_RIDE_NAME_CROOKED_HOUSE, STR_RIDE_DESCRIPTION_CROOKED_HOUSE }, .NameConvention = { RideComponentType::Building, RideComponentType::Structure, RideComponentType::Station }, .AvailableBreakdowns = 0, diff --git a/src/openrct2/ride/rtd/gentle/Dodgems.h b/src/openrct2/ride/rtd/gentle/Dodgems.h index ea1c518735..e01b3561cd 100644 --- a/src/openrct2/ride/rtd/gentle/Dodgems.h +++ b/src/openrct2/ride/rtd/gentle/Dodgems.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor DodgemsRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack4x4, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::dodgems, @@ -31,8 +31,8 @@ constexpr RideTypeDescriptor DodgemsRTD = RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::hasMusicByDefault, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::slightlyInterestingToLookAt), - .RideModes = EnumsToFlags(RideMode::Dodgems), - .DefaultMode = RideMode::Dodgems, + .RideModes = EnumsToFlags(RideMode::dodgems), + .DefaultMode = RideMode::dodgems, .OperatingSettings = { 20, 180 }, .Naming = { STR_RIDE_NAME_DODGEMS, STR_RIDE_DESCRIPTION_DODGEMS }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/gentle/FerrisWheel.h b/src/openrct2/ride/rtd/gentle/FerrisWheel.h index 952a2cfa97..28ce6862a2 100644 --- a/src/openrct2/ride/rtd/gentle/FerrisWheel.h +++ b/src/openrct2/ride/rtd/gentle/FerrisWheel.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor FerrisWheelRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x4C, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::ferrisWheel, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor FerrisWheelRTD = RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::slightlyInterestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::ForwardRotation, RideMode::BackwardRotation), - .DefaultMode = RideMode::ForwardRotation, + .RideModes = EnumsToFlags(RideMode::forwardRotation, RideMode::backwardRotation), + .DefaultMode = RideMode::forwardRotation, .OperatingSettings = { 1, 3 }, .Naming = { STR_RIDE_NAME_FERRIS_WHEEL, STR_RIDE_DESCRIPTION_FERRIS_WHEEL }, .NameConvention = { RideComponentType::Wheel, RideComponentType::Structure, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/gentle/FlyingSaucers.h b/src/openrct2/ride/rtd/gentle/FlyingSaucers.h index 2ee2f040b5..c5f222f4c3 100644 --- a/src/openrct2/ride/rtd/gentle/FlyingSaucers.h +++ b/src/openrct2/ride/rtd/gentle/FlyingSaucers.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor FlyingSaucersRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack4x4, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::flyingSaucers, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor FlyingSaucersRTD = RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::hasMusicByDefault, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::interestingToLookAt), - .RideModes = EnumsToFlags(RideMode::Dodgems), - .DefaultMode = RideMode::Dodgems, + .RideModes = EnumsToFlags(RideMode::dodgems), + .DefaultMode = RideMode::dodgems, .OperatingSettings = { 20, 180 }, .Naming = { STR_RIDE_NAME_FLYING_SAUCERS, STR_RIDE_DESCRIPTION_FLYING_SAUCERS }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/gentle/GhostTrain.h b/src/openrct2/ride/rtd/gentle/GhostTrain.h index 52878575c9..1d5ad716fe 100644 --- a/src/openrct2/ride/rtd/gentle/GhostTrain.h +++ b/src/openrct2/ride/rtd/gentle/GhostTrain.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor GhostTrainRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::ghostTrain, @@ -34,8 +34,8 @@ constexpr RideTypeDescriptor GhostTrainRTD = RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::hasAirTime, RtdFlag::showInTrackDesigner, RtdFlag::interestingToLookAt, RtdFlag::hasLandscapeDoors), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_GHOST_TRAIN, STR_RIDE_DESCRIPTION_GHOST_TRAIN }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), @@ -84,7 +84,7 @@ constexpr RideTypeDescriptor GhostTrainRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault, .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_GhostTrain, }; diff --git a/src/openrct2/ride/rtd/gentle/HauntedHouse.h b/src/openrct2/ride/rtd/gentle/HauntedHouse.h index d7b361c160..cbc6659753 100644 --- a/src/openrct2/ride/rtd/gentle/HauntedHouse.h +++ b/src/openrct2/ride/rtd/gentle/HauntedHouse.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor HauntedHouseRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack3x3, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::hauntedHouse, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor HauntedHouseRTD = RtdFlag::isFlatRide, RtdFlag::describeAsInside, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::HauntedHouse), - .DefaultMode = RideMode::HauntedHouse, + .RideModes = EnumsToFlags(RideMode::hauntedHouse), + .DefaultMode = RideMode::hauntedHouse, .Naming = { STR_RIDE_NAME_HAUNTED_HOUSE, STR_RIDE_DESCRIPTION_HAUNTED_HOUSE }, .NameConvention = { RideComponentType::Building, RideComponentType::Structure, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT), diff --git a/src/openrct2/ride/rtd/gentle/Maze.h b/src/openrct2/ride/rtd/gentle/Maze.h index 6cf44fe0a8..9a28128d11 100644 --- a/src/openrct2/ride/rtd/gentle/Maze.h +++ b/src/openrct2/ride/rtd/gentle/Maze.h @@ -19,7 +19,7 @@ // clang-format off constexpr RideTypeDescriptor MazeRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::Maze, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::maze, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor MazeRTD = .Flags = EnumsToFlags(RtdFlag::hasTrackColourSupports, RtdFlag::hasSinglePieceStation, RtdFlag::noTestMode, RtdFlag::noVehicles, RtdFlag::noWallsAroundTrack, RtdFlag::describeAsInside, RtdFlag::hasTrack, RtdFlag::hasEntranceAndExit, RtdFlag::guestsCanUseUmbrella), - .RideModes = EnumsToFlags(RideMode::Maze), - .DefaultMode = RideMode::Maze, + .RideModes = EnumsToFlags(RideMode::maze), + .DefaultMode = RideMode::maze, .OperatingSettings = { 1, 64 }, .Naming = { STR_RIDE_NAME_MAZE, STR_RIDE_DESCRIPTION_MAZE }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, @@ -69,7 +69,7 @@ constexpr RideTypeDescriptor MazeRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Maze, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceMaze, .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_Default, .GetGuestWaypointLocation = GetGuestWaypointLocationDefault, diff --git a/src/openrct2/ride/rtd/gentle/MerryGoRound.h b/src/openrct2/ride/rtd/gentle/MerryGoRound.h index 3ba213c60b..523a1beb07 100644 --- a/src/openrct2/ride/rtd/gentle/MerryGoRound.h +++ b/src/openrct2/ride/rtd/gentle/MerryGoRound.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor MerryGoRoundRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack3x3, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::merryGoRound, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor MerryGoRoundRTD = RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::hasMusicByDefault, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::interestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::Rotation), - .DefaultMode = RideMode::Rotation, + .RideModes = EnumsToFlags(RideMode::rotation), + .DefaultMode = RideMode::rotation, .OperatingSettings = { 4, 25 }, .Naming = { STR_RIDE_NAME_MERRY_GO_ROUND, STR_RIDE_DESCRIPTION_MERRY_GO_ROUND }, .NameConvention = { RideComponentType::Car, RideComponentType::Structure, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/gentle/MiniGolf.h b/src/openrct2/ride/rtd/gentle/MiniGolf.h index ffeb6d1ec9..38a8f4bc0a 100644 --- a/src/openrct2/ride/rtd/gentle/MiniGolf.h +++ b/src/openrct2/ride/rtd/gentle/MiniGolf.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor MiniGolfRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::miniGolf, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor MiniGolfRTD = .Flags = kRtdFlagsHasThreeColours | EnumsToFlags(RtdFlag::noTestMode, RtdFlag::hasTrack, RtdFlag::hasOneStation, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::slightlyInterestingToLookAt), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_MINI_GOLF, STR_RIDE_DESCRIPTION_MINI_GOLF }, .NameConvention = { RideComponentType::Player, RideComponentType::Course, RideComponentType::Station }, .AvailableBreakdowns = 0, @@ -73,7 +73,7 @@ constexpr RideTypeDescriptor MiniGolfRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault, .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_Default, .GetGuestWaypointLocation = GetGuestWaypointLocationDefault, diff --git a/src/openrct2/ride/rtd/gentle/MiniHelicopters.h b/src/openrct2/ride/rtd/gentle/MiniHelicopters.h index 7519ca61d5..ce87695c2f 100644 --- a/src/openrct2/ride/rtd/gentle/MiniHelicopters.h +++ b/src/openrct2/ride/rtd/gentle/MiniHelicopters.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor MiniHelicoptersRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::miniHelicopters, @@ -33,8 +33,8 @@ constexpr RideTypeDescriptor MiniHelicoptersRTD = RtdFlag::allowDoorsOnTrack, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::showInTrackDesigner, RtdFlag::slightlyInterestingToLookAt), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_MINI_HELICOPTERS, STR_RIDE_DESCRIPTION_MINI_HELICOPTERS }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/gentle/MonorailCycles.h b/src/openrct2/ride/rtd/gentle/MonorailCycles.h index 78c73f62ac..22a6226c44 100644 --- a/src/openrct2/ride/rtd/gentle/MonorailCycles.h +++ b/src/openrct2/ride/rtd/gentle/MonorailCycles.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor MonorailCyclesRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::monorailCycles, @@ -32,8 +32,8 @@ constexpr RideTypeDescriptor MonorailCyclesRTD = RtdFlag::guestsWillRideAgain, RtdFlag::hasVehicleColours, RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::slightlyInterestingToLookAt), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_MONORAIL_CYCLES, STR_RIDE_DESCRIPTION_MONORAIL_CYCLES }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/gentle/MonsterTrucks.h b/src/openrct2/ride/rtd/gentle/MonsterTrucks.h index 4dc5334ffc..80050cf936 100644 --- a/src/openrct2/ride/rtd/gentle/MonsterTrucks.h +++ b/src/openrct2/ride/rtd/gentle/MonsterTrucks.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor MonsterTrucksRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::carRide, @@ -33,8 +33,8 @@ constexpr RideTypeDescriptor MonsterTrucksRTD = RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::showInTrackDesigner, RtdFlag::slightlyInterestingToLookAt), - .RideModes = (1uLL << static_cast(RideMode::ContinuousCircuit)), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = (1uLL << static_cast(RideMode::continuousCircuit)), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_MONSTER_TRUCKS, STR_RIDE_DESCRIPTION_MONSTER_TRUCKS }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/gentle/ObservationTower.h b/src/openrct2/ride/rtd/gentle/ObservationTower.h index 4c9bf37825..3f58c0df37 100644 --- a/src/openrct2/ride/rtd/gentle/ObservationTower.h +++ b/src/openrct2/ride/rtd/gentle/ObservationTower.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor ObservationTowerRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::TowerBase, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::observationTower, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor ObservationTowerRTD = RtdFlag::hasLoadOptions, RtdFlag::noWallsAroundTrack, RtdFlag::hasVehicleColours, RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::showInTrackDesigner, RtdFlag::slightlyInterestingToLookAt), - .RideModes = EnumsToFlags(RideMode::RotatingLift), - .DefaultMode = RideMode::RotatingLift, + .RideModes = EnumsToFlags(RideMode::rotatingLift), + .DefaultMode = RideMode::rotatingLift, .Naming = { STR_RIDE_NAME_OBSERVATION_TOWER, STR_RIDE_DESCRIPTION_OBSERVATION_TOWER }, .NameConvention = { RideComponentType::Cabin, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/gentle/SpaceRings.h b/src/openrct2/ride/rtd/gentle/SpaceRings.h index 05cb39e13c..3b3925c7c1 100644 --- a/src/openrct2/ride/rtd/gentle/SpaceRings.h +++ b/src/openrct2/ride/rtd/gentle/SpaceRings.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SpaceRingsRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack3x3, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::spaceRings, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor SpaceRingsRTD = RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::slightlyInterestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::SpaceRings), - .DefaultMode = RideMode::SpaceRings, + .RideModes = EnumsToFlags(RideMode::spaceRings), + .DefaultMode = RideMode::spaceRings, .Naming = { STR_RIDE_NAME_SPACE_RINGS, STR_RIDE_DESCRIPTION_SPACE_RINGS }, .NameConvention = { RideComponentType::Ring, RideComponentType::Structure, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT), diff --git a/src/openrct2/ride/rtd/gentle/SpiralSlide.h b/src/openrct2/ride/rtd/gentle/SpiralSlide.h index 2fbc4beb08..2d8e487715 100644 --- a/src/openrct2/ride/rtd/gentle/SpiralSlide.h +++ b/src/openrct2/ride/rtd/gentle/SpiralSlide.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SpiralSlideRTD = { - .Category = RIDE_CATEGORY_GENTLE, + .Category = RideCategory::gentle, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack2x2, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::spiralSlide, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor SpiralSlideRTD = RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::interestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::SingleRidePerAdmission, RideMode::UnlimitedRidesPerAdmission), - .DefaultMode = RideMode::SingleRidePerAdmission, + .RideModes = EnumsToFlags(RideMode::singleRidePerAdmission, RideMode::unlimitedRidesPerAdmission), + .DefaultMode = RideMode::singleRidePerAdmission, .OperatingSettings = { 1, 5 }, .Naming = { STR_RIDE_NAME_SPIRAL_SLIDE, STR_RIDE_DESCRIPTION_SPIRAL_SLIDE }, .NameConvention = { RideComponentType::Train, RideComponentType::Building, RideComponentType::Station }, @@ -72,12 +72,12 @@ constexpr RideTypeDescriptor SpiralSlideRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceSpiralSlide, .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_Default, .GetGuestWaypointLocation = GetGuestWaypointLocationDefault, .ConstructionWindowContext = RideConstructionWindowContext::Default, - .RideUpdate = UpdateSpiralSlide, + .RideUpdate = updateSpiralSlide, .specialType = RtdSpecialType::spiralSlide, }; // clang-format on diff --git a/src/openrct2/ride/rtd/shops/CashMachine.h b/src/openrct2/ride/rtd/shops/CashMachine.h index 9eb1148607..47fcab460a 100644 --- a/src/openrct2/ride/rtd/shops/CashMachine.h +++ b/src/openrct2/ride/rtd/shops/CashMachine.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor CashMachineRTD = { - .Category = RIDE_CATEGORY_SHOP, + .Category = RideCategory::shop, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x1A, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::shop, @@ -27,8 +27,8 @@ constexpr RideTypeDescriptor CashMachineRTD = .Flags = EnumsToFlags(RtdFlag::hasSinglePieceStation, RtdFlag::cannotHaveGaps, RtdFlag::noTestMode, RtdFlag::noVehicles, RtdFlag::isShopOrFacility, RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::ShopStall), - .DefaultMode = RideMode::ShopStall, + .RideModes = EnumsToFlags(RideMode::shopStall), + .DefaultMode = RideMode::shopStall, .Naming = { STR_RIDE_NAME_CASH_MACHINE, STR_RIDE_DESCRIPTION_CASH_MACHINE }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, @@ -60,7 +60,7 @@ constexpr RideTypeDescriptor CashMachineRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::KioskOrFacility, + .Classification = RideClassification::kioskOrFacility, .specialType = RtdSpecialType::cashMachine, }; // clang-format on diff --git a/src/openrct2/ride/rtd/shops/DrinkStall.h b/src/openrct2/ride/rtd/shops/DrinkStall.h index 5856349643..9779bb4dd0 100644 --- a/src/openrct2/ride/rtd/shops/DrinkStall.h +++ b/src/openrct2/ride/rtd/shops/DrinkStall.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor DrinkStallRTD = { - .Category = RIDE_CATEGORY_SHOP, + .Category = RideCategory::shop, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x1A, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::shop, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor DrinkStallRTD = RtdFlag::noVehicles, RtdFlag::isShopOrFacility, RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::sellsDrinks, RtdFlag::listVehiclesSeparately, RtdFlag::hasTrackColourMain), - .RideModes = EnumsToFlags(RideMode::ShopStall), - .DefaultMode = RideMode::ShopStall, + .RideModes = EnumsToFlags(RideMode::shopStall), + .DefaultMode = RideMode::shopStall, .Naming = { STR_RIDE_NAME_DRINK_STALL, STR_RIDE_DESCRIPTION_DRINK_STALL }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, @@ -61,6 +61,6 @@ constexpr RideTypeDescriptor DrinkStallRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::ShopOrStall, + .Classification = RideClassification::shopOrStall, }; // clang-format on diff --git a/src/openrct2/ride/rtd/shops/FirstAid.h b/src/openrct2/ride/rtd/shops/FirstAid.h index ed4543009d..0acd5eb585 100644 --- a/src/openrct2/ride/rtd/shops/FirstAid.h +++ b/src/openrct2/ride/rtd/shops/FirstAid.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor FirstAidRTD = { - .Category = RIDE_CATEGORY_SHOP, + .Category = RideCategory::shop, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x1A, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::facility, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor FirstAidRTD = RtdFlag::noVehicles, RtdFlag::isShopOrFacility, RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::guestsShouldGoInsideFacility, RtdFlag::describeAsInside, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::ShopStall), - .DefaultMode = RideMode::ShopStall, + .RideModes = EnumsToFlags(RideMode::shopStall), + .DefaultMode = RideMode::shopStall, .OperatingSettings = { 8, 8 }, .Naming = { STR_RIDE_NAME_FIRST_AID, STR_RIDE_DESCRIPTION_FIRST_AID }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, @@ -62,7 +62,7 @@ constexpr RideTypeDescriptor FirstAidRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::KioskOrFacility, + .Classification = RideClassification::kioskOrFacility, .specialType = RtdSpecialType::firstAid, }; // clang-format on diff --git a/src/openrct2/ride/rtd/shops/FoodStall.h b/src/openrct2/ride/rtd/shops/FoodStall.h index f0f1412a18..161d7fcea8 100644 --- a/src/openrct2/ride/rtd/shops/FoodStall.h +++ b/src/openrct2/ride/rtd/shops/FoodStall.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor FoodStallRTD = { - .Category = RIDE_CATEGORY_SHOP, + .Category = RideCategory::shop, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x1A, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::shop, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor FoodStallRTD = RtdFlag::noVehicles, RtdFlag::isShopOrFacility, RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::sellsFood, RtdFlag::listVehiclesSeparately, RtdFlag::hasTrackColourMain), - .RideModes = EnumsToFlags(RideMode::ShopStall), - .DefaultMode = RideMode::ShopStall, + .RideModes = EnumsToFlags(RideMode::shopStall), + .DefaultMode = RideMode::shopStall, .Naming = { STR_RIDE_NAME_FOOD_STALL, STR_RIDE_DESCRIPTION_FOOD_STALL }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, @@ -61,6 +61,6 @@ constexpr RideTypeDescriptor FoodStallRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::ShopOrStall, + .Classification = RideClassification::shopOrStall, }; // clang-format on diff --git a/src/openrct2/ride/rtd/shops/InformationKiosk.h b/src/openrct2/ride/rtd/shops/InformationKiosk.h index 10575ccbea..e2225bf8d8 100644 --- a/src/openrct2/ride/rtd/shops/InformationKiosk.h +++ b/src/openrct2/ride/rtd/shops/InformationKiosk.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor InformationKioskRTD = { - .Category = RIDE_CATEGORY_SHOP, + .Category = RideCategory::shop, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x1B, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::shop, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor InformationKioskRTD = RtdFlag::cannotHaveGaps, RtdFlag::noTestMode, RtdFlag::noVehicles, RtdFlag::isShopOrFacility, RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::ShopStall), - .DefaultMode = RideMode::ShopStall, + .RideModes = EnumsToFlags(RideMode::shopStall), + .DefaultMode = RideMode::shopStall, .Naming = { STR_RIDE_NAME_INFORMATION_KIOSK, STR_RIDE_DESCRIPTION_INFORMATION_KIOSK }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, @@ -61,6 +61,6 @@ constexpr RideTypeDescriptor InformationKioskRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::KioskOrFacility, + .Classification = RideClassification::kioskOrFacility, }; // clang-format on diff --git a/src/openrct2/ride/rtd/shops/Shop.h b/src/openrct2/ride/rtd/shops/Shop.h index 0b049cd7e5..83226124bf 100644 --- a/src/openrct2/ride/rtd/shops/Shop.h +++ b/src/openrct2/ride/rtd/shops/Shop.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor ShopRTD = { - .Category = RIDE_CATEGORY_SHOP, + .Category = RideCategory::shop, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x1A, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::shop, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor ShopRTD = RtdFlag::cannotHaveGaps, RtdFlag::noTestMode, RtdFlag::noVehicles, RtdFlag::isShopOrFacility, RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::ShopStall), - .DefaultMode = RideMode::ShopStall, + .RideModes = EnumsToFlags(RideMode::shopStall), + .DefaultMode = RideMode::shopStall, .Naming = { STR_RIDE_NAME_SHOP, STR_RIDE_DESCRIPTION_SHOP }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, .AvailableBreakdowns = 0, @@ -61,6 +61,6 @@ constexpr RideTypeDescriptor ShopRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::ShopOrStall, + .Classification = RideClassification::shopOrStall, }; // clang-format on diff --git a/src/openrct2/ride/rtd/shops/Toilets.h b/src/openrct2/ride/rtd/shops/Toilets.h index 14d5f02143..78d69f9f64 100644 --- a/src/openrct2/ride/rtd/shops/Toilets.h +++ b/src/openrct2/ride/rtd/shops/Toilets.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor ToiletsRTD = { - .Category = RIDE_CATEGORY_SHOP, + .Category = RideCategory::shop, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x1A, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::facility, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor ToiletsRTD = RtdFlag::noVehicles, RtdFlag::isShopOrFacility, RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::guestsShouldGoInsideFacility, RtdFlag::describeAsInside, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::ShopStall), - .DefaultMode = RideMode::ShopStall, + .RideModes = EnumsToFlags(RideMode::shopStall), + .DefaultMode = RideMode::shopStall, .OperatingSettings = { 4, 4 }, .Naming = { STR_RIDE_NAME_TOILETS, STR_RIDE_DESCRIPTION_TOILETS }, .NameConvention = { RideComponentType::Car, RideComponentType::Building, RideComponentType::Station }, @@ -62,7 +62,7 @@ constexpr RideTypeDescriptor ToiletsRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::KioskOrFacility, + .Classification = RideClassification::kioskOrFacility, .specialType = RtdSpecialType::toilet, }; // clang-format on diff --git a/src/openrct2/ride/rtd/thrill/3DCinema.h b/src/openrct2/ride/rtd/thrill/3DCinema.h index 88b71e6d2e..695240ccd6 100644 --- a/src/openrct2/ride/rtd/thrill/3DCinema.h +++ b/src/openrct2/ride/rtd/thrill/3DCinema.h @@ -17,7 +17,7 @@ // C++ does not allow names to start with a number, hence the absence of the '3D' prefix. constexpr RideTypeDescriptor CinemaRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack3x3, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::_3DCinema, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor CinemaRTD = RtdFlag::isFlatRide, RtdFlag::describeAsInside, RtdFlag::hasVehicleColours, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::MouseTails3DFilm, RideMode::StormChasers3DFilm, RideMode::SpaceRaiders3DFilm), - .DefaultMode = RideMode::MouseTails3DFilm, + .RideModes = EnumsToFlags(RideMode::mouseTails3DFilm, RideMode::stormChasers3DFilm, RideMode::spaceRaiders3DFilm), + .DefaultMode = RideMode::mouseTails3DFilm, .Naming = { STR_RIDE_NAME_3D_CINEMA, STR_RIDE_DESCRIPTION_3D_CINEMA }, .NameConvention = { RideComponentType::Building, RideComponentType::Structure, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT), diff --git a/src/openrct2/ride/rtd/thrill/Enterprise.h b/src/openrct2/ride/rtd/thrill/Enterprise.h index bfc2b2ce60..1aa32d417e 100644 --- a/src/openrct2/ride/rtd/thrill/Enterprise.h +++ b/src/openrct2/ride/rtd/thrill/Enterprise.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor EnterpriseRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack4x4, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::enterprise, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor EnterpriseRTD = RtdFlag::isFlatRide, RtdFlag::guestsWillRideAgain, RtdFlag::hasVehicleColours, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::interestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::Rotation), - .DefaultMode = RideMode::Rotation, + .RideModes = EnumsToFlags(RideMode::rotation), + .DefaultMode = RideMode::rotation, .OperatingSettings = { 10, 20 }, .Naming = { STR_RIDE_NAME_ENTERPRISE, STR_RIDE_DESCRIPTION_ENTERPRISE }, .NameConvention = { RideComponentType::Wheel, RideComponentType::Structure, RideComponentType::Station }, @@ -66,7 +66,7 @@ constexpr RideTypeDescriptor EnterpriseRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault, .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_Default, .GetGuestWaypointLocation = GetGuestWaypointLocationEnterprise, diff --git a/src/openrct2/ride/rtd/thrill/GoKarts.h b/src/openrct2/ride/rtd/thrill/GoKarts.h index b8dbdea400..3ac9605ac5 100644 --- a/src/openrct2/ride/rtd/thrill/GoKarts.h +++ b/src/openrct2/ride/rtd/thrill/GoKarts.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor GoKartsRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::goKarts, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor GoKartsRTD = .Flags = EnumsToFlags(RtdFlag::hasTrackColourMain, RtdFlag::hasTrackColourSupports, RtdFlag::noTestMode, RtdFlag::hasOneStation, RtdFlag::noWallsAroundTrack, RtdFlag::guestsWillRideAgain, RtdFlag::hasVehicleColours, RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::interestingToLookAt), - .RideModes = EnumsToFlags(RideMode::Race, RideMode::ContinuousCircuit), - .DefaultMode = RideMode::Race, + .RideModes = EnumsToFlags(RideMode::race, RideMode::continuousCircuit), + .DefaultMode = RideMode::race, .OperatingSettings = { 1, 10 }, .Naming = { STR_RIDE_NAME_GO_KARTS, STR_RIDE_DESCRIPTION_GO_KARTS }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/thrill/LaunchedFreefall.h b/src/openrct2/ride/rtd/thrill/LaunchedFreefall.h index c8c0e4f838..af34ce2517 100644 --- a/src/openrct2/ride/rtd/thrill/LaunchedFreefall.h +++ b/src/openrct2/ride/rtd/thrill/LaunchedFreefall.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor LaunchedFreefallRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::TowerBase, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::launchedFreefall, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor LaunchedFreefallRTD = RtdFlag::hasDataLogging, RtdFlag::hasLoadOptions, RtdFlag::noWallsAroundTrack, RtdFlag::guestsWillRideAgain, RtdFlag::hasVehicleColours, RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::showInTrackDesigner, RtdFlag::interestingToLookAt), - .RideModes = EnumsToFlags(RideMode::UpwardLaunch, RideMode::DownwardLaunch), - .DefaultMode = RideMode::UpwardLaunch, + .RideModes = EnumsToFlags(RideMode::upwardLaunch, RideMode::downwardLaunch), + .DefaultMode = RideMode::upwardLaunch, .OperatingSettings = { 10, 40 }, .Naming = { STR_RIDE_NAME_LAUNCHED_FREEFALL, STR_RIDE_DESCRIPTION_LAUNCHED_FREEFALL }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/thrill/MagicCarpet.h b/src/openrct2/ride/rtd/thrill/MagicCarpet.h index 9a740ab8f8..8ded844848 100644 --- a/src/openrct2/ride/rtd/thrill/MagicCarpet.h +++ b/src/openrct2/ride/rtd/thrill/MagicCarpet.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor MagicCarpetRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x4A, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::magicCarpet, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor MagicCarpetRTD = RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::interestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::Swing), - .DefaultMode = RideMode::Swing, + .RideModes = EnumsToFlags(RideMode::swing), + .DefaultMode = RideMode::swing, .OperatingSettings = { 7, 15 }, .Naming = { STR_RIDE_NAME_MAGIC_CARPET, STR_RIDE_DESCRIPTION_MAGIC_CARPET }, .NameConvention = { RideComponentType::Car, RideComponentType::Structure, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/thrill/MotionSimulator.h b/src/openrct2/ride/rtd/thrill/MotionSimulator.h index 228c910f4b..87e588547d 100644 --- a/src/openrct2/ride/rtd/thrill/MotionSimulator.h +++ b/src/openrct2/ride/rtd/thrill/MotionSimulator.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor MotionSimulatorRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack2x2, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::motionSimulator, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor MotionSimulatorRTD = RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::slightlyInterestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::FilmAvengingAviators, RideMode::FilmThrillRiders), - .DefaultMode = RideMode::FilmAvengingAviators, + .RideModes = EnumsToFlags(RideMode::filmAvengingAviators, RideMode::filmThrillRiders), + .DefaultMode = RideMode::filmAvengingAviators, .Naming = { STR_RIDE_NAME_MOTION_SIMULATOR, STR_RIDE_DESCRIPTION_MOTION_SIMULATOR }, .NameConvention = { RideComponentType::Car, RideComponentType::Structure, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT), @@ -64,7 +64,7 @@ constexpr RideTypeDescriptor MotionSimulatorRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault, .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_Default, .GetGuestWaypointLocation = GetGuestWaypointLocationDefault, diff --git a/src/openrct2/ride/rtd/thrill/RotoDrop.h b/src/openrct2/ride/rtd/thrill/RotoDrop.h index 3252a5a29a..b73748bbe0 100644 --- a/src/openrct2/ride/rtd/thrill/RotoDrop.h +++ b/src/openrct2/ride/rtd/thrill/RotoDrop.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor RotoDropRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::TowerBase, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::rotoDrop, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor RotoDropRTD = RtdFlag::guestsWillRideAgain, RtdFlag::hasVehicleColours, RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::showInTrackDesigner, RtdFlag::interestingToLookAt), - .RideModes = EnumsToFlags(RideMode::FreefallDrop), - .DefaultMode = RideMode::FreefallDrop, + .RideModes = EnumsToFlags(RideMode::freefallDrop), + .DefaultMode = RideMode::freefallDrop, .Naming = { STR_RIDE_NAME_ROTO_DROP, STR_RIDE_DESCRIPTION_ROTO_DROP }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_RESTRAINTS_STUCK_CLOSED) | (1 << BREAKDOWN_RESTRAINTS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/thrill/SwingingInverterShip.h b/src/openrct2/ride/rtd/thrill/SwingingInverterShip.h index ee719c1e75..e20d0bc65f 100644 --- a/src/openrct2/ride/rtd/thrill/SwingingInverterShip.h +++ b/src/openrct2/ride/rtd/thrill/SwingingInverterShip.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SwingingInverterShipRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x4B, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::swingingInverterShip, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor SwingingInverterShipRTD = RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::interestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::Swing), - .DefaultMode = RideMode::Swing, + .RideModes = EnumsToFlags(RideMode::swing), + .DefaultMode = RideMode::swing, .OperatingSettings = { 7, 15 }, .Naming = { STR_RIDE_NAME_SWINGING_INVERTER_SHIP, STR_RIDE_DESCRIPTION_SWINGING_INVERTER_SHIP }, .NameConvention = { RideComponentType::Ship, RideComponentType::Structure, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/thrill/SwingingShip.h b/src/openrct2/ride/rtd/thrill/SwingingShip.h index 90d169ab1f..5827fbde4f 100644 --- a/src/openrct2/ride/rtd/thrill/SwingingShip.h +++ b/src/openrct2/ride/rtd/thrill/SwingingShip.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SwingingShipRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack1x5, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::swingingShip, @@ -31,8 +31,8 @@ constexpr RideTypeDescriptor SwingingShipRTD = RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::interestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::Swing), - .DefaultMode = RideMode::Swing, + .RideModes = EnumsToFlags(RideMode::swing), + .DefaultMode = RideMode::swing, .OperatingSettings = { 7, 25 }, .Naming = { STR_RIDE_NAME_SWINGING_SHIP, STR_RIDE_DESCRIPTION_SWINGING_SHIP }, .NameConvention = { RideComponentType::Ship, RideComponentType::Structure, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/thrill/TopSpin.h b/src/openrct2/ride/rtd/thrill/TopSpin.h index 0e9e9a77b5..5fccfa303d 100644 --- a/src/openrct2/ride/rtd/thrill/TopSpin.h +++ b/src/openrct2/ride/rtd/thrill/TopSpin.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor TopSpinRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack3x3, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::topSpin, @@ -30,8 +30,8 @@ constexpr RideTypeDescriptor TopSpinRTD = RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::interestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::Beginners, RideMode::Intense, RideMode::Berserk), - .DefaultMode = RideMode::Beginners, + .RideModes = EnumsToFlags(RideMode::beginners, RideMode::intense, RideMode::berserk), + .DefaultMode = RideMode::beginners, .Naming = { STR_RIDE_NAME_TOP_SPIN, STR_RIDE_DESCRIPTION_TOP_SPIN }, .NameConvention = { RideComponentType::Car, RideComponentType::Structure, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT), diff --git a/src/openrct2/ride/rtd/thrill/Twist.h b/src/openrct2/ride/rtd/thrill/Twist.h index 020c5c699f..ad1411636a 100644 --- a/src/openrct2/ride/rtd/thrill/Twist.h +++ b/src/openrct2/ride/rtd/thrill/Twist.h @@ -16,7 +16,7 @@ // clang-format off constexpr RideTypeDescriptor TwistRTD = { - .Category = RIDE_CATEGORY_THRILL, + .Category = RideCategory::thrill, .StartTrackPiece = OpenRCT2::TrackElemType::FlatTrack3x3, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::twist, @@ -28,8 +28,8 @@ constexpr RideTypeDescriptor TwistRTD = RtdFlag::vehicleIsIntegral, RtdFlag::noWallsAroundTrack, RtdFlag::isFlatRide, RtdFlag::hasVehicleColours, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::singleSession, RtdFlag::interestingToLookAt, RtdFlag::listVehiclesSeparately), - .RideModes = EnumsToFlags(RideMode::Rotation), - .DefaultMode = RideMode::Rotation, + .RideModes = EnumsToFlags(RideMode::rotation), + .DefaultMode = RideMode::rotation, .OperatingSettings = { 3, 6, 3 }, .Naming = { STR_RIDE_NAME_TWIST, STR_RIDE_DESCRIPTION_TWIST }, .NameConvention = { RideComponentType::Structure, RideComponentType::Structure, RideComponentType::Station }, diff --git a/src/openrct2/ride/rtd/transport/Chairlift.h b/src/openrct2/ride/rtd/transport/Chairlift.h index 7ecdbbc4f8..545236c6ff 100644 --- a/src/openrct2/ride/rtd/transport/Chairlift.h +++ b/src/openrct2/ride/rtd/transport/Chairlift.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor ChairliftRTD = { - .Category = RIDE_CATEGORY_TRANSPORT, + .Category = RideCategory::transport, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::chairlift, @@ -32,8 +32,8 @@ constexpr RideTypeDescriptor ChairliftRTD = RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::isTransportRide, RtdFlag::showInTrackDesigner, RtdFlag::slightlyInterestingToLookAt, RtdFlag::isSuspended), - .RideModes = EnumsToFlags(RideMode::StationToStation), - .DefaultMode = RideMode::StationToStation, + .RideModes = EnumsToFlags(RideMode::stationToStation), + .DefaultMode = RideMode::stationToStation, .OperatingSettings = { 1, 4 }, .Naming = { STR_RIDE_NAME_CHAIRLIFT, STR_RIDE_DESCRIPTION_CHAIRLIFT }, .NameConvention = { RideComponentType::Car, RideComponentType::Track, RideComponentType::Station }, @@ -83,11 +83,11 @@ constexpr RideTypeDescriptor ChairliftRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault, .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_Default, .GetGuestWaypointLocation = GetGuestWaypointLocationDefault, .ConstructionWindowContext = RideConstructionWindowContext::Default, - .RideUpdate = UpdateChairlift, + .RideUpdate = updateChairlift, }; // clang-format on diff --git a/src/openrct2/ride/rtd/transport/Lift.h b/src/openrct2/ride/rtd/transport/Lift.h index 30e5dd8357..a2a2cb32fc 100644 --- a/src/openrct2/ride/rtd/transport/Lift.h +++ b/src/openrct2/ride/rtd/transport/Lift.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor LiftRTD = { - .Category = RIDE_CATEGORY_TRANSPORT, + .Category = RideCategory::transport, .StartTrackPiece = OpenRCT2::TrackElemType::TowerBase, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::lift, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor LiftRTD = RtdFlag::cannotHaveGaps, RtdFlag::hasLoadOptions, RtdFlag::noWallsAroundTrack, RtdFlag::hasVehicleColours, RtdFlag::hasTrack, RtdFlag::allowExtraTowerBases, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::isTransportRide, RtdFlag::showInTrackDesigner), - .RideModes = EnumsToFlags(RideMode::Shuttle), - .DefaultMode = RideMode::Shuttle, + .RideModes = EnumsToFlags(RideMode::shuttle), + .DefaultMode = RideMode::shuttle, .Naming = { STR_RIDE_NAME_LIFT, STR_RIDE_DESCRIPTION_LIFT }, .NameConvention = { RideComponentType::Cabin, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_DOORS_STUCK_CLOSED) | (1 << BREAKDOWN_DOORS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/transport/MiniatureRailway.h b/src/openrct2/ride/rtd/transport/MiniatureRailway.h index 820bf50f58..f933dd57a8 100644 --- a/src/openrct2/ride/rtd/transport/MiniatureRailway.h +++ b/src/openrct2/ride/rtd/transport/MiniatureRailway.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor MiniatureRailwayRTD = { - .Category = RIDE_CATEGORY_TRANSPORT, + .Category = RideCategory::transport, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::miniatureRailway, @@ -33,8 +33,8 @@ constexpr RideTypeDescriptor MiniatureRailwayRTD = RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::allowMultipleCircuits, RtdFlag::isTransportRide, RtdFlag::showInTrackDesigner, RtdFlag::supportsLevelCrossings), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::Shuttle), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::shuttle), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_MINIATURE_RAILWAY, STR_RIDE_DESCRIPTION_MINIATURE_RAILWAY }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/transport/Monorail.h b/src/openrct2/ride/rtd/transport/Monorail.h index aeb91d45e2..77bcdf5cb4 100644 --- a/src/openrct2/ride/rtd/transport/Monorail.h +++ b/src/openrct2/ride/rtd/transport/Monorail.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor MonorailRTD = { - .Category = RIDE_CATEGORY_TRANSPORT, + .Category = RideCategory::transport, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::monorail, @@ -33,8 +33,8 @@ constexpr RideTypeDescriptor MonorailRTD = RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::allowMultipleCircuits, RtdFlag::isTransportRide, RtdFlag::showInTrackDesigner), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::Shuttle), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::shuttle), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_MONORAIL, STR_RIDE_DESCRIPTION_MONORAIL }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_DOORS_STUCK_CLOSED) | (1 << BREAKDOWN_DOORS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/transport/SuspendedMonorail.h b/src/openrct2/ride/rtd/transport/SuspendedMonorail.h index 7e0adae84c..a250896f00 100644 --- a/src/openrct2/ride/rtd/transport/SuspendedMonorail.h +++ b/src/openrct2/ride/rtd/transport/SuspendedMonorail.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor SuspendedMonorailRTD = { - .Category = RIDE_CATEGORY_TRANSPORT, + .Category = RideCategory::transport, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::suspendedMonorail, @@ -33,8 +33,8 @@ constexpr RideTypeDescriptor SuspendedMonorailRTD = RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::allowMultipleCircuits, RtdFlag::isTransportRide, RtdFlag::showInTrackDesigner, RtdFlag::isSuspended), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit, RideMode::Shuttle), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit, RideMode::shuttle), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_SUSPENDED_MONORAIL, STR_RIDE_DESCRIPTION_SUSPENDED_MONORAIL }, .NameConvention = { RideComponentType::Train, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_DOORS_STUCK_CLOSED) | (1 << BREAKDOWN_DOORS_STUCK_OPEN) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/water/BoatHire.h b/src/openrct2/ride/rtd/water/BoatHire.h index c2c86306a7..f6e9ea8a71 100644 --- a/src/openrct2/ride/rtd/water/BoatHire.h +++ b/src/openrct2/ride/rtd/water/BoatHire.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor BoatHireRTD = { - .Category = RIDE_CATEGORY_WATER, + .Category = RideCategory::water, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::boatHire, @@ -29,8 +29,8 @@ constexpr RideTypeDescriptor BoatHireRTD = .Flags = EnumsToFlags(RtdFlag::hasTrackColourMain, RtdFlag::hasTrackColourSupports, RtdFlag::trackMustBeOnWater, RtdFlag::noTestMode, RtdFlag::hasLoadOptions, RtdFlag::hasVehicleColours, RtdFlag::checkForStalling, RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit), - .RideModes = EnumsToFlags(RideMode::BoatHire), - .DefaultMode = RideMode::BoatHire, + .RideModes = EnumsToFlags(RideMode::boatHire), + .DefaultMode = RideMode::boatHire, .Naming = { STR_RIDE_NAME_BOAT_HIRE, STR_RIDE_DESCRIPTION_BOAT_HIRE }, .NameConvention = { RideComponentType::Boat, RideComponentType::DockingPlatform, RideComponentType::DockingPlatform }, .AvailableBreakdowns = (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/ride/rtd/water/DinghySlide.h b/src/openrct2/ride/rtd/water/DinghySlide.h index e08ffbfbf3..33733646b7 100644 --- a/src/openrct2/ride/rtd/water/DinghySlide.h +++ b/src/openrct2/ride/rtd/water/DinghySlide.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor DinghySlideRTD = { - .Category = RIDE_CATEGORY_WATER, + .Category = RideCategory::water, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor( { @@ -46,8 +46,8 @@ constexpr RideTypeDescriptor DinghySlideRTD = RtdFlag::checkForStalling, RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::hasAirTime, RtdFlag::showInTrackDesigner, RtdFlag::interestingToLookAt), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_DINGHY_SLIDE, STR_RIDE_DESCRIPTION_DINGHY_SLIDE }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT), diff --git a/src/openrct2/ride/rtd/water/LogFlume.h b/src/openrct2/ride/rtd/water/LogFlume.h index 5918ee4dee..54d85718ca 100644 --- a/src/openrct2/ride/rtd/water/LogFlume.h +++ b/src/openrct2/ride/rtd/water/LogFlume.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor LogFlumeRTD = { - .Category = RIDE_CATEGORY_WATER, + .Category = RideCategory::water, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::logFlume, @@ -32,8 +32,8 @@ constexpr RideTypeDescriptor LogFlumeRTD = RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::hasAirTime, RtdFlag::showInTrackDesigner, RtdFlag::interestingToLookAt), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_LOG_FLUME, STR_RIDE_DESCRIPTION_LOG_FLUME }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_CONTROL_FAILURE), @@ -79,7 +79,7 @@ constexpr RideTypeDescriptor LogFlumeRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault, .SpecialElementRatingAdjustment = SpecialTrackElementRatingsAjustment_LogFlume, }; diff --git a/src/openrct2/ride/rtd/water/RiverRafts.h b/src/openrct2/ride/rtd/water/RiverRafts.h index 83b272b7a4..63c51eca53 100644 --- a/src/openrct2/ride/rtd/water/RiverRafts.h +++ b/src/openrct2/ride/rtd/water/RiverRafts.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor RiverRaftsRTD = { - .Category = RIDE_CATEGORY_WATER, + .Category = RideCategory::water, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::splashBoats, @@ -32,8 +32,8 @@ constexpr RideTypeDescriptor RiverRaftsRTD = RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::showInTrackDesigner, RtdFlag::slightlyInterestingToLookAt), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_RIVER_RAFTS, STR_RIDE_DESCRIPTION_RIVER_RAFTS }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT), diff --git a/src/openrct2/ride/rtd/water/RiverRapids.h b/src/openrct2/ride/rtd/water/RiverRapids.h index 879be7b800..fc5e8cce78 100644 --- a/src/openrct2/ride/rtd/water/RiverRapids.h +++ b/src/openrct2/ride/rtd/water/RiverRapids.h @@ -17,7 +17,7 @@ // clang-format off constexpr RideTypeDescriptor RiverRapidsRTD = { - .Category = RIDE_CATEGORY_WATER, + .Category = RideCategory::water, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::riverRapids, @@ -33,8 +33,8 @@ constexpr RideTypeDescriptor RiverRapidsRTD = RtdFlag::hasVehicleColours, RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::hasAirTime, RtdFlag::showInTrackDesigner, RtdFlag::interestingToLookAt), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_RIVER_RAPIDS, STR_RIDE_DESCRIPTION_RIVER_RAPIDS }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_CONTROL_FAILURE), @@ -80,7 +80,7 @@ constexpr RideTypeDescriptor RiverRapidsRTD = .StartRideMusic = OpenRCT2::RideAudio::DefaultStartRideMusicChannel, .DesignCreateMode = TrackDesignCreateMode::Default, .MusicUpdateFunction = DefaultMusicUpdate, - .Classification = RideClassification::Ride, + .Classification = RideClassification::ride, .UpdateLeaveEntrance = PeepUpdateRideLeaveEntranceDefault, }; // clang-format on diff --git a/src/openrct2/ride/rtd/water/SplashBoats.h b/src/openrct2/ride/rtd/water/SplashBoats.h index e6fa2a771c..d769885651 100644 --- a/src/openrct2/ride/rtd/water/SplashBoats.h +++ b/src/openrct2/ride/rtd/water/SplashBoats.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor SplashBoatsRTD = { - .Category = RIDE_CATEGORY_WATER, + .Category = RideCategory::water, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::splashBoats, @@ -33,8 +33,8 @@ constexpr RideTypeDescriptor SplashBoatsRTD = RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits, RtdFlag::hasAirTime, RtdFlag::showInTrackDesigner, RtdFlag::slightlyInterestingToLookAt), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_SPLASH_BOATS, STR_RIDE_DESCRIPTION_SPLASH_BOATS }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::Station }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_CONTROL_FAILURE), diff --git a/src/openrct2/ride/rtd/water/SubmarineRide.h b/src/openrct2/ride/rtd/water/SubmarineRide.h index a3cbdb97b7..6d62f4edaf 100644 --- a/src/openrct2/ride/rtd/water/SubmarineRide.h +++ b/src/openrct2/ride/rtd/water/SubmarineRide.h @@ -18,7 +18,7 @@ // clang-format off constexpr RideTypeDescriptor SubmarineRideRTD = { - .Category = RIDE_CATEGORY_WATER, + .Category = RideCategory::water, .StartTrackPiece = OpenRCT2::TrackElemType::EndStation, .TrackPaintFunctions = TrackDrawerDescriptor({ .trackStyle = TrackStyle::submarineRide, @@ -32,8 +32,8 @@ constexpr RideTypeDescriptor SubmarineRideRTD = RtdFlag::hasVehicleColours, RtdFlag::hasTrack, RtdFlag::supportsMultipleColourSchemes, RtdFlag::allowMusic, RtdFlag::checkGForces, RtdFlag::hasEntranceAndExit, RtdFlag::allowMoreVehiclesThanStationFits), - .RideModes = EnumsToFlags(RideMode::ContinuousCircuit), - .DefaultMode = RideMode::ContinuousCircuit, + .RideModes = EnumsToFlags(RideMode::continuousCircuit), + .DefaultMode = RideMode::continuousCircuit, .Naming = { STR_RIDE_NAME_SUBMARINE_RIDE, STR_RIDE_DESCRIPTION_SUBMARINE_RIDE }, .NameConvention = { RideComponentType::Boat, RideComponentType::Track, RideComponentType::DockingPlatform }, .AvailableBreakdowns = (1 << BREAKDOWN_SAFETY_CUT_OUT) | (1 << BREAKDOWN_VEHICLE_MALFUNCTION), diff --git a/src/openrct2/scenario/Scenario.cpp b/src/openrct2/scenario/Scenario.cpp index 2b49f70251..041b35a6b4 100644 --- a/src/openrct2/scenario/Scenario.cpp +++ b/src/openrct2/scenario/Scenario.cpp @@ -7,8 +7,6 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include "Scenario.h" - #include "../Cheats.h" #include "../Context.h" #include "../Date.h" @@ -68,7 +66,7 @@ using namespace OpenRCT2; -const StringId kScenarioCategoryStringIds[SCENARIO_CATEGORY_COUNT] = { +const StringId kScenarioCategoryStringIds[EnumValue(ScenarioCategory::count)] = { STR_BEGINNER_PARKS, STR_CHALLENGING_PARKS, STR_EXPERT_PARKS, STR_REAL_PARKS, STR_OTHER_PARKS, STR_DLC_PARKS, STR_BUILD_YOUR_OWN_PARKS, STR_COMPETITIONS, STR_UCES_TM, STR_UCES_KD, }; @@ -88,7 +86,7 @@ void ScenarioBegin(GameState_t& gameState) GameLoadInit(); ScenarioReset(gameState); - if (gameState.ScenarioObjective.Type != OBJECTIVE_NONE && !gLoadKeepWindowsOpen) + if (gameState.scenarioObjective.Type != OBJECTIVE_NONE && !gLoadKeepWindowsOpen) ContextOpenWindowView(WV_PARK_OBJECTIVE); gScreenAge = 0; @@ -98,46 +96,44 @@ void ScenarioReset(GameState_t& gameState) { // Set the scenario pseudo-random seeds Random::RCT2::Seed s{ 0x1234567F ^ Platform::GetTicks(), 0x789FABCD ^ Platform::GetTicks() }; - gameState.ScenarioRand.seed(s); + gameState.scenarioRand.seed(s); ResearchResetCurrentItem(); auto intent = Intent(INTENT_ACTION_SET_DEFAULT_SCENERY_CONFIG); ContextBroadcastIntent(&intent); - News::InitQueue(); + News::InitQueue(gameState); - gameState.Park.Rating = Park::CalculateParkRating(); - gameState.Park.Value = Park::CalculateParkValue(); - gameState.CompanyValue = Park::CalculateCompanyValue(); - gameState.HistoricalProfit = gameState.InitialCash - gameState.BankLoan; - gameState.Cash = gameState.InitialCash; + gameState.park.Rating = Park::CalculateParkRating(); + gameState.park.Value = Park::CalculateParkValue(); + gameState.companyValue = Park::CalculateCompanyValue(); + gameState.historicalProfit = gameState.initialCash - gameState.bankLoan; + gameState.cash = gameState.initialCash; auto& objManager = GetContext()->GetObjectManager(); - if (auto* object = objManager.GetLoadedObject(ObjectType::scenarioText, 0); object != nullptr) + if (auto* textObject = objManager.GetLoadedObject(0); textObject != nullptr) { - auto* textObject = reinterpret_cast(object); - - gameState.ScenarioName = textObject->GetScenarioName(); - gameState.Park.Name = textObject->GetParkName(); - gameState.ScenarioDetails = textObject->GetScenarioDetails(); + gameState.scenarioName = textObject->GetScenarioName(); + gameState.park.Name = textObject->GetParkName(); + gameState.scenarioDetails = textObject->GetScenarioDetails(); } // Set the last saved game path auto env = GetContext()->GetPlatformEnvironment(); - auto savePath = env->GetDirectoryPath(DIRBASE::USER, DIRID::SAVE); - gScenarioSavePath = Path::Combine(savePath, gameState.Park.Name + u8".park"); + auto savePath = env->GetDirectoryPath(DirBase::user, DirId::saves); + gScenarioSavePath = Path::Combine(savePath, gameState.park.Name + u8".park"); - gameState.CurrentExpenditure = 0; - gameState.CurrentProfit = 0; - gameState.WeeklyProfitAverageDividend = 0; - gameState.WeeklyProfitAverageDivisor = 0; - gameState.TotalAdmissions = 0; - gameState.TotalIncomeFromAdmissions = 0; + gameState.currentExpenditure = 0; + gameState.currentProfit = 0; + gameState.weeklyProfitAverageDividend = 0; + gameState.weeklyProfitAverageDivisor = 0; + gameState.totalAdmissions = 0; + gameState.totalIncomeFromAdmissions = 0; - gameState.Park.Flags &= ~PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT; - gameState.ScenarioCompletedCompanyValue = kMoney64Undefined; - gameState.ScenarioCompletedBy = "?"; + gameState.park.Flags &= ~PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT; + gameState.scenarioCompletedCompanyValue = kMoney64Undefined; + gameState.scenarioCompletedBy = "?"; Park::ResetHistories(gameState); FinanceResetHistory(); @@ -149,24 +145,24 @@ void ScenarioReset(GameState_t& gameState) MapCountRemainingLandRights(); Staff::ResetStats(); - gameState.LastEntranceStyle = objManager.GetLoadedObjectEntryIndex("rct2.station.plain"); - if (gameState.LastEntranceStyle == kObjectEntryIndexNull) + gameState.lastEntranceStyle = objManager.GetLoadedObjectEntryIndex("rct2.station.plain"); + if (gameState.lastEntranceStyle == kObjectEntryIndexNull) { // Fall back to first entrance object - gameState.LastEntranceStyle = 0; + gameState.lastEntranceStyle = 0; } - gameState.MarketingCampaigns.clear(); - gameState.Park.RatingCasualtyPenalty = 0; + gameState.marketingCampaigns.clear(); + gameState.park.RatingCasualtyPenalty = 0; // Open park with free entry when there is no money - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) { - gameState.Park.Flags |= PARK_FLAGS_PARK_OPEN; - gameState.Park.EntranceFee = 0; + gameState.park.Flags |= PARK_FLAGS_PARK_OPEN; + gameState.park.EntranceFee = 0; } - gameState.Park.Flags |= PARK_FLAGS_SPRITES_INITIALISED; + gameState.park.Flags |= PARK_FLAGS_SPRITES_INITIALISED; gGamePaused = false; } @@ -187,7 +183,7 @@ static void ScenarioEnd() */ void ScenarioFailure(GameState_t& gameState) { - gameState.ScenarioCompletedCompanyValue = kCompanyValueOnFailedObjective; + gameState.scenarioCompletedCompanyValue = kCompanyValueOnFailedObjective; ScenarioEnd(); } @@ -197,16 +193,16 @@ void ScenarioFailure(GameState_t& gameState) */ void ScenarioSuccess(GameState_t& gameState) { - auto companyValue = gameState.CompanyValue; + auto companyValue = gameState.companyValue; - gameState.ScenarioCompletedCompanyValue = companyValue; + gameState.scenarioCompletedCompanyValue = companyValue; PeepApplause(); - if (ScenarioRepositoryTryRecordHighscore(gameState.ScenarioFileName.c_str(), companyValue, nullptr)) + if (ScenarioRepositoryTryRecordHighscore(gameState.scenarioFileName.c_str(), companyValue, nullptr)) { // Allow name entry - gameState.Park.Flags |= PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT; - gameState.ScenarioCompanyValueRecord = companyValue; + gameState.park.Flags |= PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT; + gameState.scenarioCompanyValueRecord = companyValue; } ScenarioEnd(); } @@ -217,11 +213,11 @@ void ScenarioSuccess(GameState_t& gameState) */ void ScenarioSuccessSubmitName(GameState_t& gameState, const char* name) { - if (ScenarioRepositoryTryRecordHighscore(gameState.ScenarioFileName.c_str(), gameState.ScenarioCompanyValueRecord, name)) + if (ScenarioRepositoryTryRecordHighscore(gameState.scenarioFileName.c_str(), gameState.scenarioCompanyValueRecord, name)) { - gameState.ScenarioCompletedBy = name; + gameState.scenarioCompletedBy = name; } - gameState.Park.Flags &= ~PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT; + gameState.park.Flags &= ~PARK_FLAGS_SCENARIO_COMPLETE_NAME_INPUT; } /** @@ -230,14 +226,14 @@ void ScenarioSuccessSubmitName(GameState_t& gameState, const char* name) */ static void ScenarioCheckEntranceFeeTooHigh() { - const auto& gameState = GetGameState(); - const auto max_fee = AddClamp(gameState.TotalRideValueForMoney, gameState.TotalRideValueForMoney / 2); + const auto& gameState = getGameState(); + const auto max_fee = AddClamp(gameState.totalRideValueForMoney, gameState.totalRideValueForMoney / 2); - if ((gameState.Park.Flags & PARK_FLAGS_PARK_OPEN) && Park::GetEntranceFee() > max_fee) + if ((gameState.park.Flags & PARK_FLAGS_PARK_OPEN) && Park::GetEntranceFee() > max_fee) { - if (!gameState.Park.Entrances.empty()) + if (!gameState.park.Entrances.empty()) { - const auto& entrance = gameState.Park.Entrances[0]; + const auto& entrance = gameState.park.Entrances[0]; auto x = entrance.x + 16; auto y = entrance.y + 16; @@ -291,7 +287,7 @@ static void ScenarioDayUpdate(GameState_t& gameState) { FinanceUpdateDailyProfit(); PeepUpdateDaysInQueue(); - switch (gameState.ScenarioObjective.Type) + switch (gameState.scenarioObjective.Type) { case OBJECTIVE_10_ROLLERCOASTERS: case OBJECTIVE_GUESTS_AND_RATING: @@ -307,8 +303,8 @@ static void ScenarioDayUpdate(GameState_t& gameState) } // Lower the casualty penalty - uint16_t casualtyPenaltyModifier = (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) ? 40 : 7; - gameState.Park.RatingCasualtyPenalty = std::max(0, gameState.Park.RatingCasualtyPenalty - casualtyPenaltyModifier); + uint16_t casualtyPenaltyModifier = (gameState.park.Flags & PARK_FLAGS_NO_MONEY) ? 40 : 7; + gameState.park.RatingCasualtyPenalty = std::max(0, gameState.park.RatingCasualtyPenalty - casualtyPenaltyModifier); auto intent = Intent(INTENT_ACTION_UPDATE_DATE); ContextBroadcastIntent(&intent); @@ -347,7 +343,7 @@ static void ScenarioFortnightUpdate() static void ScenarioMonthUpdate() { FinanceShiftExpenditureTable(); - ScenarioCheckObjective(GetGameState()); + ScenarioCheckObjective(getGameState()); ScenarioCheckEntranceFeeTooHigh(); AwardUpdateAll(); } @@ -357,7 +353,7 @@ static void ScenarioUpdateDayNightCycle() float currentDayNightCycle = gDayNightCycle; gDayNightCycle = 0; - if (gScreenFlags == SCREEN_FLAGS_PLAYING && Config::Get().general.DayNightCycle) + if (gLegacyScene == LegacyScene::playing && Config::Get().general.DayNightCycle) { float monthFraction = GetDate().GetMonthTicks() / static_cast(kTicksPerMonth); if (monthFraction < (1 / 8.0f)) @@ -397,7 +393,7 @@ void ScenarioUpdate(GameState_t& gameState) { PROFILED_FUNCTION(); - if (gScreenFlags == SCREEN_FLAGS_PLAYING) + if (gLegacyScene == LegacyScene::playing) { auto& date = GetDate(); if (date.IsDayStart()) @@ -431,9 +427,9 @@ bool ScenarioCreateDucks() constexpr int32_t SquareRadiusSize = SquareCentre * 32; CoordsXY centrePos; - auto& gameState = GetGameState(); - centrePos.x = SquareRadiusSize + (ScenarioRandMax(gameState.MapSize.x - SquareCentre) * 32); - centrePos.y = SquareRadiusSize + (ScenarioRandMax(gameState.MapSize.y - SquareCentre) * 32); + auto& gameState = getGameState(); + centrePos.x = SquareRadiusSize + (ScenarioRandMax(gameState.mapSize.x - SquareCentre) * 32); + centrePos.y = SquareRadiusSize + (ScenarioRandMax(gameState.mapSize.y - SquareCentre) * 32); Guard::Assert(MapIsLocationValid(centrePos)); @@ -492,13 +488,13 @@ bool ScenarioCreateDucks() const random_engine_t::state_type& ScenarioRandState() { - return GetGameState().ScenarioRand.state(); + return getGameState().scenarioRand.state(); }; void ScenarioRandSeed(random_engine_t::result_type s0, random_engine_t::result_type s1) { Random::RCT2::Seed s{ s0, s1 }; - GetGameState().ScenarioRand.seed(s); + getGameState().scenarioRand.seed(s); } /** @@ -509,7 +505,7 @@ void ScenarioRandSeed(random_engine_t::result_type s0, random_engine_t::result_t */ random_engine_t::result_type ScenarioRand() { - return GetGameState().ScenarioRand(); + return getGameState().scenarioRand(); } uint32_t ScenarioRandMax(uint32_t max) @@ -532,23 +528,23 @@ uint32_t ScenarioRandMax(uint32_t max) */ static ResultWithMessage ScenarioPrepareRidesForSave(GameState_t& gameState) { - int32_t isFiveCoasterObjective = gameState.ScenarioObjective.Type == OBJECTIVE_FINISH_5_ROLLERCOASTERS; + int32_t isFiveCoasterObjective = gameState.scenarioObjective.Type == OBJECTIVE_FINISH_5_ROLLERCOASTERS; uint8_t rcs = 0; for (auto& ride : GetRideManager()) { - const auto* rideEntry = ride.GetRideEntry(); + const auto* rideEntry = ride.getRideEntry(); if (rideEntry != nullptr) { // If there are more than 5 roller coasters, only mark the first five. - if (isFiveCoasterObjective && (RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_ROLLERCOASTER) && rcs < 5)) + if (isFiveCoasterObjective && (RideEntryHasCategory(*rideEntry, RideCategory::rollerCoaster) && rcs < 5)) { - ride.lifecycle_flags |= RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK; + ride.lifecycleFlags |= RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK; rcs++; } else { - ride.lifecycle_flags &= ~RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK; + ride.lifecycleFlags &= ~RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK; } } } @@ -572,7 +568,7 @@ static ResultWithMessage ScenarioPrepareRidesForSave(GameState_t& gameState) auto ride = GetRide(it.element->AsTrack()->GetRideIndex()); // In the previous step, this flag was set on the first five roller coasters. - if (ride != nullptr && ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) + if (ride != nullptr && ride->lifecycleFlags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) { markTrackAsIndestructible = true; } @@ -598,8 +594,8 @@ ResultWithMessage ScenarioPrepareForSave(GameState_t& gameState) return { false, prepareRidesResult.Message }; } - if (gameState.ScenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) - gameState.Park.Flags |= PARK_FLAGS_PARK_OPEN; + if (gameState.scenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) + gameState.park.Flags |= PARK_FLAGS_PARK_OPEN; ScenarioReset(gameState); @@ -608,12 +604,12 @@ ResultWithMessage ScenarioPrepareForSave(GameState_t& gameState) ObjectiveStatus Objective::CheckGuestsBy() const { - auto parkRating = GetGameState().Park.Rating; + auto parkRating = getGameState().park.Rating; int32_t currentMonthYear = GetDate().GetMonthsElapsed(); if (currentMonthYear == MONTH_COUNT * Year || AllowEarlyCompletion()) { - if (parkRating >= 600 && GetGameState().NumGuestsInPark >= NumGuests) + if (parkRating >= 600 && getGameState().numGuestsInPark >= NumGuests) { return ObjectiveStatus::Success; } @@ -631,7 +627,7 @@ ObjectiveStatus Objective::CheckParkValueBy() const { int32_t currentMonthYear = GetDate().GetMonthsElapsed(); money64 objectiveParkValue = Currency; - money64 parkValue = GetGameState().Park.Value; + money64 parkValue = getGameState().park.Value; if (currentMonthYear == MONTH_COUNT * Year || AllowEarlyCompletion()) { @@ -660,13 +656,13 @@ ObjectiveStatus Objective::Check10RollerCoasters() const BitSet type_already_counted; for (const auto& ride : GetRideManager()) { - if (ride.status == RideStatus::Open && ride.ratings.excitement >= MakeRideRating(6, 00) + if (ride.status == RideStatus::open && ride.ratings.excitement >= MakeRideRating(6, 00) && ride.subtype != kObjectEntryIndexNull) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry != nullptr) { - if (RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_ROLLERCOASTER) && !type_already_counted[ride.subtype]) + if (RideEntryHasCategory(*rideEntry, RideCategory::rollerCoaster) && !type_already_counted[ride.subtype]) { type_already_counted[ride.subtype] = true; rcs++; @@ -688,53 +684,53 @@ ObjectiveStatus Objective::Check10RollerCoasters() const */ ObjectiveStatus Objective::CheckGuestsAndRating() const { - auto& gameState = GetGameState(); - if (gameState.Park.Rating < 700 && GetDate().GetMonthsElapsed() >= 1) + auto& gameState = getGameState(); + if (gameState.park.Rating < 700 && GetDate().GetMonthsElapsed() >= 1) { - gameState.ScenarioParkRatingWarningDays++; - if (gameState.ScenarioParkRatingWarningDays == 1) + gameState.scenarioParkRatingWarningDays++; + if (gameState.scenarioParkRatingWarningDays == 1) { if (Config::Get().notifications.ParkRatingWarnings) { News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_4_WEEKS_REMAINING, 0, {}); } } - else if (gameState.ScenarioParkRatingWarningDays == 8) + else if (gameState.scenarioParkRatingWarningDays == 8) { if (Config::Get().notifications.ParkRatingWarnings) { News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_3_WEEKS_REMAINING, 0, {}); } } - else if (gameState.ScenarioParkRatingWarningDays == 15) + else if (gameState.scenarioParkRatingWarningDays == 15) { if (Config::Get().notifications.ParkRatingWarnings) { News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_2_WEEKS_REMAINING, 0, {}); } } - else if (gameState.ScenarioParkRatingWarningDays == 22) + else if (gameState.scenarioParkRatingWarningDays == 22) { if (Config::Get().notifications.ParkRatingWarnings) { News::AddItemToQueue(News::ItemType::Graph, STR_PARK_RATING_WARNING_1_WEEK_REMAINING, 0, {}); } } - else if (gameState.ScenarioParkRatingWarningDays == 29) + else if (gameState.scenarioParkRatingWarningDays == 29) { News::AddItemToQueue(News::ItemType::Graph, STR_PARK_HAS_BEEN_CLOSED_DOWN, 0, {}); - gameState.Park.Flags &= ~PARK_FLAGS_PARK_OPEN; - gameState.GuestInitialHappiness = 50; + gameState.park.Flags &= ~PARK_FLAGS_PARK_OPEN; + gameState.guestInitialHappiness = 50; return ObjectiveStatus::Failure; } } - else if (gameState.ScenarioCompletedCompanyValue != kCompanyValueOnFailedObjective) + else if (gameState.scenarioCompletedCompanyValue != kCompanyValueOnFailedObjective) { - gameState.ScenarioParkRatingWarningDays = 0; + gameState.scenarioParkRatingWarningDays = 0; } - if (gameState.Park.Rating >= 700) - if (gameState.NumGuestsInPark >= NumGuests) + if (gameState.park.Rating >= 700) + if (gameState.numGuestsInPark >= NumGuests) return ObjectiveStatus::Success; return ObjectiveStatus::Undecided; @@ -742,7 +738,7 @@ ObjectiveStatus Objective::CheckGuestsAndRating() const ObjectiveStatus Objective::CheckMonthlyRideIncome() const { - money64 lastMonthRideIncome = GetGameState().ExpenditureTable[1][EnumValue(ExpenditureType::ParkRideTickets)]; + money64 lastMonthRideIncome = getGameState().expenditureTable[1][EnumValue(ExpenditureType::ParkRideTickets)]; if (lastMonthRideIncome >= Currency) { return ObjectiveStatus::Success; @@ -762,15 +758,15 @@ ObjectiveStatus Objective::Check10RollerCoastersLength() const auto rcs = 0; for (const auto& ride : GetRideManager()) { - if (ride.status == RideStatus::Open && ride.ratings.excitement >= MakeRideRating(7, 00) + if (ride.status == RideStatus::open && ride.ratings.excitement >= MakeRideRating(7, 00) && ride.subtype != kObjectEntryIndexNull) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry != nullptr) { - if (RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_ROLLERCOASTER) && !type_already_counted[ride.subtype]) + if (RideEntryHasCategory(*rideEntry, RideCategory::rollerCoaster) && !type_already_counted[ride.subtype]) { - if (ToHumanReadableRideLength(ride.GetTotalLength()) >= MinimumLength) + if (ToHumanReadableRideLength(ride.getTotalLength()) >= MinimumLength) { type_already_counted[ride.subtype] = true; rcs++; @@ -794,13 +790,13 @@ ObjectiveStatus Objective::CheckFinish5RollerCoasters() const auto rcs = 0; for (const auto& ride : GetRideManager()) { - if (ride.status != RideStatus::Closed && ride.ratings.excitement >= MinimumExcitement) + if (ride.status != RideStatus::closed && ride.ratings.excitement >= MinimumExcitement) { - auto rideEntry = ride.GetRideEntry(); + auto rideEntry = ride.getRideEntry(); if (rideEntry != nullptr) { - if ((ride.lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) - && RideEntryHasCategory(*rideEntry, RIDE_CATEGORY_ROLLERCOASTER)) + if ((ride.lifecycleFlags & RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK) + && RideEntryHasCategory(*rideEntry, RideCategory::rollerCoaster)) { rcs++; } @@ -817,9 +813,9 @@ ObjectiveStatus Objective::CheckFinish5RollerCoasters() const ObjectiveStatus Objective::CheckRepayLoanAndParkValue() const { - const auto& gameState = GetGameState(); - money64 parkValue = gameState.Park.Value; - money64 currentLoan = gameState.BankLoan; + const auto& gameState = getGameState(); + money64 parkValue = gameState.park.Value; + money64 currentLoan = gameState.bankLoan; if (currentLoan <= 0 && parkValue >= Currency) { @@ -831,7 +827,7 @@ ObjectiveStatus Objective::CheckRepayLoanAndParkValue() const ObjectiveStatus Objective::CheckMonthlyFoodIncome() const { - const auto* lastMonthExpenditure = GetGameState().ExpenditureTable[1]; + const auto* lastMonthExpenditure = getGameState().expenditureTable[1]; auto lastMonthProfit = lastMonthExpenditure[EnumValue(ExpenditureType::ShopSales)] + lastMonthExpenditure[EnumValue(ExpenditureType::ShopStock)] + lastMonthExpenditure[EnumValue(ExpenditureType::FoodDrinkSales)] @@ -864,7 +860,7 @@ bool AllowEarlyCompletion() static void ScenarioCheckObjective(GameState_t& gameState) { - auto status = gameState.ScenarioObjective.Check(gameState); + auto status = gameState.scenarioObjective.Check(gameState); if (status == ObjectiveStatus::Success) { ScenarioSuccess(gameState); @@ -881,7 +877,7 @@ static void ScenarioCheckObjective(GameState_t& gameState) */ ObjectiveStatus Objective::Check(GameState_t& gameState) const { - if (gameState.ScenarioCompletedCompanyValue != kMoney64Undefined) + if (gameState.scenarioCompletedCompanyValue != kMoney64Undefined) { return ObjectiveStatus::Undecided; } diff --git a/src/openrct2/scenario/Scenario.h b/src/openrct2/scenario/Scenario.h index e6df2f8ec1..f24d417e63 100644 --- a/src/openrct2/scenario/Scenario.h +++ b/src/openrct2/scenario/Scenario.h @@ -9,16 +9,12 @@ #pragma once +#include "../core/EnumUtils.hpp" +#include "../core/Money.hpp" #include "../core/Random.hpp" -#include "../entity/EntityList.h" -#include "../management/Finance.h" -#include "../management/Research.h" -#include "../object/Object.h" +#include "../core/String.hpp" +#include "../localisation/StringIdType.h" #include "../ride/RideRatings.h" -#include "../world/Banner.h" -#include "../world/Climate.h" -#include "../world/Map.h" -#include "../world/MapAnimation.h" struct ResultWithMessage; @@ -42,23 +38,23 @@ enum S6_TYPE_SCENARIO }; -enum SCENARIO_CATEGORY +enum class ScenarioCategory : uint8_t { // RCT2 categories (keep order) - SCENARIO_CATEGORY_BEGINNER, - SCENARIO_CATEGORY_CHALLENGING, - SCENARIO_CATEGORY_EXPERT, - SCENARIO_CATEGORY_REAL, - SCENARIO_CATEGORY_OTHER, + beginner, + challenging, + expert, + real, + other, // OpenRCT2 categories - SCENARIO_CATEGORY_DLC, - SCENARIO_CATEGORY_BUILD_YOUR_OWN, - SCENARIO_CATEGORY_COMPETITIONS, - SCENARIO_CATEGORY_TIME_MACHINE, - SCENARIO_CATEGORY_KATYS_DREAMWORLD, + dlc, + buildYourOwn, + competitions, + timeMachine, + katysDreamworld, - SCENARIO_CATEGORY_COUNT + count, }; enum @@ -131,10 +127,10 @@ private: ObjectiveStatus CheckMonthlyFoodIncome() const; }; -enum +enum class ScenarioSelectMode : uint8_t { - SCENARIO_SELECT_MODE_DIFFICULTY, - SCENARIO_SELECT_MODE_ORIGIN, + difficulty, + origin, }; enum @@ -152,7 +148,7 @@ constexpr uint8_t kDefaultNumAutosavesToKeep = 10; static constexpr money64 kCompanyValueOnFailedObjective = 0x8000000000000001; -extern const StringId kScenarioCategoryStringIds[SCENARIO_CATEGORY_COUNT]; +extern const StringId kScenarioCategoryStringIds[EnumValue(ScenarioCategory::count)]; extern bool gAllowEarlyCompletionInNetworkPlay; diff --git a/src/openrct2/scenario/ScenarioRepository.cpp b/src/openrct2/scenario/ScenarioRepository.cpp index da04a69f8d..610c6c7bcc 100644 --- a/src/openrct2/scenario/ScenarioRepository.cpp +++ b/src/openrct2/scenario/ScenarioRepository.cpp @@ -38,17 +38,17 @@ using namespace OpenRCT2; -static int32_t ScenarioCategoryCompare(int32_t categoryA, int32_t categoryB) +static int32_t ScenarioCategoryCompare(ScenarioCategory categoryA, ScenarioCategory categoryB) { if (categoryA == categoryB) return 0; - if (categoryA == SCENARIO_CATEGORY_DLC) + if (categoryA == ScenarioCategory::dlc) return -1; - if (categoryB == SCENARIO_CATEGORY_DLC) + if (categoryB == ScenarioCategory::dlc) return 1; - if (categoryA == SCENARIO_CATEGORY_BUILD_YOUR_OWN) + if (categoryA == ScenarioCategory::buildYourOwn) return -1; - if (categoryB == SCENARIO_CATEGORY_BUILD_YOUR_OWN) + if (categoryB == ScenarioCategory::buildYourOwn) return 1; if (categoryA < categoryB) return -1; @@ -72,8 +72,8 @@ static int32_t ScenarioIndexEntryCompareByCategory(const ScenarioIndexEntry& ent return static_cast(entryA.SourceGame) - static_cast(entryB.SourceGame); } return strcmp(entryA.Name.c_str(), entryB.Name.c_str()); - case SCENARIO_CATEGORY_REAL: - case SCENARIO_CATEGORY_OTHER: + case ScenarioCategory::real: + case ScenarioCategory::other: return strcmp(entryA.Name.c_str(), entryB.Name.c_str()); } } @@ -123,18 +123,18 @@ static void ScenarioHighscoreFree(ScenarioHighscoreEntry* highscore) class ScenarioFileIndex final : public FileIndex { private: - static constexpr uint32_t MAGIC_NUMBER = 0x58444953; // SIDX - static constexpr uint16_t VERSION = 9; - static constexpr auto PATTERN = "*.sc4;*.sc6;*.sea;*.park"; + static constexpr uint32_t kMagicNumber = 0x58444953; // SIDX + static constexpr uint16_t kVersion = 9; + static constexpr auto kPattern = "*.sc4;*.sc6;*.sea;*.park"; public: explicit ScenarioFileIndex(const IPlatformEnvironment& env) : FileIndex( - "scenario index", MAGIC_NUMBER, VERSION, env.GetFilePath(PATHID::CACHE_SCENARIOS), std::string(PATTERN), + "scenario index", kMagicNumber, kVersion, env.GetFilePath(PathId::cacheScenarios), std::string(kPattern), std::vector({ - env.GetDirectoryPath(DIRBASE::RCT1, DIRID::SCENARIO), - env.GetDirectoryPath(DIRBASE::RCT2, DIRID::SCENARIO), - env.GetDirectoryPath(DIRBASE::USER, DIRID::SCENARIO), + env.GetDirectoryPath(DirBase::rct1, DirId::scenarios), + env.GetDirectoryPath(DirBase::rct2, DirId::scenarios), + env.GetDirectoryPath(DirBase::user, DirId::scenarios), })) { } @@ -192,7 +192,7 @@ private: return ms; } - auto fs = std::make_unique(path, FILE_MODE_OPEN); + auto fs = std::make_unique(path, FileMode::open); return fs; } @@ -227,7 +227,7 @@ private: if (importer) { - if (importer->GetDetails(entry)) + if (importer->PopulateIndexEntry(entry)) { entry->Path = path; entry->Timestamp = timestamp; @@ -371,7 +371,7 @@ public: // Get scenario using RCTC style name of RCT2 scenario scenario = GetByFilename((scenarioBaseName + ".sea").c_str()); } - // GameState_t::ScenarioFileName .Park scenarios is the full file path instead of just , so need + // GameState_t::scenarioFileName .Park scenarios is the full file path instead of just , so need // to convert else if (String::iequals(scenarioExtension, ".park")) { @@ -437,10 +437,10 @@ private: */ void ImportMegaPark() { - auto mpdatPath = _env->FindFile(DIRBASE::RCT1, DIRID::DATA, "mp.dat"); + auto mpdatPath = _env->FindFile(DirBase::rct1, DirId::data, "mp.dat"); if (File::Exists(mpdatPath)) { - auto scenarioDirectory = _env->GetDirectoryPath(DIRBASE::USER, DIRID::SCENARIO); + auto scenarioDirectory = _env->GetDirectoryPath(DirBase::user, DirId::scenarios); auto expectedSc21Path = Path::Combine(scenarioDirectory, "sc21.sc4"); auto sc21Path = Path::ResolveCasing(expectedSc21Path); if (!File::Exists(sc21Path)) @@ -508,7 +508,7 @@ private: void Sort() { - if (Config::Get().general.ScenarioSelectMode == SCENARIO_SELECT_MODE_ORIGIN) + if (Config::Get().general.scenarioSelectMode == ScenarioSelectMode::origin) { std::sort( _scenarios.begin(), _scenarios.end(), [](const ScenarioIndexEntry& a, const ScenarioIndexEntry& b) -> bool { @@ -526,7 +526,7 @@ private: void LoadScores() { - std::string path = _env->GetFilePath(PATHID::SCORES); + std::string path = _env->GetFilePath(PathId::scores); if (!File::Exists(path)) { return; @@ -534,7 +534,7 @@ private: try { - auto fs = FileStream(path, FILE_MODE_OPEN); + auto fs = FileStream(path, FileMode::open); uint32_t fileVersion = fs.ReadValue(); if (fileVersion != 1 && fileVersion != 2) { @@ -566,8 +566,8 @@ private: */ void LoadLegacyScores() { - std::string rct2Path = _env->GetFilePath(PATHID::SCORES_RCT2); - std::string legacyPath = _env->GetFilePath(PATHID::SCORES_LEGACY); + std::string rct2Path = _env->GetFilePath(PathId::scoresRCT2); + std::string legacyPath = _env->GetFilePath(PathId::scoresLegacy); LoadLegacyScores(legacyPath); LoadLegacyScores(rct2Path); } @@ -582,7 +582,7 @@ private: bool highscoresDirty = false; try { - auto fs = FileStream(path, FILE_MODE_OPEN); + auto fs = FileStream(path, FileMode::open); if (fs.GetLength() <= 4) { // Initial value of scores for RCT2, just ignore @@ -670,10 +670,10 @@ private: void SaveHighscores() { - std::string path = _env->GetFilePath(PATHID::SCORES); + std::string path = _env->GetFilePath(PathId::scores); try { - auto fs = FileStream(path, FILE_MODE_WRITE); + auto fs = FileStream(path, FileMode::write); fs.WriteValue(HighscoreFileVersion); fs.WriteValue(static_cast(_highscores.size())); for (size_t i = 0; i < _highscores.size(); i++) diff --git a/src/openrct2/scenario/ScenarioRepository.h b/src/openrct2/scenario/ScenarioRepository.h index 8099349477..0dfa81c2c7 100644 --- a/src/openrct2/scenario/ScenarioRepository.h +++ b/src/openrct2/scenario/ScenarioRepository.h @@ -1,4 +1,3 @@ - /***************************************************************************** * Copyright (c) 2014-2025 OpenRCT2 developers * @@ -11,12 +10,13 @@ #pragma once #include "../core/DateTime.h" +#include "../core/Money.hpp" #include "../core/StringTypes.h" -#include "../scenario/Scenario.h" #include struct RCTObjectEntry; +enum class ScenarioCategory : uint8_t; struct ScenarioHighscoreEntry { @@ -46,16 +46,16 @@ struct ScenarioIndexEntry uint64_t Timestamp; // Category / sequence - uint8_t Category; + ScenarioCategory Category; ScenarioSource SourceGame; int16_t SourceIndex = -1; uint16_t ScenarioId; // Objective uint8_t ObjectiveType; - uint8_t ObjectiveArg1; - int64_t ObjectiveArg2; - int16_t ObjectiveArg3; + uint8_t ObjectiveArg1; // years + int64_t ObjectiveArg2; // money or excitement + uint16_t ObjectiveArg3; // guests or rideID or coasterLength ScenarioHighscoreEntry* Highscore = nullptr; u8string InternalName; // Untranslated name diff --git a/src/openrct2/scenario/ScenarioSources.cpp b/src/openrct2/scenario/ScenarioSources.cpp index 69b5658c4a..67f2309810 100644 --- a/src/openrct2/scenario/ScenarioSources.cpp +++ b/src/openrct2/scenario/ScenarioSources.cpp @@ -30,7 +30,7 @@ namespace OpenRCT2::ScenarioSources { const uint8_t Id; const utf8* Title; - const uint8_t Category; + const ScenarioCategory Category; u8string_view TextObjectId; }; @@ -121,225 +121,225 @@ namespace OpenRCT2::ScenarioSources // RCT static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT1[] = { - { SC_FOREST_FRONTIERS, "Forest Frontiers", SCENARIO_CATEGORY_BEGINNER, "rct1.scenario_text.forest_frontiers" }, - { SC_DYNAMITE_DUNES, "Dynamite Dunes", SCENARIO_CATEGORY_BEGINNER, "rct1.scenario_text.dynamite_dunes" }, - { SC_LEAFY_LAKE, "Leafy Lake", SCENARIO_CATEGORY_BEGINNER, "rct1.scenario_text.leafy_lake" }, - { SC_DIAMOND_HEIGHTS, "Diamond Heights", SCENARIO_CATEGORY_BEGINNER, "rct1.scenario_text.diamond_heights" }, - { SC_EVERGREEN_GARDENS, "Evergreen Gardens", SCENARIO_CATEGORY_BEGINNER, "rct1.scenario_text.evergreen_gardens" }, - { SC_BUMBLY_BEACH, "Bumbly Beach", SCENARIO_CATEGORY_BEGINNER, "rct1.scenario_text.bumbly_beach" }, - { SC_TRINITY_ISLANDS, "Trinity Islands", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.trinity_islands" }, - { SC_KATIES_DREAMLAND, "Katie's Dreamland", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.katies_dreamland" }, - { SC_POKEY_PARK, "Pokey Park", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.pokey_park" }, - { SC_WHITE_WATER_PARK, "White Water Park", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.white_water_park" }, - { SC_MILLENNIUM_MINES, "Millennium Mines", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.millennium_mines" }, - { SC_KARTS_COASTERS, "Karts & Coasters", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.karts_coasters" }, - { SC_MELS_WORLD, "Mel's World", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.mels_world" }, - { SC_MYSTIC_MOUNTAIN, "Mystic Mountain", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.mystic_mountain" }, - { SC_PACIFIC_PYRAMIDS, "Pacific Pyramids", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.pacific_pyramids" }, - { SC_CRUMBLY_WOODS, "Crumbly Woods", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.crumbly_woods" }, - { SC_PARADISE_PIER, "Paradise Pier", SCENARIO_CATEGORY_CHALLENGING, "rct1.scenario_text.paradise_pier" }, - { SC_LIGHTNING_PEAKS, "Lightning Peaks", SCENARIO_CATEGORY_EXPERT, "rct1.scenario_text.lightning_peaks" }, - { SC_IVORY_TOWERS, "Ivory Towers", SCENARIO_CATEGORY_EXPERT, "rct1.scenario_text.ivory_towers" }, - { SC_RAINBOW_VALLEY, "Rainbow Valley", SCENARIO_CATEGORY_EXPERT, "rct1.scenario_text.rainbow_valley" }, - { SC_THUNDER_ROCK, "Thunder Rock", SCENARIO_CATEGORY_EXPERT, "rct1.scenario_text.thunder_rock" }, - { SC_MEGA_PARK, "Mega Park", SCENARIO_CATEGORY_OTHER, "rct1.scenario_text.mega_park" }, + { SC_FOREST_FRONTIERS, "Forest Frontiers", ScenarioCategory::beginner, "rct1.scenario_text.forest_frontiers" }, + { SC_DYNAMITE_DUNES, "Dynamite Dunes", ScenarioCategory::beginner, "rct1.scenario_text.dynamite_dunes" }, + { SC_LEAFY_LAKE, "Leafy Lake", ScenarioCategory::beginner, "rct1.scenario_text.leafy_lake" }, + { SC_DIAMOND_HEIGHTS, "Diamond Heights", ScenarioCategory::beginner, "rct1.scenario_text.diamond_heights" }, + { SC_EVERGREEN_GARDENS, "Evergreen Gardens", ScenarioCategory::beginner, "rct1.scenario_text.evergreen_gardens" }, + { SC_BUMBLY_BEACH, "Bumbly Beach", ScenarioCategory::beginner, "rct1.scenario_text.bumbly_beach" }, + { SC_TRINITY_ISLANDS, "Trinity Islands", ScenarioCategory::challenging, "rct1.scenario_text.trinity_islands" }, + { SC_KATIES_DREAMLAND, "Katie's Dreamland", ScenarioCategory::challenging, "rct1.scenario_text.katies_dreamland" }, + { SC_POKEY_PARK, "Pokey Park", ScenarioCategory::challenging, "rct1.scenario_text.pokey_park" }, + { SC_WHITE_WATER_PARK, "White Water Park", ScenarioCategory::challenging, "rct1.scenario_text.white_water_park" }, + { SC_MILLENNIUM_MINES, "Millennium Mines", ScenarioCategory::challenging, "rct1.scenario_text.millennium_mines" }, + { SC_KARTS_COASTERS, "Karts & Coasters", ScenarioCategory::challenging, "rct1.scenario_text.karts_coasters" }, + { SC_MELS_WORLD, "Mel's World", ScenarioCategory::challenging, "rct1.scenario_text.mels_world" }, + { SC_MYSTIC_MOUNTAIN, "Mystic Mountain", ScenarioCategory::challenging, "rct1.scenario_text.mystic_mountain" }, + { SC_PACIFIC_PYRAMIDS, "Pacific Pyramids", ScenarioCategory::challenging, "rct1.scenario_text.pacific_pyramids" }, + { SC_CRUMBLY_WOODS, "Crumbly Woods", ScenarioCategory::challenging, "rct1.scenario_text.crumbly_woods" }, + { SC_PARADISE_PIER, "Paradise Pier", ScenarioCategory::challenging, "rct1.scenario_text.paradise_pier" }, + { SC_LIGHTNING_PEAKS, "Lightning Peaks", ScenarioCategory::expert, "rct1.scenario_text.lightning_peaks" }, + { SC_IVORY_TOWERS, "Ivory Towers", ScenarioCategory::expert, "rct1.scenario_text.ivory_towers" }, + { SC_RAINBOW_VALLEY, "Rainbow Valley", ScenarioCategory::expert, "rct1.scenario_text.rainbow_valley" }, + { SC_THUNDER_ROCK, "Thunder Rock", ScenarioCategory::expert, "rct1.scenario_text.thunder_rock" }, + { SC_MEGA_PARK, "Mega Park", ScenarioCategory::other, "rct1.scenario_text.mega_park" }, }; // RCT: Added Attractions static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT1AA[] = { - { SC_WHISPERING_CLIFFS, "Whispering Cliffs", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.whispering_cliffs" }, - { SC_THREE_MONKEYS_PARK, "Three Monkeys Park", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.three_monkeys_park" }, - { SC_CANARY_MINES, "Canary Mines", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.canary_mines" }, - { SC_BARONY_BRIDGE, "Barony Bridge", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.barony_bridge" }, - { SC_FUNTOPIA, "Funtopia", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.funtopia" }, - { SC_HAUNTED_HARBOUR, "Haunted Harbour", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.haunted_harbour" }, - { SC_FUN_FORTRESS, "Fun Fortress", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.fun_fortress" }, - { SC_FUTURE_WORLD, "Future World", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.future_world" }, - { SC_GENTLE_GLEN, "Gentle Glen", SCENARIO_CATEGORY_BEGINNER, "rct1aa.scenario_text.gentle_glen" }, - { SC_JOLLY_JUNGLE, "Jolly Jungle", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.jolly_jungle" }, - { SC_HYDRO_HILLS, "Hydro Hills", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.hydro_hills" }, - { SC_SPRIGHTLY_PARK, "Sprightly Park", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.sprightly_park" }, - { SC_MAGIC_QUARTERS, "Magic Quarters", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.magic_quarters" }, - { SC_FRUIT_FARM, "Fruit Farm", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.fruit_farm" }, - { SC_BUTTERFLY_DAM, "Butterfly Dam", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.butterfly_dam" }, - { SC_COASTER_CANYON, "Coaster Canyon", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.coaster_canyon" }, - { SC_THUNDERSTORM_PARK, "Thunderstorm Park", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.thunderstorm_park" }, - { SC_HARMONIC_HILLS, "Harmonic Hills", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.harmonic_hills" }, - { SC_ROMAN_VILLAGE, "Roman Village", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.roman_village" }, - { SC_SWAMP_COVE, "Swamp Cove", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.swamp_cove" }, - { SC_ADRENALINE_HEIGHTS, "Adrenaline Heights", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.adrenaline_heights" }, - { SC_UTOPIA_PARK, "Utopia Park", SCENARIO_CATEGORY_CHALLENGING, "rct1aa.scenario_text.utopia_park" }, - { SC_ROTTING_HEIGHTS, "Rotting Heights", SCENARIO_CATEGORY_EXPERT, "rct1aa.scenario_text.rotting_heights" }, - { SC_FIASCO_FOREST, "Fiasco Forest", SCENARIO_CATEGORY_EXPERT, "rct1aa.scenario_text.fiasco_forest" }, - { SC_PICKLE_PARK, "Pickle Park", SCENARIO_CATEGORY_EXPERT, "rct1aa.scenario_text.pickle_park" }, - { SC_GIGGLE_DOWNS, "Giggle Downs", SCENARIO_CATEGORY_EXPERT, "rct1aa.scenario_text.giggle_downs" }, - { SC_MINERAL_PARK, "Mineral Park", SCENARIO_CATEGORY_EXPERT, "rct1aa.scenario_text.mineral_park" }, - { SC_COASTER_CRAZY, "Coaster Crazy", SCENARIO_CATEGORY_EXPERT, "rct1aa.scenario_text.coaster_crazy" }, - { SC_URBAN_PARK, "Urban Park", SCENARIO_CATEGORY_EXPERT, "rct1aa.scenario_text.urban_park" }, - { SC_GEOFFREY_GARDENS, "Geoffrey Gardens", SCENARIO_CATEGORY_EXPERT, "rct1aa.scenario_text.geoffrey_gardens" }, + { SC_WHISPERING_CLIFFS, "Whispering Cliffs", ScenarioCategory::beginner, "rct1aa.scenario_text.whispering_cliffs" }, + { SC_THREE_MONKEYS_PARK, "Three Monkeys Park", ScenarioCategory::beginner, "rct1aa.scenario_text.three_monkeys_park" }, + { SC_CANARY_MINES, "Canary Mines", ScenarioCategory::beginner, "rct1aa.scenario_text.canary_mines" }, + { SC_BARONY_BRIDGE, "Barony Bridge", ScenarioCategory::beginner, "rct1aa.scenario_text.barony_bridge" }, + { SC_FUNTOPIA, "Funtopia", ScenarioCategory::beginner, "rct1aa.scenario_text.funtopia" }, + { SC_HAUNTED_HARBOUR, "Haunted Harbour", ScenarioCategory::beginner, "rct1aa.scenario_text.haunted_harbour" }, + { SC_FUN_FORTRESS, "Fun Fortress", ScenarioCategory::beginner, "rct1aa.scenario_text.fun_fortress" }, + { SC_FUTURE_WORLD, "Future World", ScenarioCategory::beginner, "rct1aa.scenario_text.future_world" }, + { SC_GENTLE_GLEN, "Gentle Glen", ScenarioCategory::beginner, "rct1aa.scenario_text.gentle_glen" }, + { SC_JOLLY_JUNGLE, "Jolly Jungle", ScenarioCategory::challenging, "rct1aa.scenario_text.jolly_jungle" }, + { SC_HYDRO_HILLS, "Hydro Hills", ScenarioCategory::challenging, "rct1aa.scenario_text.hydro_hills" }, + { SC_SPRIGHTLY_PARK, "Sprightly Park", ScenarioCategory::challenging, "rct1aa.scenario_text.sprightly_park" }, + { SC_MAGIC_QUARTERS, "Magic Quarters", ScenarioCategory::challenging, "rct1aa.scenario_text.magic_quarters" }, + { SC_FRUIT_FARM, "Fruit Farm", ScenarioCategory::challenging, "rct1aa.scenario_text.fruit_farm" }, + { SC_BUTTERFLY_DAM, "Butterfly Dam", ScenarioCategory::challenging, "rct1aa.scenario_text.butterfly_dam" }, + { SC_COASTER_CANYON, "Coaster Canyon", ScenarioCategory::challenging, "rct1aa.scenario_text.coaster_canyon" }, + { SC_THUNDERSTORM_PARK, "Thunderstorm Park", ScenarioCategory::challenging, "rct1aa.scenario_text.thunderstorm_park" }, + { SC_HARMONIC_HILLS, "Harmonic Hills", ScenarioCategory::challenging, "rct1aa.scenario_text.harmonic_hills" }, + { SC_ROMAN_VILLAGE, "Roman Village", ScenarioCategory::challenging, "rct1aa.scenario_text.roman_village" }, + { SC_SWAMP_COVE, "Swamp Cove", ScenarioCategory::challenging, "rct1aa.scenario_text.swamp_cove" }, + { SC_ADRENALINE_HEIGHTS, "Adrenaline Heights", ScenarioCategory::challenging, "rct1aa.scenario_text.adrenaline_heights" }, + { SC_UTOPIA_PARK, "Utopia Park", ScenarioCategory::challenging, "rct1aa.scenario_text.utopia_park" }, + { SC_ROTTING_HEIGHTS, "Rotting Heights", ScenarioCategory::expert, "rct1aa.scenario_text.rotting_heights" }, + { SC_FIASCO_FOREST, "Fiasco Forest", ScenarioCategory::expert, "rct1aa.scenario_text.fiasco_forest" }, + { SC_PICKLE_PARK, "Pickle Park", ScenarioCategory::expert, "rct1aa.scenario_text.pickle_park" }, + { SC_GIGGLE_DOWNS, "Giggle Downs", ScenarioCategory::expert, "rct1aa.scenario_text.giggle_downs" }, + { SC_MINERAL_PARK, "Mineral Park", ScenarioCategory::expert, "rct1aa.scenario_text.mineral_park" }, + { SC_COASTER_CRAZY, "Coaster Crazy", ScenarioCategory::expert, "rct1aa.scenario_text.coaster_crazy" }, + { SC_URBAN_PARK, "Urban Park", ScenarioCategory::expert, "rct1aa.scenario_text.urban_park" }, + { SC_GEOFFREY_GARDENS, "Geoffrey Gardens", ScenarioCategory::expert, "rct1aa.scenario_text.geoffrey_gardens" }, }; // RCT: Loopy Landscapes static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT1LL[] = { - { SC_ICEBERG_ISLANDS, "Iceberg Islands", SCENARIO_CATEGORY_BEGINNER, "rct1ll.scenario_text.iceberg_islands" }, - { SC_VOLCANIA, "Volcania", SCENARIO_CATEGORY_BEGINNER, "rct1ll.scenario_text.volcania" }, - { SC_ARID_HEIGHTS, "Arid Heights", SCENARIO_CATEGORY_BEGINNER, "rct1ll.scenario_text.arid_heights" }, - { SC_RAZOR_ROCKS, "Razor Rocks", SCENARIO_CATEGORY_BEGINNER, "rct1ll.scenario_text.razor_rocks" }, - { SC_CRATER_LAKE, "Crater Lake", SCENARIO_CATEGORY_BEGINNER, "rct1ll.scenario_text.crater_lake" }, - { SC_VERTIGO_VIEWS, "Vertigo Views", SCENARIO_CATEGORY_BEGINNER, "rct1ll.scenario_text.vertigo_views" }, - { SC_PARADISE_PIER_2, "Paradise Pier 2", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.paradise_pier_2" }, - { SC_DRAGONS_COVE, "Dragon's Cove", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.dragons_cove" }, - { SC_GOOD_KNIGHT_PARK, "Good Knight Park", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.good_knight_park" }, - { SC_WACKY_WARREN, "Wacky Warren", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.wacky_warren" }, - { SC_GRAND_GLACIER, "Grand Glacier", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.grand_glacier" }, - { SC_CRAZY_CRATERS, "Crazy Craters", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.crazy_craters" }, - { SC_DUSTY_DESERT, "Dusty Desert", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.dusty_desert" }, - { SC_WOODWORM_PARK, "Woodworm Park", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.woodworm_park" }, - { SC_ICARUS_PARK, "Icarus Park", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.icarus_park" }, - { SC_SUNNY_SWAMPS, "Sunny Swamps", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.sunny_swamps" }, - { SC_FRIGHTMARE_HILLS, "Frightmare Hills", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.frightmare_hills" }, - { SC_THUNDER_ROCKS, "Thunder Rocks", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.thunder_rocks" }, - { SC_OCTAGON_PARK, "Octagon Park", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.octagon_park" }, - { SC_PLEASURE_ISLAND, "Pleasure Island", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.pleasure_island" }, - { SC_ICICLE_WORLDS, "Icicle Worlds", SCENARIO_CATEGORY_CHALLENGING, "rct1ll.scenario_text.icicle_worlds" }, - { SC_SOUTHERN_SANDS, "Southern Sands", SCENARIO_CATEGORY_EXPERT, "rct1ll.scenario_text.southern_sands" }, - { SC_TINY_TOWERS, "Tiny Towers", SCENARIO_CATEGORY_EXPERT, "rct1ll.scenario_text.tiny_towers" }, - { SC_NEVERMORE_PARK, "Nevermore Park", SCENARIO_CATEGORY_EXPERT, "rct1ll.scenario_text.nevermore_park" }, - { SC_PACIFICA, "Pacifica", SCENARIO_CATEGORY_EXPERT, "rct1ll.scenario_text.pacifica" }, - { SC_URBAN_JUNGLE, "Urban Jungle", SCENARIO_CATEGORY_EXPERT, "rct1ll.scenario_text.urban_jungle" }, - { SC_TERROR_TOWN, "Terror Town", SCENARIO_CATEGORY_EXPERT, "rct1ll.scenario_text.terror_town" }, - { SC_MEGAWORLD_PARK, "Megaworld Park", SCENARIO_CATEGORY_EXPERT, "rct1ll.scenario_text.megaworld_park" }, - { SC_VENUS_PONDS, "Venus Ponds", SCENARIO_CATEGORY_EXPERT, "rct1ll.scenario_text.venus_ponds" }, - { SC_MICRO_PARK, "Micro Park", SCENARIO_CATEGORY_EXPERT, "rct1ll.scenario_text.micro_park" }, + { SC_ICEBERG_ISLANDS, "Iceberg Islands", ScenarioCategory::beginner, "rct1ll.scenario_text.iceberg_islands" }, + { SC_VOLCANIA, "Volcania", ScenarioCategory::beginner, "rct1ll.scenario_text.volcania" }, + { SC_ARID_HEIGHTS, "Arid Heights", ScenarioCategory::beginner, "rct1ll.scenario_text.arid_heights" }, + { SC_RAZOR_ROCKS, "Razor Rocks", ScenarioCategory::beginner, "rct1ll.scenario_text.razor_rocks" }, + { SC_CRATER_LAKE, "Crater Lake", ScenarioCategory::beginner, "rct1ll.scenario_text.crater_lake" }, + { SC_VERTIGO_VIEWS, "Vertigo Views", ScenarioCategory::beginner, "rct1ll.scenario_text.vertigo_views" }, + { SC_PARADISE_PIER_2, "Paradise Pier 2", ScenarioCategory::challenging, "rct1ll.scenario_text.paradise_pier_2" }, + { SC_DRAGONS_COVE, "Dragon's Cove", ScenarioCategory::challenging, "rct1ll.scenario_text.dragons_cove" }, + { SC_GOOD_KNIGHT_PARK, "Good Knight Park", ScenarioCategory::challenging, "rct1ll.scenario_text.good_knight_park" }, + { SC_WACKY_WARREN, "Wacky Warren", ScenarioCategory::challenging, "rct1ll.scenario_text.wacky_warren" }, + { SC_GRAND_GLACIER, "Grand Glacier", ScenarioCategory::challenging, "rct1ll.scenario_text.grand_glacier" }, + { SC_CRAZY_CRATERS, "Crazy Craters", ScenarioCategory::challenging, "rct1ll.scenario_text.crazy_craters" }, + { SC_DUSTY_DESERT, "Dusty Desert", ScenarioCategory::challenging, "rct1ll.scenario_text.dusty_desert" }, + { SC_WOODWORM_PARK, "Woodworm Park", ScenarioCategory::challenging, "rct1ll.scenario_text.woodworm_park" }, + { SC_ICARUS_PARK, "Icarus Park", ScenarioCategory::challenging, "rct1ll.scenario_text.icarus_park" }, + { SC_SUNNY_SWAMPS, "Sunny Swamps", ScenarioCategory::challenging, "rct1ll.scenario_text.sunny_swamps" }, + { SC_FRIGHTMARE_HILLS, "Frightmare Hills", ScenarioCategory::challenging, "rct1ll.scenario_text.frightmare_hills" }, + { SC_THUNDER_ROCKS, "Thunder Rocks", ScenarioCategory::challenging, "rct1ll.scenario_text.thunder_rocks" }, + { SC_OCTAGON_PARK, "Octagon Park", ScenarioCategory::challenging, "rct1ll.scenario_text.octagon_park" }, + { SC_PLEASURE_ISLAND, "Pleasure Island", ScenarioCategory::challenging, "rct1ll.scenario_text.pleasure_island" }, + { SC_ICICLE_WORLDS, "Icicle Worlds", ScenarioCategory::challenging, "rct1ll.scenario_text.icicle_worlds" }, + { SC_SOUTHERN_SANDS, "Southern Sands", ScenarioCategory::expert, "rct1ll.scenario_text.southern_sands" }, + { SC_TINY_TOWERS, "Tiny Towers", ScenarioCategory::expert, "rct1ll.scenario_text.tiny_towers" }, + { SC_NEVERMORE_PARK, "Nevermore Park", ScenarioCategory::expert, "rct1ll.scenario_text.nevermore_park" }, + { SC_PACIFICA, "Pacifica", ScenarioCategory::expert, "rct1ll.scenario_text.pacifica" }, + { SC_URBAN_JUNGLE, "Urban Jungle", ScenarioCategory::expert, "rct1ll.scenario_text.urban_jungle" }, + { SC_TERROR_TOWN, "Terror Town", ScenarioCategory::expert, "rct1ll.scenario_text.terror_town" }, + { SC_MEGAWORLD_PARK, "Megaworld Park", ScenarioCategory::expert, "rct1ll.scenario_text.megaworld_park" }, + { SC_VENUS_PONDS, "Venus Ponds", ScenarioCategory::expert, "rct1ll.scenario_text.venus_ponds" }, + { SC_MICRO_PARK, "Micro Park", ScenarioCategory::expert, "rct1ll.scenario_text.micro_park" }, }; // RCT2 static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT2[] = { - { SC_UNIDENTIFIED, "Electric Fields", SCENARIO_CATEGORY_BEGINNER, "rct2.scenario_text.electric_fields" }, - { SC_UNIDENTIFIED, "Factory Capers", SCENARIO_CATEGORY_BEGINNER, "rct2.scenario_text.factory_capers" }, - { SC_UNIDENTIFIED, "Crazy Castle", SCENARIO_CATEGORY_BEGINNER, "rct2.scenario_text.crazy_castle" }, - { SC_UNIDENTIFIED, "Dusty Greens", SCENARIO_CATEGORY_BEGINNER, "rct2.scenario_text.dusty_greens" }, - { SC_UNIDENTIFIED, "Bumbly Bazaar", SCENARIO_CATEGORY_BEGINNER, "rct2.scenario_text.bumbly_bazaar" }, - { SC_UNIDENTIFIED, "Infernal Views", SCENARIO_CATEGORY_CHALLENGING, "rct2.scenario_text.infernal_views" }, - { SC_UNIDENTIFIED, "Lucky Lake", SCENARIO_CATEGORY_CHALLENGING, "rct2.scenario_text.lucky_lake" }, - { SC_UNIDENTIFIED, "Botany Breakers", SCENARIO_CATEGORY_CHALLENGING, "rct2.scenario_text.botany_breakers" }, - { SC_UNIDENTIFIED, "Alpine Adventures", SCENARIO_CATEGORY_CHALLENGING, "rct2.scenario_text.alpine_adventures" }, - { SC_UNIDENTIFIED, "Gravity Gardens", SCENARIO_CATEGORY_EXPERT, "rct2.scenario_text.gravity_gardens" }, - { SC_UNIDENTIFIED, "Extreme Heights", SCENARIO_CATEGORY_EXPERT, "rct2.scenario_text.extreme_heights" }, - { SC_UNIDENTIFIED, "Amity Airfield", SCENARIO_CATEGORY_EXPERT, "rct2.scenario_text.amity_airfield" }, - { SC_UNIDENTIFIED, "Ghost Town", SCENARIO_CATEGORY_EXPERT, "rct2.scenario_text.ghost_town" }, - { SC_UNIDENTIFIED, "Fungus Woods", SCENARIO_CATEGORY_EXPERT, "rct2.scenario_text.fungus_woods" }, - { SC_UNIDENTIFIED, "Rainbow Summit", SCENARIO_CATEGORY_EXPERT, "rct2.scenario_text.rainbow_summit" }, + { SC_UNIDENTIFIED, "Electric Fields", ScenarioCategory::beginner, "rct2.scenario_text.electric_fields" }, + { SC_UNIDENTIFIED, "Factory Capers", ScenarioCategory::beginner, "rct2.scenario_text.factory_capers" }, + { SC_UNIDENTIFIED, "Crazy Castle", ScenarioCategory::beginner, "rct2.scenario_text.crazy_castle" }, + { SC_UNIDENTIFIED, "Dusty Greens", ScenarioCategory::beginner, "rct2.scenario_text.dusty_greens" }, + { SC_UNIDENTIFIED, "Bumbly Bazaar", ScenarioCategory::beginner, "rct2.scenario_text.bumbly_bazaar" }, + { SC_UNIDENTIFIED, "Infernal Views", ScenarioCategory::challenging, "rct2.scenario_text.infernal_views" }, + { SC_UNIDENTIFIED, "Lucky Lake", ScenarioCategory::challenging, "rct2.scenario_text.lucky_lake" }, + { SC_UNIDENTIFIED, "Botany Breakers", ScenarioCategory::challenging, "rct2.scenario_text.botany_breakers" }, + { SC_UNIDENTIFIED, "Alpine Adventures", ScenarioCategory::challenging, "rct2.scenario_text.alpine_adventures" }, + { SC_UNIDENTIFIED, "Gravity Gardens", ScenarioCategory::expert, "rct2.scenario_text.gravity_gardens" }, + { SC_UNIDENTIFIED, "Extreme Heights", ScenarioCategory::expert, "rct2.scenario_text.extreme_heights" }, + { SC_UNIDENTIFIED, "Amity Airfield", ScenarioCategory::expert, "rct2.scenario_text.amity_airfield" }, + { SC_UNIDENTIFIED, "Ghost Town", ScenarioCategory::expert, "rct2.scenario_text.ghost_town" }, + { SC_UNIDENTIFIED, "Fungus Woods", ScenarioCategory::expert, "rct2.scenario_text.fungus_woods" }, + { SC_UNIDENTIFIED, "Rainbow Summit", ScenarioCategory::expert, "rct2.scenario_text.rainbow_summit" }, }; // RCT2: Wacky Worlds static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT2WW[] = { - { SC_UNIDENTIFIED, "North America - Grand Canyon", SCENARIO_CATEGORY_BEGINNER, "rct2ww.scenario_text.canyon_calamities" }, - { SC_UNIDENTIFIED, "Asia - Great Wall of China Tourism Enhancement", SCENARIO_CATEGORY_BEGINNER, "rct2ww.scenario_text.great_wall_of_china" }, - { SC_UNIDENTIFIED, "Africa - African Diamond Mine", SCENARIO_CATEGORY_BEGINNER, "rct2ww.scenario_text.mines_of_africa" }, - { SC_UNIDENTIFIED, "Australasia - Ayers Rock", SCENARIO_CATEGORY_BEGINNER, "rct2ww.scenario_text.ayers_adventure" }, - { SC_UNIDENTIFIED, "North America - Rollercoaster Heaven", SCENARIO_CATEGORY_BEGINNER, "rct2ww.scenario_text.rollercoaster_heaven" }, - { SC_UNIDENTIFIED, "Africa - Oasis", SCENARIO_CATEGORY_CHALLENGING, "rct2ww.scenario_text.mirage_madness" }, - { SC_UNIDENTIFIED, "South America - Rio Carnival", SCENARIO_CATEGORY_CHALLENGING, "rct2ww.scenario_text.sugarloaf_shores" }, - { SC_UNIDENTIFIED, "Asia - Maharaja Palace", SCENARIO_CATEGORY_CHALLENGING, "rct2ww.scenario_text.park_maharaja" }, - { SC_UNIDENTIFIED, "Africa - Victoria Falls", SCENARIO_CATEGORY_CHALLENGING, "rct2ww.scenario_text.over_the_edge" }, - { SC_UNIDENTIFIED, "N. America - Extreme Hawaiian Island", SCENARIO_CATEGORY_CHALLENGING, "rct2ww.scenario_text.wacky_waikiki" }, - { SC_UNIDENTIFIED, "South America - Rain Forest Plateau", SCENARIO_CATEGORY_CHALLENGING, "rct2ww.scenario_text.rainforest_romp" }, - { SC_UNIDENTIFIED, "Europe - Renovation", SCENARIO_CATEGORY_CHALLENGING, "rct2ww.scenario_text.from_the_ashes" }, - { SC_UNIDENTIFIED, "Antarctic - Ecological Salvage", SCENARIO_CATEGORY_EXPERT, "rct2ww.scenario_text.icy_adventures" }, - { SC_UNIDENTIFIED, "Europe - European Cultural Festival", SCENARIO_CATEGORY_EXPERT, "rct2ww.scenario_text.european_extravaganza" }, - { SC_UNIDENTIFIED, "Australasia - Fun at the Beach", SCENARIO_CATEGORY_EXPERT, "rct2ww.scenario_text.beach_barbecue_blast" }, - { SC_UNIDENTIFIED, "South America - Inca Lost City", SCENARIO_CATEGORY_EXPERT, "rct2ww.scenario_text.lost_city_founder" }, - { SC_UNIDENTIFIED, "Asia - Japanese Coastal Reclaim", SCENARIO_CATEGORY_EXPERT, "rct2ww.scenario_text.okinawa_coast" }, + { SC_UNIDENTIFIED, "North America - Grand Canyon", ScenarioCategory::beginner, "rct2ww.scenario_text.canyon_calamities" }, + { SC_UNIDENTIFIED, "Asia - Great Wall of China Tourism Enhancement", ScenarioCategory::beginner, "rct2ww.scenario_text.great_wall_of_china" }, + { SC_UNIDENTIFIED, "Africa - African Diamond Mine", ScenarioCategory::beginner, "rct2ww.scenario_text.mines_of_africa" }, + { SC_UNIDENTIFIED, "Australasia - Ayers Rock", ScenarioCategory::beginner, "rct2ww.scenario_text.ayers_adventure" }, + { SC_UNIDENTIFIED, "North America - Rollercoaster Heaven", ScenarioCategory::beginner, "rct2ww.scenario_text.rollercoaster_heaven" }, + { SC_UNIDENTIFIED, "Africa - Oasis", ScenarioCategory::challenging, "rct2ww.scenario_text.mirage_madness" }, + { SC_UNIDENTIFIED, "South America - Rio Carnival", ScenarioCategory::challenging, "rct2ww.scenario_text.sugarloaf_shores" }, + { SC_UNIDENTIFIED, "Asia - Maharaja Palace", ScenarioCategory::challenging, "rct2ww.scenario_text.park_maharaja" }, + { SC_UNIDENTIFIED, "Africa - Victoria Falls", ScenarioCategory::challenging, "rct2ww.scenario_text.over_the_edge" }, + { SC_UNIDENTIFIED, "N. America - Extreme Hawaiian Island", ScenarioCategory::challenging, "rct2ww.scenario_text.wacky_waikiki" }, + { SC_UNIDENTIFIED, "South America - Rain Forest Plateau", ScenarioCategory::challenging, "rct2ww.scenario_text.rainforest_romp" }, + { SC_UNIDENTIFIED, "Europe - Renovation", ScenarioCategory::challenging, "rct2ww.scenario_text.from_the_ashes" }, + { SC_UNIDENTIFIED, "Antarctic - Ecological Salvage", ScenarioCategory::expert, "rct2ww.scenario_text.icy_adventures" }, + { SC_UNIDENTIFIED, "Europe - European Cultural Festival", ScenarioCategory::expert, "rct2ww.scenario_text.european_extravaganza" }, + { SC_UNIDENTIFIED, "Australasia - Fun at the Beach", ScenarioCategory::expert, "rct2ww.scenario_text.beach_barbecue_blast" }, + { SC_UNIDENTIFIED, "South America - Inca Lost City", ScenarioCategory::expert, "rct2ww.scenario_text.lost_city_founder" }, + { SC_UNIDENTIFIED, "Asia - Japanese Coastal Reclaim", ScenarioCategory::expert, "rct2ww.scenario_text.okinawa_coast" }, }; // RCT2: Time Twister static constexpr ScenarioTitleDescriptor kScenarioTitlesRCT2TT[] = { - { SC_UNIDENTIFIED, "Dark Age - Robin Hood", SCENARIO_CATEGORY_BEGINNER, "rct2tt.scenario_text.sherwood_forest" }, - { SC_UNIDENTIFIED, "Prehistoric - After the Asteroid", SCENARIO_CATEGORY_BEGINNER, "rct2tt.scenario_text.crater_carnage" }, - { SC_UNIDENTIFIED, "Roaring Twenties - Prison Island", SCENARIO_CATEGORY_BEGINNER, "rct2tt.scenario_text.alcatraz" }, - { SC_UNIDENTIFIED, "Future - First Encounters", SCENARIO_CATEGORY_BEGINNER, "rct2tt.scenario_text.extraterrestrial_extravaganza" }, - { SC_UNIDENTIFIED, "Roaring Twenties - Schneider Cup", SCENARIO_CATEGORY_CHALLENGING, "rct2tt.scenario_text.schneider_shores" }, - { SC_UNIDENTIFIED, "Prehistoric - Stone Age", SCENARIO_CATEGORY_CHALLENGING, "rct2tt.scenario_text.rocky_rambles" }, - { SC_UNIDENTIFIED, "Mythological - Cradle of Civilisation", SCENARIO_CATEGORY_CHALLENGING, "rct2tt.scenario_text.mythological_madness" }, - { SC_UNIDENTIFIED, "Rock 'n' Roll - Rock 'n' Roll", SCENARIO_CATEGORY_CHALLENGING, "rct2tt.scenario_text.rock_n_roll_revival" }, - { SC_UNIDENTIFIED, "Future - Future World", SCENARIO_CATEGORY_CHALLENGING, "rct2tt.scenario_text.gemini_city" }, - { SC_UNIDENTIFIED, "Roaring Twenties - Skyscrapers", SCENARIO_CATEGORY_EXPERT, "rct2tt.scenario_text.metropolis" }, - { SC_UNIDENTIFIED, "Rock 'n' Roll - Flower Power", SCENARIO_CATEGORY_EXPERT, "rct2tt.scenario_text.woodstock" }, - { SC_UNIDENTIFIED, "Dark Age - Castle", SCENARIO_CATEGORY_EXPERT, "rct2tt.scenario_text.cliffside_castle" }, - { SC_UNIDENTIFIED, "Mythological - Animatronic Film Set", SCENARIO_CATEGORY_EXPERT, "rct2tt.scenario_text.animatronic_antics" }, - { SC_UNIDENTIFIED, "Prehistoric - Jurassic Safari", SCENARIO_CATEGORY_EXPERT, "rct2tt.scenario_text.coastersaurus" }, + { SC_UNIDENTIFIED, "Dark Age - Robin Hood", ScenarioCategory::beginner, "rct2tt.scenario_text.sherwood_forest" }, + { SC_UNIDENTIFIED, "Prehistoric - After the Asteroid", ScenarioCategory::beginner, "rct2tt.scenario_text.crater_carnage" }, + { SC_UNIDENTIFIED, "Roaring Twenties - Prison Island", ScenarioCategory::beginner, "rct2tt.scenario_text.alcatraz" }, + { SC_UNIDENTIFIED, "Future - First Encounters", ScenarioCategory::beginner, "rct2tt.scenario_text.extraterrestrial_extravaganza" }, + { SC_UNIDENTIFIED, "Roaring Twenties - Schneider Cup", ScenarioCategory::challenging, "rct2tt.scenario_text.schneider_shores" }, + { SC_UNIDENTIFIED, "Prehistoric - Stone Age", ScenarioCategory::challenging, "rct2tt.scenario_text.rocky_rambles" }, + { SC_UNIDENTIFIED, "Mythological - Cradle of Civilisation", ScenarioCategory::challenging, "rct2tt.scenario_text.mythological_madness" }, + { SC_UNIDENTIFIED, "Rock 'n' Roll - Rock 'n' Roll", ScenarioCategory::challenging, "rct2tt.scenario_text.rock_n_roll_revival" }, + { SC_UNIDENTIFIED, "Future - Future World", ScenarioCategory::challenging, "rct2tt.scenario_text.gemini_city" }, + { SC_UNIDENTIFIED, "Roaring Twenties - Skyscrapers", ScenarioCategory::expert, "rct2tt.scenario_text.metropolis" }, + { SC_UNIDENTIFIED, "Rock 'n' Roll - Flower Power", ScenarioCategory::expert, "rct2tt.scenario_text.woodstock" }, + { SC_UNIDENTIFIED, "Dark Age - Castle", ScenarioCategory::expert, "rct2tt.scenario_text.cliffside_castle" }, + { SC_UNIDENTIFIED, "Mythological - Animatronic Film Set", ScenarioCategory::expert, "rct2tt.scenario_text.animatronic_antics" }, + { SC_UNIDENTIFIED, "Prehistoric - Jurassic Safari", ScenarioCategory::expert, "rct2tt.scenario_text.coastersaurus" }, }; // User Created Expansion Sets static constexpr ScenarioTitleDescriptor kScenarioTitlesUCES[] = { - { SC_UNIDENTIFIED, "Lighthouse of Alexandria by Katatude for UCES", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.the_lighthouse_of_alexandria" }, - { SC_UNIDENTIFIED, "Cleveland's Luna Park", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.luna_park_cleveland" }, - { SC_UNIDENTIFIED, "Mount Vesuvius 1700 A.D. by Katatude for UCES", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.mount_vesuvius" }, - { SC_UNIDENTIFIED, "The Sandbox by Katatude for UCES", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.the_sandbox" }, - { SC_UNIDENTIFIED, "Niagara Falls & Gorge by Katatude for UCES", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.niagara_falls_gorge" }, - { SC_UNIDENTIFIED, "Rocky Mountain Miners", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.rocky_mountain_miners" }, - { SC_UNIDENTIFIED, "The Time Machine by Katatude for UCES", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.the_time_machine" }, - { SC_UNIDENTIFIED, "Tower of Babel", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.tower_of_babel" }, - { SC_UNIDENTIFIED, "Transformation", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.transformation" }, - { SC_UNIDENTIFIED, "Urbis Incognitus", SCENARIO_CATEGORY_TIME_MACHINE, "uces.scenario_text.urbis_incognitus" }, - { SC_UNIDENTIFIED, "Beneath the Christmas Tree by Katatude for UCES", SCENARIO_CATEGORY_KATYS_DREAMWORLD, "uces.scenario_text.beneath_the_christmas_tree" }, - { SC_UNIDENTIFIED, "Bigrock Blast", SCENARIO_CATEGORY_KATYS_DREAMWORLD, "uces.scenario_text.bigrock_blast" }, - { SC_UNIDENTIFIED, "Camp Mockingbird for UCES by Katatude", SCENARIO_CATEGORY_KATYS_DREAMWORLD, "uces.scenario_text.camp_mockingbird" }, - { SC_UNIDENTIFIED, "Choo Choo Town", SCENARIO_CATEGORY_KATYS_DREAMWORLD, "uces.scenario_text.choochoo_town" }, - { SC_UNIDENTIFIED, "Dragon Islands", SCENARIO_CATEGORY_KATYS_DREAMWORLD, "uces.scenario_text.dragon_islands" }, - { SC_UNIDENTIFIED, "Kiddy Karnival II", SCENARIO_CATEGORY_KATYS_DREAMWORLD, "uces.scenario_text.kiddie_karnival_ii" }, - { SC_UNIDENTIFIED, "Sand Dune", SCENARIO_CATEGORY_KATYS_DREAMWORLD, "uces.scenario_text.sand_dune" }, - { SC_UNIDENTIFIED, "UCES Halloween", SCENARIO_CATEGORY_OTHER, "uces.scenario_text.cemetery_ridge" }, + { SC_UNIDENTIFIED, "Lighthouse of Alexandria by Katatude for UCES", ScenarioCategory::timeMachine, "uces.scenario_text.the_lighthouse_of_alexandria" }, + { SC_UNIDENTIFIED, "Cleveland's Luna Park", ScenarioCategory::timeMachine, "uces.scenario_text.luna_park_cleveland" }, + { SC_UNIDENTIFIED, "Mount Vesuvius 1700 A.D. by Katatude for UCES", ScenarioCategory::timeMachine, "uces.scenario_text.mount_vesuvius" }, + { SC_UNIDENTIFIED, "The Sandbox by Katatude for UCES", ScenarioCategory::timeMachine, "uces.scenario_text.the_sandbox" }, + { SC_UNIDENTIFIED, "Niagara Falls & Gorge by Katatude for UCES", ScenarioCategory::timeMachine, "uces.scenario_text.niagara_falls_gorge" }, + { SC_UNIDENTIFIED, "Rocky Mountain Miners", ScenarioCategory::timeMachine, "uces.scenario_text.rocky_mountain_miners" }, + { SC_UNIDENTIFIED, "The Time Machine by Katatude for UCES", ScenarioCategory::timeMachine, "uces.scenario_text.the_time_machine" }, + { SC_UNIDENTIFIED, "Tower of Babel", ScenarioCategory::timeMachine, "uces.scenario_text.tower_of_babel" }, + { SC_UNIDENTIFIED, "Transformation", ScenarioCategory::timeMachine, "uces.scenario_text.transformation" }, + { SC_UNIDENTIFIED, "Urbis Incognitus", ScenarioCategory::timeMachine, "uces.scenario_text.urbis_incognitus" }, + { SC_UNIDENTIFIED, "Beneath the Christmas Tree by Katatude for UCES", ScenarioCategory::katysDreamworld, "uces.scenario_text.beneath_the_christmas_tree" }, + { SC_UNIDENTIFIED, "Bigrock Blast", ScenarioCategory::katysDreamworld, "uces.scenario_text.bigrock_blast" }, + { SC_UNIDENTIFIED, "Camp Mockingbird for UCES by Katatude", ScenarioCategory::katysDreamworld, "uces.scenario_text.camp_mockingbird" }, + { SC_UNIDENTIFIED, "Choo Choo Town", ScenarioCategory::katysDreamworld, "uces.scenario_text.choochoo_town" }, + { SC_UNIDENTIFIED, "Dragon Islands", ScenarioCategory::katysDreamworld, "uces.scenario_text.dragon_islands" }, + { SC_UNIDENTIFIED, "Kiddy Karnival II", ScenarioCategory::katysDreamworld, "uces.scenario_text.kiddie_karnival_ii" }, + { SC_UNIDENTIFIED, "Sand Dune", ScenarioCategory::katysDreamworld, "uces.scenario_text.sand_dune" }, + { SC_UNIDENTIFIED, "UCES Halloween", ScenarioCategory::other, "uces.scenario_text.cemetery_ridge" }, }; // Real parks static constexpr ScenarioTitleDescriptor kScenarioTitlesRealParks[] = { - { SC_ALTON_TOWERS, "Alton Towers", SCENARIO_CATEGORY_REAL, "rct1ll.scenario_text.alton_towers" }, - { SC_HEIDE_PARK, "Heide-Park", SCENARIO_CATEGORY_REAL, "rct1ll.scenario_text.heidepark" }, - { SC_BLACKPOOL_PLEASURE_BEACH, "Blackpool Pleasure Beach", SCENARIO_CATEGORY_REAL, "rct1ll.scenario_text.blackpool_pleasure_beach" }, - { SC_UNIDENTIFIED, "Six Flags Belgium", SCENARIO_CATEGORY_REAL, "rct2.scenario_text.six_flags_belgium" }, - { SC_UNIDENTIFIED, "Six Flags Great Adventure", SCENARIO_CATEGORY_REAL, "rct2.scenario_text.six_flags_great_adventure" }, - { SC_UNIDENTIFIED, "Six Flags Holland", SCENARIO_CATEGORY_REAL, "rct2.scenario_text.six_flags_holland" }, - { SC_UNIDENTIFIED, "Six Flags Magic Mountain", SCENARIO_CATEGORY_REAL, "rct2.scenario_text.six_flags_magic_mountain" }, - { SC_UNIDENTIFIED, "Six Flags over Texas", SCENARIO_CATEGORY_REAL, "rct2.scenario_text.six_flags_over_texas" }, + { SC_ALTON_TOWERS, "Alton Towers", ScenarioCategory::real, "rct1ll.scenario_text.alton_towers" }, + { SC_HEIDE_PARK, "Heide-Park", ScenarioCategory::real, "rct1ll.scenario_text.heidepark" }, + { SC_BLACKPOOL_PLEASURE_BEACH, "Blackpool Pleasure Beach", ScenarioCategory::real, "rct1ll.scenario_text.blackpool_pleasure_beach" }, + { SC_UNIDENTIFIED, "Six Flags Belgium", ScenarioCategory::real, "rct2.scenario_text.six_flags_belgium" }, + { SC_UNIDENTIFIED, "Six Flags Great Adventure", ScenarioCategory::real, "rct2.scenario_text.six_flags_great_adventure" }, + { SC_UNIDENTIFIED, "Six Flags Holland", ScenarioCategory::real, "rct2.scenario_text.six_flags_holland" }, + { SC_UNIDENTIFIED, "Six Flags Magic Mountain", ScenarioCategory::real, "rct2.scenario_text.six_flags_magic_mountain" }, + { SC_UNIDENTIFIED, "Six Flags over Texas", ScenarioCategory::real, "rct2.scenario_text.six_flags_over_texas" }, }; // Other parks static constexpr ScenarioTitleDescriptor kScenarioTitlesExtrasParks[] = { - { SC_FORT_ANACHRONISM, "Fort Anachronism", SCENARIO_CATEGORY_DLC, "rct1dlc.scenario_text.fort_anachronism" }, - { SC_PCPLAYER, "PC Player", SCENARIO_CATEGORY_DLC, {} }, - { SC_PCGW, "PC Gaming World", SCENARIO_CATEGORY_DLC, {} }, - { SC_GAMEPLAY, "gameplay", SCENARIO_CATEGORY_DLC, {} }, - { SC_UNIDENTIFIED, "Panda World", SCENARIO_CATEGORY_DLC, "rct2dlc.scenario_text.panda_world" }, - { SC_UNIDENTIFIED, "Build your own Six Flags Belgium", SCENARIO_CATEGORY_BUILD_YOUR_OWN, "rct2.scenario_text.build_your_own_six_flags_belgium" }, - { SC_UNIDENTIFIED, "Build your own Six Flags Great Adventure", SCENARIO_CATEGORY_BUILD_YOUR_OWN, "rct2.scenario_text.build_your_own_six_flags_great_adventure" }, - { SC_UNIDENTIFIED, "Build your own Six Flags Holland", SCENARIO_CATEGORY_BUILD_YOUR_OWN, "rct2.scenario_text.build_your_own_six_flags_holland" }, - { SC_UNIDENTIFIED, "Build your own Six Flags Magic Mountain", SCENARIO_CATEGORY_BUILD_YOUR_OWN, "rct2.scenario_text.build_your_own_six_flags_magic_mountain" }, - { SC_UNIDENTIFIED, "Build your own Six Flags Park", SCENARIO_CATEGORY_BUILD_YOUR_OWN, "rct2.scenario_text.build_your_own_six_flags_park" }, - { SC_UNIDENTIFIED, "Build your own Six Flags over Texas", SCENARIO_CATEGORY_BUILD_YOUR_OWN, "rct2.scenario_text.build_your_own_six_flags_over_texas" }, - { SC_UNIDENTIFIED, "Competition Land 1", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_UNIDENTIFIED, "Competition Land 2", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_BOBSLED_COMPETITION, "Bobsled Roller Coaster Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_GO_KARTS_COMPETITION, "Go Karts Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_INVERTED_ROLLER_COASTER_COMPETITION, "Inverted Roller Coaster Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_MINE_TRAIN_COMPETITION, "Mine Train Roller Coaster Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_STAND_UP_STEEL_ROLLER_COASTER_COMPETITION, "Stand-Up Steel Roller Coaster Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_STEEL_CORKSCREW_COMPETITION, "Steel Corkscrew Roller Coaster Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_STEEL_MINI_ROLLER_COASTER_COMPETITION, "Steel Mini Roller Coaster Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_STEEL_ROLLER_COASTER_COMPETITION, "Steel Roller Coaster Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_STEEL_TWISTER_COMPETITION, "Steel Twister Roller Coaster Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_SUSPENDED_ROLLER_COASTER_COMPETITION, "Suspended Roller Coaster Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_WOODEN_ROLLER_COASTER_COMPETITION, "Wooden Roller Coaster Competition", SCENARIO_CATEGORY_COMPETITIONS, {} }, - { SC_UNIDENTIFIED, "Tycoon Park", SCENARIO_CATEGORY_OTHER, "rct2.scenario_text.tycoon_park" }, + { SC_FORT_ANACHRONISM, "Fort Anachronism", ScenarioCategory::dlc, "rct1dlc.scenario_text.fort_anachronism" }, + { SC_PCPLAYER, "PC Player", ScenarioCategory::dlc, {} }, + { SC_PCGW, "PC Gaming World", ScenarioCategory::dlc, {} }, + { SC_GAMEPLAY, "gameplay", ScenarioCategory::dlc, {} }, + { SC_UNIDENTIFIED, "Panda World", ScenarioCategory::dlc, "rct2dlc.scenario_text.panda_world" }, + { SC_UNIDENTIFIED, "Build your own Six Flags Belgium", ScenarioCategory::buildYourOwn, "rct2.scenario_text.build_your_own_six_flags_belgium" }, + { SC_UNIDENTIFIED, "Build your own Six Flags Great Adventure", ScenarioCategory::buildYourOwn, "rct2.scenario_text.build_your_own_six_flags_great_adventure" }, + { SC_UNIDENTIFIED, "Build your own Six Flags Holland", ScenarioCategory::buildYourOwn, "rct2.scenario_text.build_your_own_six_flags_holland" }, + { SC_UNIDENTIFIED, "Build your own Six Flags Magic Mountain", ScenarioCategory::buildYourOwn, "rct2.scenario_text.build_your_own_six_flags_magic_mountain" }, + { SC_UNIDENTIFIED, "Build your own Six Flags Park", ScenarioCategory::buildYourOwn, "rct2.scenario_text.build_your_own_six_flags_park" }, + { SC_UNIDENTIFIED, "Build your own Six Flags over Texas", ScenarioCategory::buildYourOwn, "rct2.scenario_text.build_your_own_six_flags_over_texas" }, + { SC_UNIDENTIFIED, "Competition Land 1", ScenarioCategory::competitions, {} }, + { SC_UNIDENTIFIED, "Competition Land 2", ScenarioCategory::competitions, {} }, + { SC_BOBSLED_COMPETITION, "Bobsled Roller Coaster Competition", ScenarioCategory::competitions, {} }, + { SC_GO_KARTS_COMPETITION, "Go Karts Competition", ScenarioCategory::competitions, {} }, + { SC_INVERTED_ROLLER_COASTER_COMPETITION, "Inverted Roller Coaster Competition", ScenarioCategory::competitions, {} }, + { SC_MINE_TRAIN_COMPETITION, "Mine Train Roller Coaster Competition", ScenarioCategory::competitions, {} }, + { SC_STAND_UP_STEEL_ROLLER_COASTER_COMPETITION, "Stand-Up Steel Roller Coaster Competition", ScenarioCategory::competitions, {} }, + { SC_STEEL_CORKSCREW_COMPETITION, "Steel Corkscrew Roller Coaster Competition", ScenarioCategory::competitions, {} }, + { SC_STEEL_MINI_ROLLER_COASTER_COMPETITION, "Steel Mini Roller Coaster Competition", ScenarioCategory::competitions, {} }, + { SC_STEEL_ROLLER_COASTER_COMPETITION, "Steel Roller Coaster Competition", ScenarioCategory::competitions, {} }, + { SC_STEEL_TWISTER_COMPETITION, "Steel Twister Roller Coaster Competition", ScenarioCategory::competitions, {} }, + { SC_SUSPENDED_ROLLER_COASTER_COMPETITION, "Suspended Roller Coaster Competition", ScenarioCategory::competitions, {} }, + { SC_WOODEN_ROLLER_COASTER_COMPETITION, "Wooden Roller Coaster Competition", ScenarioCategory::competitions, {} }, + { SC_UNIDENTIFIED, "Tycoon Park", ScenarioCategory::other, "rct2.scenario_text.tycoon_park" }, }; constexpr std::span kScenarioTitlesBySource[] = { @@ -385,7 +385,7 @@ namespace OpenRCT2::ScenarioSources outDesc->id = SC_UNIDENTIFIED; outDesc->source = static_cast(ScenarioSource::Other); outDesc->index = -1; - outDesc->category = SCENARIO_CATEGORY_OTHER; + outDesc->category = ScenarioCategory::other; outDesc->textObjectId = {}; return false; } @@ -418,7 +418,7 @@ namespace OpenRCT2::ScenarioSources outDesc->id = SC_UNIDENTIFIED; outDesc->source = static_cast(ScenarioSource::Other); outDesc->index = -1; - outDesc->category = SCENARIO_CATEGORY_OTHER; + outDesc->category = ScenarioCategory::other; outDesc->textObjectId = {}; return false; } diff --git a/src/openrct2/scenario/ScenarioSources.h b/src/openrct2/scenario/ScenarioSources.h index 460bee36bd..f7105fd426 100644 --- a/src/openrct2/scenario/ScenarioSources.h +++ b/src/openrct2/scenario/ScenarioSources.h @@ -11,13 +11,15 @@ #include "../core/StringTypes.h" +enum class ScenarioCategory : uint8_t; + struct SourceDescriptor { const utf8* title; uint8_t id; uint8_t source; int32_t index; - uint8_t category; + ScenarioCategory category; u8string_view textObjectId; }; diff --git a/src/openrct2/scenes/Scene.cpp b/src/openrct2/scenes/Scene.cpp index b2ce9d9db3..62f6462357 100644 --- a/src/openrct2/scenes/Scene.cpp +++ b/src/openrct2/scenes/Scene.cpp @@ -24,9 +24,9 @@ IContext& Scene::GetContext() return _context; } -GameState_t& Scene::GetGameState() +GameState_t& Scene::getGameState() { - return OpenRCT2::GetGameState(); + return OpenRCT2::getGameState(); } void Scene::FinishScene() diff --git a/src/openrct2/scenes/Scene.h b/src/openrct2/scenes/Scene.h index 222e711de9..86984b47d9 100644 --- a/src/openrct2/scenes/Scene.h +++ b/src/openrct2/scenes/Scene.h @@ -21,7 +21,7 @@ namespace OpenRCT2 public: virtual ~IScene() = default; - virtual GameState_t& GetGameState() = 0; + virtual GameState_t& getGameState() = 0; virtual IContext& GetContext() = 0; virtual void Load() = 0; @@ -36,7 +36,7 @@ namespace OpenRCT2 public: Scene(IContext& context); - GameState_t& GetGameState() override; + GameState_t& getGameState() override; IContext& GetContext() override; void SetOnComplete(std::function) override; diff --git a/src/openrct2/scenes/game/GameScene.cpp b/src/openrct2/scenes/game/GameScene.cpp index ce944d5f30..cf579e7751 100644 --- a/src/openrct2/scenes/game/GameScene.cpp +++ b/src/openrct2/scenes/game/GameScene.cpp @@ -22,7 +22,7 @@ void GameScene::Load() { LOG_VERBOSE("GameScene::Load()"); - gScreenFlags = SCREEN_FLAGS_PLAYING; + gLegacyScene = LegacyScene::playing; LOG_VERBOSE("GameScene::Load() finished"); } @@ -35,4 +35,9 @@ void GameScene::Tick() void GameScene::Stop() { Audio::StopAll(); + + // Force closure of any object selection windows, regardless of valid state. + // NB: this is relevant for both in-game scenes and editors, as the window + // may be opened in-game using cheats. + ContextForceCloseWindowByClass(WindowClass::EditorObjectSelection); } diff --git a/src/openrct2/scenes/preloader/PreloaderScene.cpp b/src/openrct2/scenes/preloader/PreloaderScene.cpp index b2e1d5cada..84b4e9f929 100644 --- a/src/openrct2/scenes/preloader/PreloaderScene.cpp +++ b/src/openrct2/scenes/preloader/PreloaderScene.cpp @@ -34,8 +34,8 @@ void PreloaderScene::Load() { LOG_VERBOSE("PreloaderScene::Load()"); - gScreenFlags = SCREEN_FLAGS_PLAYING; - gameStateInitAll(GetGameState(), kDefaultMapSize); + gLegacyScene = LegacyScene::playing; + gameStateInitAll(getGameState(), kDefaultMapSize); ViewportInitAll(); ContextOpenWindow(WindowClass::MainWindow); WindowSetFlagForAllViewports(VIEWPORT_FLAG_RENDERING_INHIBITED, true); diff --git a/src/openrct2/scenes/title/Command/SetLocation.cpp b/src/openrct2/scenes/title/Command/SetLocation.cpp index 61f50898d1..8d4556cb67 100644 --- a/src/openrct2/scenes/title/Command/SetLocation.cpp +++ b/src/openrct2/scenes/title/Command/SetLocation.cpp @@ -26,10 +26,10 @@ namespace OpenRCT2::Title int32_t z = TileElementHeight(loc); // Prevent scroll adjustment due to window placement when in-game - auto oldScreenFlags = gScreenFlags; - gScreenFlags = SCREEN_FLAGS_TITLE_DEMO; + auto oldLegacyScene = gLegacyScene; + gLegacyScene = LegacyScene::titleSequence; w->SetLocation({ loc, z }); - gScreenFlags = oldScreenFlags; + gLegacyScene = oldLegacyScene; ViewportUpdatePosition(w); } diff --git a/src/openrct2/scenes/title/TitleScene.cpp b/src/openrct2/scenes/title/TitleScene.cpp index 2d756dafbb..05a5db29ce 100644 --- a/src/openrct2/scenes/title/TitleScene.cpp +++ b/src/openrct2/scenes/title/TitleScene.cpp @@ -23,7 +23,6 @@ #include "../../interface/Viewport.h" #include "../../network/Network.h" #include "../../network/NetworkBase.h" -#include "../../scenario/Scenario.h" #include "../../scenario/ScenarioRepository.h" #include "../../ui/UiContext.h" #include "../../ui/WindowManager.h" @@ -54,7 +53,7 @@ bool TitleScene::PreviewSequence(size_t value) _previewingSequence = TryLoadSequence(true); if (_previewingSequence) { - if (!(gScreenFlags & SCREEN_FLAGS_TITLE_DEMO)) + if (gLegacyScene != LegacyScene::titleSequence) { gPreviewingTitleSequenceInGame = true; } @@ -62,7 +61,7 @@ bool TitleScene::PreviewSequence(size_t value) else { _currentSequence = TitleGetConfigSequence(); - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) { TryLoadSequence(); } @@ -99,14 +98,14 @@ void TitleScene::Load() PauseToggle(); } - gScreenFlags = SCREEN_FLAGS_TITLE_DEMO; + gLegacyScene = LegacyScene::titleSequence; gScreenAge = 0; gCurrentLoadedPath.clear(); #ifndef DISABLE_NETWORK GetContext().GetNetwork().Close(); #endif - gameStateInitAll(GetGameState(), kDefaultMapSize); + gameStateInitAll(getGameState(), kDefaultMapSize); ViewportInitAll(); ContextOpenWindow(WindowClass::MainWindow); @@ -159,7 +158,7 @@ void TitleScene::Tick() // update_weather_animation(); } - InputSetFlag(INPUT_FLAG_VIEWPORT_SCROLLING, false); + gInputFlags.unset(InputFlag::viewportScrolling); ContextHandleInput(); @@ -320,7 +319,7 @@ bool TitleScene::TryLoadSequence(bool loadPreview) _loadedTitleSequenceId = SIZE_MAX; if (!loadPreview) { - gameStateInitAll(GetGameState(), kDefaultMapSize); + gameStateInitAll(getGameState(), kDefaultMapSize); GameNotifyMapChanged(); } return false; diff --git a/src/openrct2/scenes/title/TitleSequence.cpp b/src/openrct2/scenes/title/TitleSequence.cpp index ec9eb87896..f32a72aab9 100644 --- a/src/openrct2/scenes/title/TitleSequence.cpp +++ b/src/openrct2/scenes/title/TitleSequence.cpp @@ -25,6 +25,7 @@ #include "../../scenario/ScenarioRepository.h" #include "../../scenario/ScenarioSources.h" +#include #include #include #include @@ -58,7 +59,7 @@ namespace OpenRCT2::Title auto ext = Path::GetExtension(path); if (String::equals(ext, TITLE_SEQUENCE_EXTENSION)) { - auto zip = Zip::TryOpen(path, ZIP_ACCESS::READ); + auto zip = Zip::TryOpen(path, ZipAccess::read); if (zip == nullptr) { Console::Error::WriteLine("Unable to open '%s'", path.c_str()); @@ -108,7 +109,7 @@ namespace OpenRCT2::Title const auto& filename = seq.Saves[index]; if (seq.IsZip) { - auto zip = Zip::TryOpen(seq.Path, ZIP_ACCESS::READ); + auto zip = Zip::TryOpen(seq.Path, ZipAccess::read); if (zip != nullptr) { auto data = zip->GetFileData(filename); @@ -132,7 +133,7 @@ namespace OpenRCT2::Title std::unique_ptr fileStream = nullptr; try { - fileStream = std::make_unique(absolutePath, OpenRCT2::FILE_MODE_OPEN); + fileStream = std::make_unique(absolutePath, OpenRCT2::FileMode::open); } catch (const IOException& exception) { @@ -158,7 +159,7 @@ namespace OpenRCT2::Title if (seq.IsZip) { auto fdata = std::vector(script.begin(), script.end()); - auto zip = Zip::Open(seq.Path, ZIP_ACCESS::WRITE); + auto zip = Zip::Open(seq.Path, ZipAccess::write); zip->SetFileData("script.txt", std::move(fdata)); } else @@ -188,7 +189,7 @@ namespace OpenRCT2::Title try { auto fdata = File::ReadAllBytes(path); - auto zip = Zip::TryOpen(seq.Path, ZIP_ACCESS::WRITE); + auto zip = Zip::TryOpen(seq.Path, ZipAccess::write); if (zip == nullptr) { Console::Error::WriteLine("Unable to open '%s'", seq.Path.c_str()); @@ -221,7 +222,7 @@ namespace OpenRCT2::Title auto& oldRelativePath = seq.Saves[index]; if (seq.IsZip) { - auto zip = Zip::TryOpen(seq.Path, ZIP_ACCESS::WRITE); + auto zip = Zip::TryOpen(seq.Path, ZipAccess::write); if (zip == nullptr) { Console::Error::WriteLine("Unable to open '%s'", seq.Path.c_str()); @@ -251,7 +252,7 @@ namespace OpenRCT2::Title auto& relativePath = seq.Saves[index]; if (seq.IsZip) { - auto zip = Zip::TryOpen(seq.Path, ZIP_ACCESS::WRITE); + auto zip = Zip::TryOpen(seq.Path, ZipAccess::write); if (zip == nullptr) { Console::Error::WriteLine("Unable to open '%s'", seq.Path.c_str()); @@ -483,7 +484,7 @@ namespace OpenRCT2::Title std::vector result; try { - auto fs = OpenRCT2::FileStream(path, OpenRCT2::FILE_MODE_OPEN); + auto fs = OpenRCT2::FileStream(path, OpenRCT2::FileMode::open); auto size = static_cast(fs.GetLength()); result.resize(size); fs.Read(result.data(), size); diff --git a/src/openrct2/scenes/title/TitleSequenceManager.cpp b/src/openrct2/scenes/title/TitleSequenceManager.cpp index d8c3f2a84d..3cc7f8382d 100644 --- a/src/openrct2/scenes/title/TitleSequenceManager.cpp +++ b/src/openrct2/scenes/title/TitleSequenceManager.cpp @@ -255,13 +255,13 @@ namespace OpenRCT2::TitleSequenceManager static std::string GetDataSequencesPath() { auto env = GetContext()->GetPlatformEnvironment(); - return env->GetDirectoryPath(DIRBASE::OPENRCT2, DIRID::SEQUENCE); + return env->GetDirectoryPath(DirBase::openrct2, DirId::sequences); } static std::string GetUserSequencesPath() { auto env = GetContext()->GetPlatformEnvironment(); - return env->GetDirectoryPath(DIRBASE::USER, DIRID::SEQUENCE); + return env->GetDirectoryPath(DirBase::user, DirId::sequences); } static bool IsNameReserved(const std::string& name) diff --git a/src/openrct2/scripting/HookEngine.cpp b/src/openrct2/scripting/HookEngine.cpp index 2a84cae624..169ddc3292 100644 --- a/src/openrct2/scripting/HookEngine.cpp +++ b/src/openrct2/scripting/HookEngine.cpp @@ -18,42 +18,42 @@ using namespace OpenRCT2::Scripting; -static const EnumMap HooksLookupTable({ - { "action.query", HOOK_TYPE::ACTION_QUERY }, - { "action.execute", HOOK_TYPE::ACTION_EXECUTE }, - { "interval.tick", HOOK_TYPE::INTERVAL_TICK }, - { "interval.day", HOOK_TYPE::INTERVAL_DAY }, - { "network.chat", HOOK_TYPE::NETWORK_CHAT }, - { "network.authenticate", HOOK_TYPE::NETWORK_AUTHENTICATE }, - { "network.join", HOOK_TYPE::NETWORK_JOIN }, - { "network.leave", HOOK_TYPE::NETWORK_LEAVE }, - { "ride.ratings.calculate", HOOK_TYPE::RIDE_RATINGS_CALCULATE }, - { "action.location", HOOK_TYPE::ACTION_LOCATION }, - { "guest.generation", HOOK_TYPE::GUEST_GENERATION }, - { "vehicle.crash", HOOK_TYPE::VEHICLE_CRASH }, - { "map.change", HOOK_TYPE::MAP_CHANGE }, - { "map.changed", HOOK_TYPE::MAP_CHANGED }, - { "map.save", HOOK_TYPE::MAP_SAVE }, - { "park.guest.softcap.calculate", HOOK_TYPE::PARK_CALCULATE_GUEST_CAP }, +static const EnumMap HooksLookupTable({ + { "action.query", HookType::actionQuery }, + { "action.execute", HookType::actionExecute }, + { "interval.tick", HookType::intervalTick }, + { "interval.day", HookType::intervalDay }, + { "network.chat", HookType::networkChat }, + { "network.authenticate", HookType::networkAuthenticate }, + { "network.join", HookType::networkJoin }, + { "network.leave", HookType::networkLeave }, + { "ride.ratings.calculate", HookType::rideRatingsCalculate }, + { "action.location", HookType::actionLocation }, + { "guest.generation", HookType::guestGeneration }, + { "vehicle.crash", HookType::vehicleCrash }, + { "map.change", HookType::mapChange }, + { "map.changed", HookType::mapChanged }, + { "map.save", HookType::mapSave }, + { "park.guest.softcap.calculate", HookType::parkCalculateGuestCap }, }); -HOOK_TYPE OpenRCT2::Scripting::GetHookType(const std::string& name) +HookType OpenRCT2::Scripting::GetHookType(const std::string& name) { auto result = HooksLookupTable.find(name); - return (result != HooksLookupTable.end()) ? result->second : HOOK_TYPE::UNDEFINED; + return (result != HooksLookupTable.end()) ? result->second : HookType::notDefined; } HookEngine::HookEngine(ScriptEngine& scriptEngine) : _scriptEngine(scriptEngine) { - _hookMap.resize(NUM_HOOK_TYPES); - for (size_t i = 0; i < NUM_HOOK_TYPES; i++) + _hookMap.resize(NUM_HookTypeS); + for (size_t i = 0; i < NUM_HookTypeS; i++) { - _hookMap[i].Type = static_cast(i); + _hookMap[i].Type = static_cast(i); } } -uint32_t HookEngine::Subscribe(HOOK_TYPE type, std::shared_ptr owner, const DukValue& function) +uint32_t HookEngine::Subscribe(HookType type, std::shared_ptr owner, const DukValue& function) { auto& hookList = GetHookList(type); auto cookie = _nextCookie++; @@ -61,7 +61,7 @@ uint32_t HookEngine::Subscribe(HOOK_TYPE type, std::shared_ptr owner, co return cookie; } -void HookEngine::Unsubscribe(HOOK_TYPE type, uint32_t cookie) +void HookEngine::Unsubscribe(HookType type, uint32_t cookie) { auto& hookList = GetHookList(type); auto& hooks = hookList.Hooks; @@ -94,22 +94,22 @@ void HookEngine::UnsubscribeAll() } } -bool HookEngine::HasSubscriptions(HOOK_TYPE type) const +bool HookEngine::HasSubscriptions(HookType type) const { auto& hookList = GetHookList(type); return !hookList.Hooks.empty(); } -bool HookEngine::IsValidHookForPlugin(HOOK_TYPE type, Plugin& plugin) const +bool HookEngine::IsValidHookForPlugin(HookType type, Plugin& plugin) const { - if (type == HOOK_TYPE::MAP_CHANGED && plugin.GetMetadata().Type != PluginType::Intransient) + if (type == HookType::mapChanged && plugin.GetMetadata().Type != PluginType::Intransient) { return false; } return true; } -void HookEngine::Call(HOOK_TYPE type, bool isGameStateMutable) +void HookEngine::Call(HookType type, bool isGameStateMutable) { auto& hookList = GetHookList(type); for (auto& hook : hookList.Hooks) @@ -118,7 +118,7 @@ void HookEngine::Call(HOOK_TYPE type, bool isGameStateMutable) } } -void HookEngine::Call(HOOK_TYPE type, const DukValue& arg, bool isGameStateMutable) +void HookEngine::Call(HookType type, const DukValue& arg, bool isGameStateMutable) { auto& hookList = GetHookList(type); for (auto& hook : hookList.Hooks) @@ -128,7 +128,7 @@ void HookEngine::Call(HOOK_TYPE type, const DukValue& arg, bool isGameStateMutab } void HookEngine::Call( - HOOK_TYPE type, const std::initializer_list>& args, bool isGameStateMutable) + HookType type, const std::initializer_list>& args, bool isGameStateMutable) { auto& hookList = GetHookList(type); for (auto& hook : hookList.Hooks) @@ -162,13 +162,13 @@ void HookEngine::Call( } } -HookList& HookEngine::GetHookList(HOOK_TYPE type) +HookList& HookEngine::GetHookList(HookType type) { auto index = static_cast(type); return _hookMap[index]; } -const HookList& HookEngine::GetHookList(HOOK_TYPE type) const +const HookList& HookEngine::GetHookList(HookType type) const { auto index = static_cast(type); return _hookMap[index]; diff --git a/src/openrct2/scripting/HookEngine.h b/src/openrct2/scripting/HookEngine.h index 16d703feb7..8d4e4b1525 100644 --- a/src/openrct2/scripting/HookEngine.h +++ b/src/openrct2/scripting/HookEngine.h @@ -25,29 +25,29 @@ namespace OpenRCT2::Scripting class ScriptExecutionInfo; class Plugin; - enum class HOOK_TYPE + enum class HookType { - ACTION_QUERY, - ACTION_EXECUTE, - INTERVAL_TICK, - INTERVAL_DAY, - NETWORK_CHAT, - NETWORK_AUTHENTICATE, - NETWORK_JOIN, - NETWORK_LEAVE, - RIDE_RATINGS_CALCULATE, - ACTION_LOCATION, - GUEST_GENERATION, - VEHICLE_CRASH, - MAP_CHANGE, - MAP_CHANGED, - MAP_SAVE, - PARK_CALCULATE_GUEST_CAP, - COUNT, - UNDEFINED = -1, + actionQuery, + actionExecute, + intervalTick, + intervalDay, + networkChat, + networkAuthenticate, + networkJoin, + networkLeave, + rideRatingsCalculate, + actionLocation, + guestGeneration, + vehicleCrash, + mapChange, + mapChanged, + mapSave, + parkCalculateGuestCap, + count, + notDefined = -1, }; - constexpr size_t NUM_HOOK_TYPES = static_cast(HOOK_TYPE::COUNT); - HOOK_TYPE GetHookType(const std::string& name); + constexpr size_t NUM_HookTypeS = static_cast(HookType::count); + HookType GetHookType(const std::string& name); struct Hook { @@ -66,7 +66,7 @@ namespace OpenRCT2::Scripting struct HookList { - HOOK_TYPE Type{}; + HookType Type{}; std::vector Hooks; HookList() = default; @@ -84,20 +84,20 @@ namespace OpenRCT2::Scripting public: HookEngine(ScriptEngine& scriptEngine); HookEngine(const HookEngine&) = delete; - uint32_t Subscribe(HOOK_TYPE type, std::shared_ptr owner, const DukValue& function); - void Unsubscribe(HOOK_TYPE type, uint32_t cookie); + uint32_t Subscribe(HookType type, std::shared_ptr owner, const DukValue& function); + void Unsubscribe(HookType type, uint32_t cookie); void UnsubscribeAll(std::shared_ptr owner); void UnsubscribeAll(); - bool HasSubscriptions(HOOK_TYPE type) const; - bool IsValidHookForPlugin(HOOK_TYPE type, Plugin& plugin) const; - void Call(HOOK_TYPE type, bool isGameStateMutable); - void Call(HOOK_TYPE type, const DukValue& arg, bool isGameStateMutable); + bool HasSubscriptions(HookType type) const; + bool IsValidHookForPlugin(HookType type, Plugin& plugin) const; + void Call(HookType type, bool isGameStateMutable); + void Call(HookType type, const DukValue& arg, bool isGameStateMutable); void Call( - HOOK_TYPE type, const std::initializer_list>& args, bool isGameStateMutable); + HookType type, const std::initializer_list>& args, bool isGameStateMutable); private: - HookList& GetHookList(HOOK_TYPE type); - const HookList& GetHookList(HOOK_TYPE type) const; + HookList& GetHookList(HookType type); + const HookList& GetHookList(HookType type) const; }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/scripting/ScriptEngine.cpp b/src/openrct2/scripting/ScriptEngine.cpp index be64ae4062..32d0a59838 100644 --- a/src/openrct2/scripting/ScriptEngine.cpp +++ b/src/openrct2/scripting/ScriptEngine.cpp @@ -592,7 +592,7 @@ std::vector ScriptEngine::GetPluginFiles() const { // Scan for .js files in plugin directory std::vector pluginFiles; - auto base = _env.GetDirectoryPath(DIRBASE::USER, DIRID::PLUGIN); + auto base = _env.GetDirectoryPath(DirBase::user, DirId::plugins); if (Path::DirectoryExists(base)) { auto pattern = Path::Combine(base, u8"*.js"); @@ -794,7 +794,7 @@ void ScriptEngine::SetupHotReloading() { try { - auto base = _env.GetDirectoryPath(DIRBASE::USER, DIRID::PLUGIN); + auto base = _env.GetDirectoryPath(DirBase::user, DirId::plugins); if (Path::DirectoryExists(base)) { _pluginFileWatcher = std::make_unique(base); @@ -1460,7 +1460,7 @@ void ScriptEngine::RunGameActionHooks(const GameAction& action, GameActions::Res { DukStackFrame frame(_context); - auto hookType = isExecute ? HOOK_TYPE::ACTION_EXECUTE : HOOK_TYPE::ACTION_QUERY; + auto hookType = isExecute ? HookType::actionExecute : HookType::actionQuery; if (_hookEngine.HasSubscriptions(hookType)) { DukObject obj(_context); @@ -1573,7 +1573,7 @@ void ScriptEngine::LoadSharedStorage() { InitSharedStorage(); - auto path = _env.GetFilePath(PATHID::PLUGIN_STORE); + auto path = _env.GetFilePath(PathId::pluginStore); try { if (File::Exists(path)) @@ -1595,7 +1595,7 @@ void ScriptEngine::LoadSharedStorage() void ScriptEngine::SaveSharedStorage() { - auto path = _env.GetFilePath(PATHID::PLUGIN_STORE); + auto path = _env.GetFilePath(PathId::pluginStore); try { _sharedStorage.push(); diff --git a/src/openrct2/scripting/ScriptEngine.h b/src/openrct2/scripting/ScriptEngine.h index e3b323cd78..cb2d5ea36f 100644 --- a/src/openrct2/scripting/ScriptEngine.h +++ b/src/openrct2/scripting/ScriptEngine.h @@ -46,7 +46,7 @@ namespace OpenRCT2 namespace OpenRCT2::Scripting { - static constexpr int32_t kPluginApiVersion = 104; + static constexpr int32_t kPluginApiVersion = 105; // Versions marking breaking changes. static constexpr int32_t kApiVersionPeepDeprecation = 33; diff --git a/src/openrct2/scripting/bindings/entity/ScGuest.cpp b/src/openrct2/scripting/bindings/entity/ScGuest.cpp index a8dce9ce69..fd49d36079 100644 --- a/src/openrct2/scripting/bindings/entity/ScGuest.cpp +++ b/src/openrct2/scripting/bindings/entity/ScGuest.cpp @@ -512,9 +512,9 @@ namespace OpenRCT2::Scripting auto peep = GetGuest(); if (peep != nullptr) { - auto& gameState = GetGameState(); - if (value.type() == DukValue::Type::NUMBER && value.as_uint() < gameState.Rides.size() - && gameState.Rides[value.as_uint()].type != kRideTypeNull) + auto& gameState = getGameState(); + if (value.type() == DukValue::Type::NUMBER && value.as_uint() < gameState.rides.size() + && gameState.rides[value.as_uint()].type != kRideTypeNull) { peep->FavouriteRide = RideId::FromUnderlying(value.as_uint()); } diff --git a/src/openrct2/scripting/bindings/entity/ScVehicle.cpp b/src/openrct2/scripting/bindings/entity/ScVehicle.cpp index 72c89ca0e3..d64dccd880 100644 --- a/src/openrct2/scripting/bindings/entity/ScVehicle.cpp +++ b/src/openrct2/scripting/bindings/entity/ScVehicle.cpp @@ -9,10 +9,13 @@ #include "ScVehicle.hpp" +#include "../../../world/tile_element/TrackElement.h" #include "../ride/ScRide.hpp" #ifdef ENABLE_SCRIPTING +using namespace OpenRCT2::Drawing; + namespace OpenRCT2::Scripting { static const DukEnumMap VehicleStatusMap({ @@ -75,7 +78,7 @@ namespace OpenRCT2::Scripting ctx, &ScVehicle::flag_get, &ScVehicle::flag_set, "isReversed"); dukglue_register_property(ctx, &ScVehicle::colours_get, &ScVehicle::colours_set, "colours"); - dukglue_register_property(ctx, &ScVehicle::trackLocation_get, &ScVehicle::trackLocation_set, "trackLocation"); + dukglue_register_property(ctx, &ScVehicle::trackLocation_get, nullptr, "trackLocation"); dukglue_register_property(ctx, &ScVehicle::trackProgress_get, nullptr, "trackProgress"); dukglue_register_property(ctx, &ScVehicle::remainingDistance_get, nullptr, "remainingDistance"); dukglue_register_property(ctx, &ScVehicle::subposition_get, nullptr, "subposition"); @@ -88,6 +91,7 @@ namespace OpenRCT2::Scripting dukglue_register_property(ctx, &ScVehicle::guests_get, nullptr, "guests"); dukglue_register_property(ctx, &ScVehicle::gForces_get, nullptr, "gForces"); dukglue_register_method(ctx, &ScVehicle::travelBy, "travelBy"); + dukglue_register_method(ctx, &ScVehicle::moveToTrack, "moveToTrack"); } Vehicle* ScVehicle::GetVehicle() const @@ -397,20 +401,6 @@ namespace OpenRCT2::Scripting } return ToDuk(ctx, nullptr); } - void ScVehicle::trackLocation_set(const DukValue& value) - { - ThrowIfGameStateNotMutable(); - auto vehicle = GetVehicle(); - if (vehicle != nullptr) - { - auto x = AsOrDefault(value["x"], 0); - auto y = AsOrDefault(value["y"], 0); - auto z = AsOrDefault(value["z"], 0); - vehicle->TrackLocation = CoordsXYZ(x, y, z); - vehicle->SetTrackDirection(AsOrDefault(value["direction"], 0)); - vehicle->SetTrackType(static_cast(AsOrDefault(value["trackType"], 0))); - } - } uint16_t ScVehicle::trackProgress_get() const { @@ -543,8 +533,41 @@ namespace OpenRCT2::Scripting if (vehicle != nullptr) { vehicle->MoveRelativeDistance(value); + EntityTweener::Get().RemoveEntity(vehicle); } } + + void ScVehicle::moveToTrack(int32_t x, int32_t y, int32_t elementIndex) + { + CoordsXY coords = TileCoordsXY(x, y).ToCoordsXY(); + auto vehicle = GetVehicle(); + if (vehicle == nullptr) + return; + + auto el = MapGetNthElementAt(coords, elementIndex); + if (el == nullptr) + return; + + auto origin = GetTrackSegmentOrigin(CoordsXYE(coords, el)); + if (!origin) + return; + + auto trackEl = el->AsTrack(); + + vehicle->TrackLocation.x = origin->x; + vehicle->TrackLocation.y = origin->y; + vehicle->TrackLocation.z = origin->z; + vehicle->SetTrackDirection(origin->direction); + vehicle->SetTrackType(trackEl->GetTrackType()); + + // Clip track progress to avoid being out of bounds of current piece + uint16_t trackTotalProgress = vehicle->GetTrackProgress(); + if (trackTotalProgress && vehicle->track_progress >= trackTotalProgress) + vehicle->track_progress = trackTotalProgress - 1; + + vehicle->UpdateTrackChange(); + EntityTweener::Get().RemoveEntity(vehicle); + } } // namespace OpenRCT2::Scripting #endif diff --git a/src/openrct2/scripting/bindings/entity/ScVehicle.hpp b/src/openrct2/scripting/bindings/entity/ScVehicle.hpp index bac257d814..97fce3d007 100644 --- a/src/openrct2/scripting/bindings/entity/ScVehicle.hpp +++ b/src/openrct2/scripting/bindings/entity/ScVehicle.hpp @@ -11,6 +11,7 @@ #ifdef ENABLE_SCRIPTING + #include "../../../entity/EntityTweener.h" #include "../../../ride/Ride.h" #include "ScEntity.hpp" @@ -101,6 +102,8 @@ namespace OpenRCT2::Scripting DukValue gForces_get() const; void travelBy(int32_t value); + + void moveToTrack(int32_t x, int32_t y, int32_t elementIndex); }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/scripting/bindings/game/ScCheats.hpp b/src/openrct2/scripting/bindings/game/ScCheats.hpp index 2040a311dd..27c3ea6b3d 100644 --- a/src/openrct2/scripting/bindings/game/ScCheats.hpp +++ b/src/openrct2/scripting/bindings/game/ScCheats.hpp @@ -79,266 +79,266 @@ namespace OpenRCT2::Scripting private: bool allowArbitraryRideTypeChanges_get() { - return GetGameState().Cheats.allowArbitraryRideTypeChanges; + return getGameState().cheats.allowArbitraryRideTypeChanges; } void allowArbitraryRideTypeChanges_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.allowArbitraryRideTypeChanges = value; + getGameState().cheats.allowArbitraryRideTypeChanges = value; } bool allowTrackPlaceInvalidHeights_get() { - return GetGameState().Cheats.allowTrackPlaceInvalidHeights; + return getGameState().cheats.allowTrackPlaceInvalidHeights; } void allowTrackPlaceInvalidHeights_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.allowTrackPlaceInvalidHeights = value; + getGameState().cheats.allowTrackPlaceInvalidHeights = value; } bool buildInPauseMode_get() { - return GetGameState().Cheats.buildInPauseMode; + return getGameState().cheats.buildInPauseMode; } void buildInPauseMode_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.buildInPauseMode = value; + getGameState().cheats.buildInPauseMode = value; } bool disableAllBreakdowns_get() { - return GetGameState().Cheats.disableAllBreakdowns; + return getGameState().cheats.disableAllBreakdowns; } void disableAllBreakdowns_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.disableAllBreakdowns = value; + getGameState().cheats.disableAllBreakdowns = value; } bool disableBrakesFailure_get() { - return GetGameState().Cheats.disableBrakesFailure; + return getGameState().cheats.disableBrakesFailure; } void disableBrakesFailure_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.disableBrakesFailure = value; + getGameState().cheats.disableBrakesFailure = value; } bool disableClearanceChecks_get() { - return GetGameState().Cheats.disableClearanceChecks; + return getGameState().cheats.disableClearanceChecks; } void disableClearanceChecks_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.disableClearanceChecks = value; + getGameState().cheats.disableClearanceChecks = value; } bool disableLittering_get() { - return GetGameState().Cheats.disableLittering; + return getGameState().cheats.disableLittering; } void disableLittering_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.disableLittering = value; + getGameState().cheats.disableLittering = value; } bool disablePlantAging_get() { - return GetGameState().Cheats.disablePlantAging; + return getGameState().cheats.disablePlantAging; } void disablePlantAging_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.disablePlantAging = value; + getGameState().cheats.disablePlantAging = value; } bool allowRegularPathAsQueue_get() { - return GetGameState().Cheats.allowRegularPathAsQueue; + return getGameState().cheats.allowRegularPathAsQueue; } void allowRegularPathAsQueue_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.allowRegularPathAsQueue = value; + getGameState().cheats.allowRegularPathAsQueue = value; } bool allowSpecialColourSchemes_get() { - return GetGameState().Cheats.allowSpecialColourSchemes; + return getGameState().cheats.allowSpecialColourSchemes; } void allowSpecialColourSchemes_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.allowSpecialColourSchemes = value; + getGameState().cheats.allowSpecialColourSchemes = value; } bool disableRideValueAging_get() { - return GetGameState().Cheats.disableRideValueAging; + return getGameState().cheats.disableRideValueAging; } void disableRideValueAging_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.disableRideValueAging = value; + getGameState().cheats.disableRideValueAging = value; } bool disableSupportLimits_get() { - return GetGameState().Cheats.disableSupportLimits; + return getGameState().cheats.disableSupportLimits; } void disableSupportLimits_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.disableSupportLimits = value; + getGameState().cheats.disableSupportLimits = value; } bool disableTrainLengthLimit_get() { - return GetGameState().Cheats.disableTrainLengthLimit; + return getGameState().cheats.disableTrainLengthLimit; } void disableTrainLengthLimit_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.disableTrainLengthLimit = value; + getGameState().cheats.disableTrainLengthLimit = value; } bool disableVandalism_get() { - return GetGameState().Cheats.disableVandalism; + return getGameState().cheats.disableVandalism; } void disableVandalism_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.disableVandalism = value; + getGameState().cheats.disableVandalism = value; } bool enableAllDrawableTrackPieces_get() { - return GetGameState().Cheats.enableAllDrawableTrackPieces; + return getGameState().cheats.enableAllDrawableTrackPieces; } void enableAllDrawableTrackPieces_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.enableAllDrawableTrackPieces = value; + getGameState().cheats.enableAllDrawableTrackPieces = value; } bool enableChainLiftOnAllTrack_get() { - return GetGameState().Cheats.enableChainLiftOnAllTrack; + return getGameState().cheats.enableChainLiftOnAllTrack; } void enableChainLiftOnAllTrack_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.enableChainLiftOnAllTrack = value; + getGameState().cheats.enableChainLiftOnAllTrack = value; } bool fastLiftHill_get() { - return GetGameState().Cheats.unlockOperatingLimits; + return getGameState().cheats.unlockOperatingLimits; } void fastLiftHill_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.unlockOperatingLimits = value; + getGameState().cheats.unlockOperatingLimits = value; } bool freezeWeather_get() { - return GetGameState().Cheats.freezeWeather; + return getGameState().cheats.freezeWeather; } void freezeWeather_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.freezeWeather = value; + getGameState().cheats.freezeWeather = value; } bool ignoreResearchStatus_get() { - return GetGameState().Cheats.ignoreResearchStatus; + return getGameState().cheats.ignoreResearchStatus; } void ignoreResearchStatus_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.ignoreResearchStatus = value; + getGameState().cheats.ignoreResearchStatus = value; } bool ignoreRideIntensity_get() { - return GetGameState().Cheats.ignoreRideIntensity; + return getGameState().cheats.ignoreRideIntensity; } void ignoreRideIntensity_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.ignoreRideIntensity = value; + getGameState().cheats.ignoreRideIntensity = value; } bool neverendingMarketing_get() { - return GetGameState().Cheats.neverendingMarketing; + return getGameState().cheats.neverendingMarketing; } void neverendingMarketing_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.neverendingMarketing = value; + getGameState().cheats.neverendingMarketing = value; } bool sandboxMode_get() { - return GetGameState().Cheats.sandboxMode; + return getGameState().cheats.sandboxMode; } void sandboxMode_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.sandboxMode = value; + getGameState().cheats.sandboxMode = value; } bool showAllOperatingModes_get() { - return GetGameState().Cheats.showAllOperatingModes; + return getGameState().cheats.showAllOperatingModes; } void showAllOperatingModes_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.showAllOperatingModes = value; + getGameState().cheats.showAllOperatingModes = value; } bool showVehiclesFromOtherTrackTypes_get() { - return GetGameState().Cheats.showVehiclesFromOtherTrackTypes; + return getGameState().cheats.showVehiclesFromOtherTrackTypes; } void showVehiclesFromOtherTrackTypes_set(bool value) { ThrowIfGameStateNotMutable(); - GetGameState().Cheats.showVehiclesFromOtherTrackTypes = value; + getGameState().cheats.showVehiclesFromOtherTrackTypes = value; } }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/scripting/bindings/game/ScContext.hpp b/src/openrct2/scripting/bindings/game/ScContext.hpp index c61d48c657..7166b5c99d 100644 --- a/src/openrct2/scripting/bindings/game/ScContext.hpp +++ b/src/openrct2/scripting/bindings/game/ScContext.hpp @@ -16,7 +16,6 @@ #include "../../../interface/Screenshot.h" #include "../../../localisation/Formatting.h" #include "../../../object/ObjectManager.h" - #include "../../../scenario/Scenario.h" #include "../../Duktape.hpp" #include "../../HookEngine.h" #include "../../IconNames.hpp" @@ -115,13 +114,13 @@ namespace OpenRCT2::Scripting std::string mode_get() { - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return "title"; - else if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + else if (gLegacyScene == LegacyScene::scenarioEditor) return "scenario_editor"; - else if (gScreenFlags & SCREEN_FLAGS_TRACK_DESIGNER) + else if (gLegacyScene == LegacyScene::trackDesigner) return "track_designer"; - else if (gScreenFlags & SCREEN_FLAGS_TRACK_MANAGER) + else if (gLegacyScene == LegacyScene::trackDesignsManager) return "track_manager"; return "normal"; } @@ -274,7 +273,7 @@ namespace OpenRCT2::Scripting __declspec(noinline) #endif std::shared_ptr - CreateSubscription(HOOK_TYPE hookType, const DukValue& callback) + CreateSubscription(HookType hookType, const DukValue& callback) { auto owner = _execInfo.GetCurrentPlugin(); auto cookie = _hookEngine.Subscribe(hookType, owner, callback); @@ -287,7 +286,7 @@ namespace OpenRCT2::Scripting auto ctx = scriptEngine.GetContext(); auto hookType = GetHookType(hook); - if (hookType == HOOK_TYPE::UNDEFINED) + if (hookType == HookType::notDefined) { duk_error(ctx, DUK_ERR_ERROR, "Unknown hook type"); } diff --git a/src/openrct2/scripting/bindings/game/ScProfiler.hpp b/src/openrct2/scripting/bindings/game/ScProfiler.hpp index 205295ccb2..014871833b 100644 --- a/src/openrct2/scripting/bindings/game/ScProfiler.hpp +++ b/src/openrct2/scripting/bindings/game/ScProfiler.hpp @@ -40,7 +40,7 @@ namespace OpenRCT2::Scripting obj.Set("callCount", f->GetCallCount()); obj.Set("minTime", f->GetMinTime()); obj.Set("maxTime", f->GetMaxTime()); - obj.Set("totalTime", f->GetTotalTime()); + obj.Set("totalTime", f->getTotalTime()); obj.Set("parents", GetFunctionIndexArray(data, f->GetParents())); obj.Set("children", GetFunctionIndexArray(data, f->GetChildren())); obj.Take().push(); diff --git a/src/openrct2/scripting/bindings/object/ScInstalledObject.cpp b/src/openrct2/scripting/bindings/object/ScInstalledObject.cpp new file mode 100644 index 0000000000..c4aa54b430 --- /dev/null +++ b/src/openrct2/scripting/bindings/object/ScInstalledObject.cpp @@ -0,0 +1,53 @@ +/***************************************************************************** + * Copyright (c) 2014-2025 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#ifdef ENABLE_SCRIPTING + + #include "ScObject.hpp" + +namespace OpenRCT2::Scripting +{ + static const EnumMap kObjectTypeMap = { + { "ride", ObjectType::ride }, + { "small_scenery", ObjectType::smallScenery }, + { "large_scenery", ObjectType::largeScenery }, + { "wall", ObjectType::walls }, + { "banner", ObjectType::banners }, + { "footpath", ObjectType::paths }, + { "footpath_addition", ObjectType::pathAdditions }, + { "scenery_group", ObjectType::sceneryGroup }, + { "park_entrance", ObjectType::parkEntrance }, + { "water", ObjectType::water }, + { "scenario_text", ObjectType::scenarioText }, + { "terrain_surface", ObjectType::terrainSurface }, + { "terrain_edge", ObjectType::terrainEdge }, + { "station", ObjectType::station }, + { "music", ObjectType::music }, + { "footpath_surface", ObjectType::footpathSurface }, + { "footpath_railings", ObjectType::footpathRailings }, + { "audio", ObjectType::audio }, + { "peep_names", ObjectType::peepNames }, + { "peep_animations", ObjectType::peepAnimations }, + { "climate", ObjectType::climate }, + }; + + std::string_view objectTypeToString(ObjectType type) + { + auto result = kObjectTypeMap.find(type); + return result != kObjectTypeMap.end() ? result->first : ""; + } + + ObjectType objectTypeFromString(std::string_view string) + { + auto result = kObjectTypeMap.find(string); + return result != kObjectTypeMap.end() ? result->second : ObjectType::none; + } +} // namespace OpenRCT2::Scripting + +#endif diff --git a/src/openrct2/scripting/bindings/object/ScInstalledObject.hpp b/src/openrct2/scripting/bindings/object/ScInstalledObject.hpp index 553d178a42..7fa8bd2da1 100644 --- a/src/openrct2/scripting/bindings/object/ScInstalledObject.hpp +++ b/src/openrct2/scripting/bindings/object/ScInstalledObject.hpp @@ -17,34 +17,12 @@ #include "../../ScriptEngine.h" #include + #include namespace OpenRCT2::Scripting { - inline std::string_view ObjectTypeToString(uint8_t type) - { - static constexpr std::string_view Types[] = { - "ride", - "small_scenery", - "large_scenery", - "wall", - "banner", - "footpath", - "footpath_addition", - "scenery_group", - "park_entrance", - "water", - "stex", - "terrain_surface", - "terrain_edge", - "station", - "music", - "footpath_surface", - "footpath_railings", - }; - if (type >= std::size(Types)) - return "unknown"; - return Types[type]; - } + std::string_view objectTypeToString(ObjectType type); + ObjectType objectTypeFromString(std::string_view string); inline std::string_view ObjectSourceGameToString(ObjectSourceGame sourceGame) { @@ -122,7 +100,7 @@ namespace OpenRCT2::Scripting auto installedObject = GetInstalledObject(); if (installedObject != nullptr) { - return std::string(ObjectTypeToString(EnumValue(installedObject->Type))); + return std::string(objectTypeToString(installedObject->Type)); } return {}; } diff --git a/src/openrct2/scripting/bindings/object/ScObject.hpp b/src/openrct2/scripting/bindings/object/ScObject.hpp index 440cc8f6c3..e11bf731cd 100644 --- a/src/openrct2/scripting/bindings/object/ScObject.hpp +++ b/src/openrct2/scripting/bindings/object/ScObject.hpp @@ -51,19 +51,6 @@ namespace OpenRCT2::Scripting dukglue_register_property(ctx, &ScObject::numImages_get, nullptr, "numImages"); } - static std::optional StringToObjectType(std::string_view type) - { - for (uint8_t i = 0; i < EnumValue(ObjectType::count); i++) - { - auto s = ObjectTypeToString(i); - if (s == type) - { - return static_cast(i); - } - } - return std::nullopt; - } - private: std::shared_ptr installedObject_get() const { @@ -82,7 +69,7 @@ namespace OpenRCT2::Scripting std::string type_get() const { - return std::string(ObjectTypeToString(EnumValue(_type))); + return std::string(objectTypeToString(_type)); } int32_t index_get() const diff --git a/src/openrct2/scripting/bindings/object/ScObjectManager.cpp b/src/openrct2/scripting/bindings/object/ScObjectManager.cpp index 1fad4ad1f3..bab6a27f9b 100644 --- a/src/openrct2/scripting/bindings/object/ScObjectManager.cpp +++ b/src/openrct2/scripting/bindings/object/ScObjectManager.cpp @@ -157,15 +157,15 @@ void ScObjectManager::unload(const DukValue& p1, const DukValue& p2) if (p1.type() == DukValue::STRING) { const auto& szP1 = p1.as_string(); - auto objType = ScObject::StringToObjectType(szP1); - if (objType) + auto objType = objectTypeFromString(szP1); + if (objType != ObjectType::none) { // unload(type, index) if (p2.type() != DukValue::NUMBER) throw DukException() << "'index' is invalid."; auto objIndex = p2.as_uint(); - auto obj = objectManager.GetLoadedObject(*objType, objIndex); + auto obj = objectManager.GetLoadedObject(objType, objIndex); if (obj != nullptr) { objectManager.UnloadObjects({ obj->GetDescriptor() }); @@ -198,13 +198,13 @@ DukValue ScObjectManager::getObject(const std::string& typez, int32_t index) con auto ctx = GetContext()->GetScriptEngine().GetContext(); auto& objManager = GetContext()->GetObjectManager(); - auto type = ScObject::StringToObjectType(typez); - if (type) + auto type = objectTypeFromString(typez); + if (type != ObjectType::none) { - auto obj = objManager.GetLoadedObject(*type, index); + auto obj = objManager.GetLoadedObject(type, index); if (obj != nullptr) { - return CreateScObject(ctx, *type, index); + return CreateScObject(ctx, type, index); } } else @@ -220,16 +220,16 @@ std::vector ScObjectManager::getAllObjects(const std::string& typez) c auto& objManager = GetContext()->GetObjectManager(); std::vector result; - auto type = ScObject::StringToObjectType(typez); - if (type) + auto type = objectTypeFromString(typez); + if (type != ObjectType::none) { - auto count = getObjectEntryGroupCount(*type); + auto count = getObjectEntryGroupCount(type); for (auto i = 0u; i < count; i++) { - auto obj = objManager.GetLoadedObject(*type, i); + auto obj = objManager.GetLoadedObject(type, i); if (obj != nullptr) { - result.push_back(CreateScObject(ctx, *type, i)); + result.push_back(CreateScObject(ctx, type, i)); } } } diff --git a/src/openrct2/scripting/bindings/ride/ScRide.cpp b/src/openrct2/scripting/bindings/ride/ScRide.cpp index c26b64b227..21210b678a 100644 --- a/src/openrct2/scripting/bindings/ride/ScRide.cpp +++ b/src/openrct2/scripting/bindings/ride/ScRide.cpp @@ -36,7 +36,7 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - auto rideObject = GetContext()->GetObjectManager().GetLoadedObject(ObjectType::ride, ride->subtype); + auto rideObject = GetContext()->GetObjectManager().GetLoadedObject(ride->subtype); if (rideObject != nullptr) { return std::make_shared(ObjectType::ride, ride->subtype); @@ -56,13 +56,13 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - switch (ride->GetClassification()) + switch (ride->getClassification()) { - case RideClassification::Ride: + case RideClassification::ride: return "ride"; - case RideClassification::ShopOrStall: + case RideClassification::shopOrStall: return "stall"; - case RideClassification::KioskOrFacility: + case RideClassification::kioskOrFacility: return "facility"; } } @@ -72,7 +72,7 @@ namespace OpenRCT2::Scripting std::string ScRide::name_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->GetName() : std::string(); + return ride != nullptr ? ride->getName() : std::string(); } void ScRide::name_set(std::string value) { @@ -80,7 +80,7 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->custom_name = std::move(value); + ride->customName = std::move(value); } } @@ -91,15 +91,15 @@ namespace OpenRCT2::Scripting { switch (ride->status) { - case RideStatus::Closed: + case RideStatus::closed: return "closed"; - case RideStatus::Open: + case RideStatus::open: return "open"; - case RideStatus::Testing: + case RideStatus::testing: return "testing"; - case RideStatus::Simulating: + case RideStatus::simulating: return "simulating"; - case RideStatus::Count: // Meaningless but necessary to satisfy -Wswitch + case RideStatus::count: // Meaningless but necessary to satisfy -Wswitch return "count"; } } @@ -109,7 +109,7 @@ namespace OpenRCT2::Scripting uint32_t ScRide::lifecycleFlags_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->lifecycle_flags : 0; + return ride != nullptr ? ride->lifecycleFlags : 0; } void ScRide::lifecycleFlags_set(uint32_t value) @@ -118,7 +118,7 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->lifecycle_flags = value; + ride->lifecycleFlags = value; } } @@ -141,7 +141,7 @@ namespace OpenRCT2::Scripting uint8_t ScRide::departFlags_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->depart_flags : 0; + return ride != nullptr ? ride->departFlags : 0; } void ScRide::departFlags_set(uint8_t value) @@ -150,14 +150,14 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->depart_flags = value; + ride->departFlags = value; } } uint8_t ScRide::minimumWaitingTime_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->min_waiting_time : 0; + return ride != nullptr ? ride->minWaitingTime : 0; } void ScRide::minimumWaitingTime_set(uint8_t value) @@ -166,14 +166,14 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->min_waiting_time = value; + ride->minWaitingTime = value; } } uint8_t ScRide::maximumWaitingTime_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->max_waiting_time : 0; + return ride != nullptr ? ride->maxWaitingTime : 0; } void ScRide::maximumWaitingTime_set(uint8_t value) @@ -182,7 +182,7 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->max_waiting_time = value; + ride->maxWaitingTime = value; } } @@ -192,7 +192,7 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - std::for_each(std::begin(ride->vehicles), std::begin(ride->vehicles) + ride->NumTrains, [&](auto& veh) { + std::for_each(std::begin(ride->vehicles), std::begin(ride->vehicles) + ride->numTrains, [&](auto& veh) { result.push_back(veh.ToUnderlying()); }); } @@ -206,7 +206,7 @@ namespace OpenRCT2::Scripting if (ride != nullptr) { auto ctx = GetContext()->GetScriptEngine().GetContext(); - for (const auto& vehicleColour : ride->vehicle_colours) + for (const auto& vehicleColour : ride->vehicleColours) { result.push_back(ToDuk(ctx, vehicleColour)); } @@ -219,10 +219,10 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - auto count = std::min(value.size(), std::size(ride->vehicle_colours)); + auto count = std::min(value.size(), std::size(ride->vehicleColours)); for (size_t i = 0; i < count; i++) { - ride->vehicle_colours[i] = FromDuk(value[i]); + ride->vehicleColours[i] = FromDuk(value[i]); } } } @@ -234,7 +234,7 @@ namespace OpenRCT2::Scripting if (ride != nullptr) { auto ctx = GetContext()->GetScriptEngine().GetContext(); - for (const auto& trackColour : ride->track_colour) + for (const auto& trackColour : ride->trackColours) { result.push_back(ToDuk(ctx, trackColour)); } @@ -247,10 +247,10 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - auto count = std::min(value.size(), std::size(ride->track_colour)); + auto count = std::min(value.size(), std::size(ride->trackColours)); for (size_t i = 0; i < count; i++) { - ride->track_colour[i] = FromDuk(value[i]); + ride->trackColours[i] = FromDuk(value[i]); } } } @@ -258,7 +258,7 @@ namespace OpenRCT2::Scripting ObjectEntryIndex ScRide::stationStyle_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->entrance_style : 0; + return ride != nullptr ? ride->entranceStyle : 0; } void ScRide::stationStyle_set(ObjectEntryIndex value) @@ -267,7 +267,7 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->entrance_style = value; + ride->entranceStyle = value; } } @@ -293,9 +293,9 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - for (const auto& station : ride->GetStations()) + for (const auto& station : ride->getStations()) { - result.push_back(std::make_shared(ride->id, ride->GetStationIndex(&station))); + result.push_back(std::make_shared(ride->id, ride->getStationIndex(&station))); } } return result; @@ -307,7 +307,7 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - auto numPrices = ride->GetNumPrices(); + auto numPrices = ride->getNumPrices(); for (size_t i = 0; i < numPrices; i++) { result.push_back(ride->price[i]); @@ -322,7 +322,7 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - auto numPrices = std::min(value.size(), ride->GetNumPrices()); + auto numPrices = std::min(value.size(), ride->getNumPrices()); for (size_t i = 0; i < numPrices; i++) { ride->price[i] = std::clamp(value[i], kRideMinPrice, kRideMaxPrice); @@ -378,7 +378,7 @@ namespace OpenRCT2::Scripting int32_t ScRide::totalCustomers_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->total_customers : 0; + return ride != nullptr ? ride->totalCustomers : 0; } void ScRide::totalCustomers_set(int32_t value) { @@ -386,14 +386,14 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->total_customers = value; + ride->totalCustomers = value; } } int32_t ScRide::buildDate_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->build_date : 0; + return ride != nullptr ? ride->buildDate : 0; } void ScRide::buildDate_set(int32_t value) { @@ -401,20 +401,20 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->build_date = value; + ride->buildDate = value; } } int32_t ScRide::age_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->GetAge() : 0; + return ride != nullptr ? ride->getAge() : 0; } money64 ScRide::runningCost_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->upkeep_cost : 0; + return ride != nullptr ? ride->upkeepCost : 0; } void ScRide::runningCost_set(money64 value) { @@ -422,14 +422,14 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->upkeep_cost = value; + ride->upkeepCost = value; } } int32_t ScRide::totalProfit_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->total_profit : 0; + return ride != nullptr ? ride->totalProfit : 0; } void ScRide::totalProfit_set(int32_t value) { @@ -437,14 +437,14 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->total_profit = value; + ride->totalProfit = value; } } uint8_t ScRide::inspectionInterval_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->inspection_interval : 0; + return ride != nullptr ? ride->inspectionInterval : 0; } void ScRide::inspectionInterval_set(uint8_t value) { @@ -452,7 +452,7 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride != nullptr) { - ride->inspection_interval = std::clamp(value, RIDE_INSPECTION_EVERY_10_MINUTES, RIDE_INSPECTION_NEVER); + ride->inspectionInterval = std::clamp(value, RIDE_INSPECTION_EVERY_10_MINUTES, RIDE_INSPECTION_NEVER); } } @@ -460,7 +460,7 @@ namespace OpenRCT2::Scripting { auto ctx = GetContext()->GetScriptEngine().GetContext(); auto ride = GetRide(); - if (ride != nullptr && ride->value != RIDE_VALUE_UNDEFINED) + if (ride != nullptr && ride->value != kRideValueUndefined) { return ToDuk(ctx, ride->value); } @@ -479,7 +479,7 @@ namespace OpenRCT2::Scripting } else { - ride->value = RIDE_VALUE_UNDEFINED; + ride->value = kRideValueUndefined; } } } @@ -498,7 +498,7 @@ namespace OpenRCT2::Scripting uint8_t ScRide::liftHillSpeed_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->lift_hill_speed : 0; + return ride != nullptr ? ride->liftHillSpeed : 0; } void ScRide::lifthillSpeed_set(uint8_t value) @@ -508,20 +508,20 @@ namespace OpenRCT2::Scripting auto ride = GetRide(); if (ride) { - ride->lift_hill_speed = value; + ride->liftHillSpeed = value; } } uint8_t ScRide::maxLiftHillSpeed_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->GetRideTypeDescriptor().LiftData.maximum_speed : 0; + return ride != nullptr ? ride->getRideTypeDescriptor().LiftData.maximum_speed : 0; } uint8_t ScRide::minLiftHillSpeed_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->GetRideTypeDescriptor().LiftData.minimum_speed : 0; + return ride != nullptr ? ride->getRideTypeDescriptor().LiftData.minimum_speed : 0; } uint8_t ScRide::satisfaction_get() const @@ -533,43 +533,43 @@ namespace OpenRCT2::Scripting double ScRide::maxSpeed_get() const { auto ride = GetRide(); - return ride != nullptr ? ToHumanReadableSpeed(ride->max_speed) : 0; + return ride != nullptr ? ToHumanReadableSpeed(ride->maxSpeed) : 0; } double ScRide::averageSpeed_get() const { auto ride = GetRide(); - return ride != nullptr ? ToHumanReadableSpeed(ride->average_speed) : 0; + return ride != nullptr ? ToHumanReadableSpeed(ride->averageSpeed) : 0; } int32_t ScRide::rideTime_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->GetTotalTime() : 0; + return ride != nullptr ? ride->getTotalTime() : 0; } double ScRide::rideLength_get() const { auto ride = GetRide(); - return ride != nullptr ? ToHumanReadableRideLength(ride->GetTotalLength()) : 0; + return ride != nullptr ? ToHumanReadableRideLength(ride->getTotalLength()) : 0; } double ScRide::maxPositiveVerticalGs_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->max_positive_vertical_g / 100.0 : 0; + return ride != nullptr ? ride->maxPositiveVerticalG / 100.0 : 0; } double ScRide::maxNegativeVerticalGs_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->max_negative_vertical_g / 100.0 : 0; + return ride != nullptr ? ride->maxNegativeVerticalG / 100.0 : 0; } double ScRide::maxLateralGs_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->max_lateral_g / 100.0 : 0; + return ride != nullptr ? ride->maxLateralG / 100.0 : 0; } double ScRide::totalAirTime_get() const @@ -593,7 +593,7 @@ namespace OpenRCT2::Scripting double ScRide::highestDropHeight_get() const { auto ride = GetRide(); - return ride != nullptr ? ride->highest_drop_height : 0; + return ride != nullptr ? ride->highestDropHeight : 0; } void ScRide::Register(duk_context* ctx) diff --git a/src/openrct2/scripting/bindings/ride/ScRideStation.cpp b/src/openrct2/scripting/bindings/ride/ScRideStation.cpp index c1363486fd..9b48bf7cf7 100644 --- a/src/openrct2/scripting/bindings/ride/ScRideStation.cpp +++ b/src/openrct2/scripting/bindings/ride/ScRideStation.cpp @@ -120,9 +120,9 @@ namespace OpenRCT2::Scripting auto ride = GetRide(_rideId); if (ride != nullptr) { - if (_stationIndex.ToUnderlying() < std::size(ride->GetStations())) + if (_stationIndex.ToUnderlying() < std::size(ride->getStations())) { - return &ride->GetStation(_stationIndex); + return &ride->getStation(_stationIndex); } } return nullptr; diff --git a/src/openrct2/scripting/bindings/world/ScClimate.hpp b/src/openrct2/scripting/bindings/world/ScClimate.hpp index 4fcf15f1ec..2ad160f5eb 100644 --- a/src/openrct2/scripting/bindings/world/ScClimate.hpp +++ b/src/openrct2/scripting/bindings/world/ScClimate.hpp @@ -14,6 +14,8 @@ #include "../../../Context.h" #include "../../../GameState.h" #include "../../../core/StringTypes.h" + #include "../../../object/ClimateObject.h" + #include "../../../object/ObjectManager.h" #include "../../../world/Climate.h" #include "../../Duktape.hpp" #include "../../ScriptEngine.h" @@ -53,24 +55,6 @@ namespace OpenRCT2::Scripting class ScClimate { public: - static std::string ClimateTypeToString(ClimateType token) - { - switch (token) - { - case ClimateType::CoolAndWet: - return "coolAndWet"; - case ClimateType::Warm: - return "warm"; - case ClimateType::HotAndDry: - return "hotAndDry"; - case ClimateType::Cold: - return "cold"; - case ClimateType::Count: - return ""; - } - return ""; - } - static std::string WeatherTypeToString(WeatherType token) { switch (token) @@ -101,22 +85,26 @@ namespace OpenRCT2::Scripting std::string type_get() const { - auto& gameState = GetGameState(); - return ClimateTypeToString(gameState.Climate); + auto& objManager = GetContext()->GetObjectManager(); + auto* climateObj = objManager.GetLoadedObject(0); + if (climateObj == nullptr) + return ""; + + return climateObj->getScriptName(); } std::shared_ptr current_get() const { - auto& gameState = GetGameState(); - std::string weatherType = WeatherTypeToString(gameState.WeatherCurrent.weatherType); - return std::make_shared(weatherType, gameState.WeatherCurrent.temperature); + auto& gameState = getGameState(); + std::string weatherType = WeatherTypeToString(gameState.weatherCurrent.weatherType); + return std::make_shared(weatherType, gameState.weatherCurrent.temperature); } std::shared_ptr future_get() const { - auto& gameState = GetGameState(); - std::string weatherType = WeatherTypeToString(gameState.WeatherNext.weatherType); - return std::make_shared(weatherType, gameState.WeatherNext.temperature); + auto& gameState = getGameState(); + std::string weatherType = WeatherTypeToString(gameState.weatherNext.weatherType); + return std::make_shared(weatherType, gameState.weatherNext.temperature); } static void Register(duk_context* ctx) diff --git a/src/openrct2/scripting/bindings/world/ScDate.hpp b/src/openrct2/scripting/bindings/world/ScDate.hpp index be762bd62e..5c4148f947 100644 --- a/src/openrct2/scripting/bindings/world/ScDate.hpp +++ b/src/openrct2/scripting/bindings/world/ScDate.hpp @@ -44,7 +44,7 @@ namespace OpenRCT2::Scripting void monthsElapsed_set(uint32_t value) { ThrowIfGameStateNotMutable(); - GetGameState().Date = Date{ value, GetDate().GetMonthTicks() }; + getGameState().date = Date{ value, GetDate().GetMonthTicks() }; } uint32_t monthProgress_get() const @@ -56,7 +56,7 @@ namespace OpenRCT2::Scripting void monthProgress_set(int32_t value) { ThrowIfGameStateNotMutable(); - GetGameState().Date = Date{ GetDate().GetMonthsElapsed(), static_cast(value) }; + getGameState().date = Date{ GetDate().GetMonthsElapsed(), static_cast(value) }; } uint32_t yearsElapsed_get() const @@ -67,22 +67,22 @@ namespace OpenRCT2::Scripting uint32_t ticksElapsed_get() const { - return GetGameState().CurrentTicks; + return getGameState().currentTicks; } int32_t day_get() const { - return GetGameState().Date.GetDay() + 1; + return getGameState().date.GetDay() + 1; } int32_t month_get() const { - return GetGameState().Date.GetMonth(); + return getGameState().date.GetMonth(); } int32_t year_get() const { - return GetGameState().Date.GetYear() + 1; + return getGameState().date.GetYear() + 1; } }; } // namespace OpenRCT2::Scripting diff --git a/src/openrct2/scripting/bindings/world/ScMap.cpp b/src/openrct2/scripting/bindings/world/ScMap.cpp index dceb9addaf..217d66cee4 100644 --- a/src/openrct2/scripting/bindings/world/ScMap.cpp +++ b/src/openrct2/scripting/bindings/world/ScMap.cpp @@ -45,7 +45,7 @@ namespace OpenRCT2::Scripting DukValue ScMap::size_get() const { - return ToDuk(_context, GetGameState().MapSize); + return ToDuk(_context, getGameState().mapSize); } int32_t ScMap::numRides_get() const diff --git a/src/openrct2/scripting/bindings/world/ScPark.cpp b/src/openrct2/scripting/bindings/world/ScPark.cpp index 1059c583fe..b15336d8a1 100644 --- a/src/openrct2/scripting/bindings/world/ScPark.cpp +++ b/src/openrct2/scripting/bindings/world/ScPark.cpp @@ -51,16 +51,16 @@ namespace OpenRCT2::Scripting money64 ScPark::cash_get() const { - return GetGameState().Cash; + return getGameState().cash; } void ScPark::cash_set(money64 value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); - if (gameState.Cash != value) + auto& gameState = getGameState(); + if (gameState.cash != value) { - gameState.Cash = value; + gameState.cash = value; auto intent = Intent(INTENT_ACTION_UPDATE_CASH); ContextBroadcastIntent(&intent); } @@ -68,17 +68,17 @@ namespace OpenRCT2::Scripting int32_t ScPark::rating_get() const { - return GetGameState().Park.Rating; + return getGameState().park.Rating; } void ScPark::rating_set(int32_t value) { ThrowIfGameStateNotMutable(); auto valueClamped = std::min(std::max(0, value), 999); - auto& gameState = GetGameState(); - if (gameState.Park.Rating != valueClamped) + auto& gameState = getGameState(); + if (gameState.park.Rating != valueClamped) { - gameState.Park.Rating = std::min(std::max(0, value), 999); + gameState.park.Rating = std::min(std::max(0, value), 999); auto intent = Intent(INTENT_ACTION_UPDATE_PARK_RATING); ContextBroadcastIntent(&intent); } @@ -86,17 +86,17 @@ namespace OpenRCT2::Scripting money64 ScPark::bankLoan_get() const { - return GetGameState().BankLoan; + return getGameState().bankLoan; } void ScPark::bankLoan_set(money64 value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - if (gameState.BankLoan != value) + if (gameState.bankLoan != value) { - gameState.BankLoan = value; + gameState.bankLoan = value; auto intent = Intent(INTENT_ACTION_UPDATE_CASH); ContextBroadcastIntent(&intent); } @@ -104,16 +104,16 @@ namespace OpenRCT2::Scripting money64 ScPark::maxBankLoan_get() const { - return GetGameState().MaxBankLoan; + return getGameState().maxBankLoan; } void ScPark::maxBankLoan_set(money64 value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); - if (gameState.MaxBankLoan != value) + auto& gameState = getGameState(); + if (gameState.maxBankLoan != value) { - gameState.MaxBankLoan = value; + gameState.maxBankLoan = value; auto intent = Intent(INTENT_ACTION_UPDATE_CASH); ContextBroadcastIntent(&intent); } @@ -121,16 +121,16 @@ namespace OpenRCT2::Scripting money64 ScPark::entranceFee_get() const { - return GetGameState().Park.EntranceFee; + return getGameState().park.EntranceFee; } void ScPark::entranceFee_set(money64 value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); - if (gameState.Park.EntranceFee != value) + auto& gameState = getGameState(); + if (gameState.park.EntranceFee != value) { - gameState.Park.EntranceFee = value; + gameState.park.EntranceFee = value; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::ParkInformation); } @@ -138,17 +138,17 @@ namespace OpenRCT2::Scripting uint32_t ScPark::guests_get() const { - return GetGameState().NumGuestsInPark; + return getGameState().numGuestsInPark; } uint32_t ScPark::suggestedGuestMaximum_get() const { - return GetGameState().SuggestedGuestMaximum; + return getGameState().suggestedGuestMaximum; } int32_t ScPark::guestGenerationProbability_get() const { - return GetGameState().GuestGenerationProbability; + return getGameState().guestGenerationProbability; } DukValue ScPark::generateGuest() @@ -160,36 +160,36 @@ namespace OpenRCT2::Scripting money64 ScPark::guestInitialCash_get() const { - return GetGameState().GuestInitialCash; + return getGameState().guestInitialCash; } uint8_t ScPark::guestInitialHappiness_get() const { - return GetGameState().GuestInitialHappiness; + return getGameState().guestInitialHappiness; } uint8_t ScPark::guestInitialHunger_get() const { - return GetGameState().GuestInitialHunger; + return getGameState().guestInitialHunger; } uint8_t ScPark::guestInitialThirst_get() const { - return GetGameState().GuestInitialThirst; + return getGameState().guestInitialThirst; } money64 ScPark::value_get() const { - return GetGameState().Park.Value; + return getGameState().park.Value; } void ScPark::value_set(money64 value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); - if (gameState.Park.Value != value) + auto& gameState = getGameState(); + if (gameState.park.Value != value) { - gameState.Park.Value = value; + gameState.park.Value = value; auto intent = Intent(INTENT_ACTION_UPDATE_CASH); ContextBroadcastIntent(&intent); } @@ -197,16 +197,16 @@ namespace OpenRCT2::Scripting money64 ScPark::companyValue_get() const { - return GetGameState().CompanyValue; + return getGameState().companyValue; } void ScPark::companyValue_set(money64 value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - if (gameState.CompanyValue != value) + if (gameState.companyValue != value) { - gameState.CompanyValue = value; + gameState.companyValue = value; auto intent = Intent(INTENT_ACTION_UPDATE_CASH); ContextBroadcastIntent(&intent); } @@ -214,21 +214,21 @@ namespace OpenRCT2::Scripting money64 ScPark::totalRideValueForMoney_get() const { - return GetGameState().TotalRideValueForMoney; + return getGameState().totalRideValueForMoney; } uint32_t ScPark::totalAdmissions_get() const { - return GetGameState().TotalAdmissions; + return getGameState().totalAdmissions; } void ScPark::totalAdmissions_set(uint32_t value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - if (gameState.TotalAdmissions != value) + if (gameState.totalAdmissions != value) { - gameState.TotalAdmissions = value; + gameState.totalAdmissions = value; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::ParkInformation); } @@ -236,16 +236,16 @@ namespace OpenRCT2::Scripting money64 ScPark::totalIncomeFromAdmissions_get() const { - return GetGameState().TotalIncomeFromAdmissions; + return getGameState().totalIncomeFromAdmissions; } void ScPark::totalIncomeFromAdmissions_set(money64 value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - if (gameState.TotalIncomeFromAdmissions != value) + if (gameState.totalIncomeFromAdmissions != value) { - gameState.TotalIncomeFromAdmissions = value; + gameState.totalIncomeFromAdmissions = value; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::ParkInformation); } @@ -253,48 +253,48 @@ namespace OpenRCT2::Scripting money64 ScPark::landPrice_get() const { - return GetGameState().LandPrice; + return getGameState().landPrice; } void ScPark::landPrice_set(money64 value) { ThrowIfGameStateNotMutable(); - GetGameState().LandPrice = value; + getGameState().landPrice = value; } money64 ScPark::constructionRightsPrice_get() const { - return GetGameState().ConstructionRightsPrice; + return getGameState().constructionRightsPrice; } void ScPark::constructionRightsPrice_set(money64 value) { ThrowIfGameStateNotMutable(); - GetGameState().ConstructionRightsPrice = value; + getGameState().constructionRightsPrice = value; } int16_t ScPark::casualtyPenalty_get() const { - return GetGameState().Park.RatingCasualtyPenalty; + return getGameState().park.RatingCasualtyPenalty; } void ScPark::casualtyPenalty_set(int16_t value) { ThrowIfGameStateNotMutable(); - GetGameState().Park.RatingCasualtyPenalty = value; + getGameState().park.RatingCasualtyPenalty = value; } uint16_t ScPark::parkSize_get() const { - return GetGameState().Park.Size; + return getGameState().park.Size; } std::string ScPark::name_get() const { - return GetGameState().Park.Name; + return getGameState().park.Name; } void ScPark::name_set(std::string value) { ThrowIfGameStateNotMutable(); - auto& park = GetGameState().Park; + auto& park = getGameState().park; if (park.Name != value) { park.Name = std::move(value); @@ -305,18 +305,18 @@ namespace OpenRCT2::Scripting bool ScPark::getFlag(const std::string& key) const { auto mask = ParkFlagMap[key]; - return (GetGameState().Park.Flags & mask) != 0; + return (getGameState().park.Flags & mask) != 0; } void ScPark::setFlag(const std::string& key, bool value) { ThrowIfGameStateNotMutable(); auto mask = ParkFlagMap[key]; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (value) - gameState.Park.Flags |= mask; + gameState.park.Flags |= mask; else - gameState.Park.Flags &= ~mask; + gameState.park.Flags &= ~mask; GfxInvalidateScreen(); } @@ -328,12 +328,12 @@ namespace OpenRCT2::Scripting std::vector> ScPark::messages_get() const { std::vector> result; - auto& gameState = GetGameState(); - for (size_t i = 0, newsSize = gameState.NewsItems.GetRecent().size(); i < newsSize; i++) + auto& gameState = getGameState(); + for (size_t i = 0, newsSize = gameState.newsItems.GetRecent().size(); i < newsSize; i++) { result.push_back(std::make_shared(i)); } - for (size_t i = 0, newsSize = gameState.NewsItems.GetArchived().size(); i < newsSize; i++) + for (size_t i = 0, newsSize = gameState.newsItems.GetArchived().size(); i < newsSize; i++) { result.push_back(std::make_shared(i + News::ItemHistoryStart)); } @@ -344,7 +344,7 @@ namespace OpenRCT2::Scripting { int32_t index = 0; int32_t archiveIndex = News::ItemHistoryStart; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); for (const auto& item : value) { auto isArchived = item["isArchived"].as_bool(); @@ -353,7 +353,7 @@ namespace OpenRCT2::Scripting { if (archiveIndex < News::MaxItems) { - gameState.NewsItems[archiveIndex] = newsItem; + gameState.newsItems[archiveIndex] = newsItem; archiveIndex++; } } @@ -361,7 +361,7 @@ namespace OpenRCT2::Scripting { if (index < News::ItemHistoryStart) { - gameState.NewsItems[index] = newsItem; + gameState.newsItems[index] = newsItem; index++; } } @@ -370,11 +370,11 @@ namespace OpenRCT2::Scripting // End the lists by setting next item to null if (index < News::ItemHistoryStart) { - gameState.NewsItems[index].Type = News::ItemType::Null; + gameState.newsItems[index].Type = News::ItemType::Null; } if (archiveIndex < News::MaxItems) { - gameState.NewsItems[archiveIndex].Type = News::ItemType::Null; + gameState.newsItems[archiveIndex].Type = News::ItemType::Null; } } @@ -421,10 +421,10 @@ namespace OpenRCT2::Scripting auto type = ScriptEngine::StringToExpenditureType(expenditureType); if (type != ExpenditureType::Count) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); for (size_t i = 0; i < recordedMonths; ++i) { - result[i] = gameState.ExpenditureTable[i][EnumValue(type)]; + result[i] = gameState.expenditureTable[i][EnumValue(type)]; } } return result; diff --git a/src/openrct2/scripting/bindings/world/ScParkMessage.cpp b/src/openrct2/scripting/bindings/world/ScParkMessage.cpp index 81fc23fb03..65f19a4ee4 100644 --- a/src/openrct2/scripting/bindings/world/ScParkMessage.cpp +++ b/src/openrct2/scripting/bindings/world/ScParkMessage.cpp @@ -43,7 +43,7 @@ namespace OpenRCT2::Scripting News::Item* ScParkMessage::GetMessage() const { - return &GetGameState().NewsItems[_index]; + return &getGameState().newsItems[_index]; } bool ScParkMessage::isArchived_get() const diff --git a/src/openrct2/scripting/bindings/world/ScResearch.cpp b/src/openrct2/scripting/bindings/world/ScResearch.cpp index 6936d31831..08b273f2a2 100644 --- a/src/openrct2/scripting/bindings/world/ScResearch.cpp +++ b/src/openrct2/scripting/bindings/world/ScResearch.cpp @@ -97,13 +97,13 @@ namespace OpenRCT2::Scripting uint8_t ScResearch::funding_get() const { - return GetGameState().ResearchFundingLevel; + return getGameState().researchFundingLevel; } void ScResearch::funding_set(uint8_t value) { ThrowIfGameStateNotMutable(); - GetGameState().ResearchFundingLevel = std::clamp(value, RESEARCH_FUNDING_NONE, RESEARCH_FUNDING_MAXIMUM); + getGameState().researchFundingLevel = std::clamp(value, RESEARCH_FUNDING_NONE, RESEARCH_FUNDING_MAXIMUM); } std::vector ScResearch::priorities_get() const @@ -112,7 +112,7 @@ namespace OpenRCT2::Scripting for (auto i = EnumValue(ResearchCategory::Transport); i <= EnumValue(ResearchCategory::SceneryGroup); i++) { auto category = static_cast(i); - if (GetGameState().ResearchPriorities & EnumToFlag(category)) + if (getGameState().researchPriorities & EnumToFlag(category)) { result.emplace_back(ResearchCategoryMap[category]); } @@ -133,12 +133,12 @@ namespace OpenRCT2::Scripting priorities |= EnumToFlag(*category); } } - GetGameState().ResearchPriorities = priorities; + getGameState().researchPriorities = priorities; } std::string ScResearch::stage_get() const { - return std::string(ResearchStageMap[GetGameState().ResearchProgressStage]); + return std::string(ResearchStageMap[getGameState().researchProgressStage]); } void ScResearch::stage_set(const std::string& value) @@ -147,57 +147,57 @@ namespace OpenRCT2::Scripting auto it = ResearchStageMap.find(value); if (it != ResearchStageMap.end()) { - GetGameState().ResearchProgressStage = it->second; + getGameState().researchProgressStage = it->second; } } uint16_t ScResearch::progress_get() const { - return GetGameState().ResearchProgress; + return getGameState().researchProgress; } void ScResearch::progress_set(uint16_t value) { ThrowIfGameStateNotMutable(); - GetGameState().ResearchProgress = value; + getGameState().researchProgress = value; } DukValue ScResearch::expectedMonth_get() const { - const auto& gameState = GetGameState(); - if (gameState.ResearchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH || gameState.ResearchExpectedDay == 255) + const auto& gameState = getGameState(); + if (gameState.researchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH || gameState.researchExpectedDay == 255) return ToDuk(_context, nullptr); - return ToDuk(_context, gameState.ResearchExpectedMonth); + return ToDuk(_context, gameState.researchExpectedMonth); } DukValue ScResearch::expectedDay_get() const { - const auto& gameState = GetGameState(); - if (gameState.ResearchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH || gameState.ResearchExpectedDay == 255) + const auto& gameState = getGameState(); + if (gameState.researchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH || gameState.researchExpectedDay == 255) return ToDuk(_context, nullptr); - return ToDuk(_context, gameState.ResearchExpectedDay + 1); + return ToDuk(_context, gameState.researchExpectedDay + 1); } DukValue ScResearch::lastResearchedItem_get() const { - const auto& gameState = GetGameState(); - if (!gameState.ResearchLastItem) + const auto& gameState = getGameState(); + if (!gameState.researchLastItem) return ToDuk(_context, nullptr); - return ToDuk(_context, *gameState.ResearchLastItem); + return ToDuk(_context, *gameState.researchLastItem); } DukValue ScResearch::expectedItem_get() const { - const auto& gameState = GetGameState(); - if (gameState.ResearchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH || !gameState.ResearchNextItem) + const auto& gameState = getGameState(); + if (gameState.researchProgressStage == RESEARCH_STAGE_INITIAL_RESEARCH || !gameState.researchNextItem) return ToDuk(_context, nullptr); - return ToDuk(_context, *gameState.ResearchNextItem); + return ToDuk(_context, *gameState.researchNextItem); } std::vector ScResearch::inventedItems_get() const { std::vector result; - for (auto& item : GetGameState().ResearchItemsInvented) + for (auto& item : getGameState().researchItemsInvented) { result.push_back(ToDuk(_context, item)); } @@ -208,14 +208,14 @@ namespace OpenRCT2::Scripting { ThrowIfGameStateNotMutable(); auto list = ConvertResearchList(value); - GetGameState().ResearchItemsInvented = std::move(list); + getGameState().researchItemsInvented = std::move(list); ResearchFix(); } std::vector ScResearch::uninventedItems_get() const { std::vector result; - for (auto& item : GetGameState().ResearchItemsUninvented) + for (auto& item : getGameState().researchItemsUninvented) { result.push_back(ToDuk(_context, item)); } @@ -226,17 +226,17 @@ namespace OpenRCT2::Scripting { ThrowIfGameStateNotMutable(); auto list = ConvertResearchList(value); - GetGameState().ResearchItemsUninvented = std::move(list); + getGameState().researchItemsUninvented = std::move(list); ResearchFix(); } bool ScResearch::isObjectResearched(const std::string& typez, ObjectEntryIndex index) { auto result = false; - auto type = ScObject::StringToObjectType(typez); - if (type) + auto type = objectTypeFromString(typez); + if (type != ObjectType::none) { - result = ResearchIsInvented(*type, index); + result = ResearchIsInvented(type, index); } else { @@ -279,7 +279,7 @@ namespace OpenRCT2::Scripting } else { - auto sceneryGroup = objManager.GetLoadedObject(ObjectType::sceneryGroup, researchItem.entryIndex); + auto sceneryGroup = objManager.GetLoadedObject(researchItem.entryIndex); if (sceneryGroup != nullptr) { researchItem.baseRideType = 0; diff --git a/src/openrct2/scripting/bindings/world/ScScenario.hpp b/src/openrct2/scripting/bindings/world/ScScenario.hpp index 2a772f55db..345faeea75 100644 --- a/src/openrct2/scripting/bindings/world/ScScenario.hpp +++ b/src/openrct2/scripting/bindings/world/ScScenario.hpp @@ -14,7 +14,6 @@ #include "../../../Context.h" #include "../../../GameState.h" #include "../../../core/StringTypes.h" - #include "../../../scenario/Scenario.h" #include "../../../world/Park.h" #include "../../Duktape.hpp" #include "../../ScriptEngine.h" @@ -41,22 +40,22 @@ namespace OpenRCT2::Scripting private: std::string type_get() { - return std::string(ScenarioObjectiveTypeMap[GetGameState().ScenarioObjective.Type]); + return std::string(ScenarioObjectiveTypeMap[getGameState().scenarioObjective.Type]); } void type_set(const std::string& value) { ThrowIfGameStateNotMutable(); - GetGameState().ScenarioObjective.Type = ScenarioObjectiveTypeMap[value]; + getGameState().scenarioObjective.Type = ScenarioObjectiveTypeMap[value]; } uint16_t guests_get() { - auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_GUESTS_BY - || gameState.ScenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) + auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_GUESTS_BY + || gameState.scenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) { - return gameState.ScenarioObjective.NumGuests; + return gameState.scenarioObjective.NumGuests; } return 0; } @@ -64,42 +63,42 @@ namespace OpenRCT2::Scripting void guests_set(uint16_t value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_GUESTS_BY - || gameState.ScenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) + auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_GUESTS_BY + || gameState.scenarioObjective.Type == OBJECTIVE_GUESTS_AND_RATING) { - gameState.ScenarioObjective.NumGuests = value; + gameState.scenarioObjective.NumGuests = value; } } uint8_t year_get() { - const auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_GUESTS_BY - || gameState.ScenarioObjective.Type == OBJECTIVE_PARK_VALUE_BY) + const auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_GUESTS_BY + || gameState.scenarioObjective.Type == OBJECTIVE_PARK_VALUE_BY) { - return gameState.ScenarioObjective.Year; + return gameState.scenarioObjective.Year; } return 0; } void year_set(uint8_t value) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); ThrowIfGameStateNotMutable(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_GUESTS_BY - || gameState.ScenarioObjective.Type == OBJECTIVE_PARK_VALUE_BY) + if (gameState.scenarioObjective.Type == OBJECTIVE_GUESTS_BY + || gameState.scenarioObjective.Type == OBJECTIVE_PARK_VALUE_BY) { - gameState.ScenarioObjective.Year = value; + gameState.scenarioObjective.Year = value; } } uint16_t length_get() { - const auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_10_ROLLERCOASTERS_LENGTH) + const auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_10_ROLLERCOASTERS_LENGTH) { - return gameState.ScenarioObjective.NumGuests; + return gameState.scenarioObjective.NumGuests; } return 0; } @@ -107,19 +106,19 @@ namespace OpenRCT2::Scripting void length_set(uint16_t value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_10_ROLLERCOASTERS_LENGTH) + auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_10_ROLLERCOASTERS_LENGTH) { - gameState.ScenarioObjective.NumGuests = value; + gameState.scenarioObjective.NumGuests = value; } } money64 excitement_get() { - const auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_FINISH_5_ROLLERCOASTERS) + const auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_FINISH_5_ROLLERCOASTERS) { - return gameState.ScenarioObjective.Currency; + return gameState.scenarioObjective.Currency; } return 0; } @@ -127,20 +126,20 @@ namespace OpenRCT2::Scripting void excitement_set(money64 value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_FINISH_5_ROLLERCOASTERS) + auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_FINISH_5_ROLLERCOASTERS) { - gameState.ScenarioObjective.Currency = value; + gameState.scenarioObjective.Currency = value; } } money64 parkValue_get() { - const auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_PARK_VALUE_BY - || gameState.ScenarioObjective.Type == OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE) + const auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_PARK_VALUE_BY + || gameState.scenarioObjective.Type == OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE) { - return gameState.ScenarioObjective.Currency; + return gameState.scenarioObjective.Currency; } return 0; } @@ -148,21 +147,21 @@ namespace OpenRCT2::Scripting void parkValue_set(money64 value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_PARK_VALUE_BY - || gameState.ScenarioObjective.Type == OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE) + auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_PARK_VALUE_BY + || gameState.scenarioObjective.Type == OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE) { - gameState.ScenarioObjective.Currency = value; + gameState.scenarioObjective.Currency = value; } } money64 monthlyIncome_get() { - const auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_MONTHLY_RIDE_INCOME - || gameState.ScenarioObjective.Type == OBJECTIVE_MONTHLY_FOOD_INCOME) + const auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_MONTHLY_RIDE_INCOME + || gameState.scenarioObjective.Type == OBJECTIVE_MONTHLY_FOOD_INCOME) { - return gameState.ScenarioObjective.Currency; + return gameState.scenarioObjective.Currency; } return 0; } @@ -170,11 +169,11 @@ namespace OpenRCT2::Scripting void monthlyIncome_set(money64 value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); - if (gameState.ScenarioObjective.Type == OBJECTIVE_PARK_VALUE_BY - || gameState.ScenarioObjective.Type == OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE) + auto& gameState = getGameState(); + if (gameState.scenarioObjective.Type == OBJECTIVE_PARK_VALUE_BY + || gameState.scenarioObjective.Type == OBJECTIVE_REPAY_LOAN_AND_PARK_VALUE) { - gameState.ScenarioObjective.Currency = value; + gameState.scenarioObjective.Currency = value; } } @@ -198,46 +197,46 @@ namespace OpenRCT2::Scripting public: std::string name_get() { - return GetGameState().ScenarioName; + return getGameState().scenarioName; } void name_set(const std::string& value) { ThrowIfGameStateNotMutable(); - GetGameState().ScenarioName = value; + getGameState().scenarioName = value; } std::string details_get() { - return GetGameState().ScenarioDetails; + return getGameState().scenarioDetails; } void details_set(const std::string& value) { ThrowIfGameStateNotMutable(); - GetGameState().ScenarioDetails = value; + getGameState().scenarioDetails = value; } std::string completedBy_get() { - return GetGameState().ScenarioCompletedBy; + return getGameState().scenarioCompletedBy; } void completedBy_set(const std::string& value) { ThrowIfGameStateNotMutable(); - GetGameState().ScenarioCompletedBy = value; + getGameState().scenarioCompletedBy = value; } std::string filename_get() { - return GetGameState().ScenarioFileName; + return getGameState().scenarioFileName; } void filename_set(const std::string& value) { ThrowIfGameStateNotMutable(); - GetGameState().ScenarioFileName = value; + getGameState().scenarioFileName = value; } std::shared_ptr objective_get() const @@ -247,61 +246,61 @@ namespace OpenRCT2::Scripting uint16_t parkRatingWarningDays_get() const { - return GetGameState().ScenarioParkRatingWarningDays; + return getGameState().scenarioParkRatingWarningDays; } void parkRatingWarningDays_set(uint16_t value) { ThrowIfGameStateNotMutable(); - GetGameState().ScenarioParkRatingWarningDays = value; + getGameState().scenarioParkRatingWarningDays = value; } DukValue completedCompanyValue_get() const { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); auto ctx = GetContext()->GetScriptEngine().GetContext(); - if (gameState.ScenarioCompletedCompanyValue == kMoney64Undefined - || gameState.ScenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) + if (gameState.scenarioCompletedCompanyValue == kMoney64Undefined + || gameState.scenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) { return ToDuk(ctx, nullptr); } - return ToDuk(ctx, gameState.ScenarioCompletedCompanyValue); + return ToDuk(ctx, gameState.scenarioCompletedCompanyValue); } void completedCompanyValue_set(int32_t value) { ThrowIfGameStateNotMutable(); - GetGameState().ScenarioCompletedCompanyValue = value; + getGameState().scenarioCompletedCompanyValue = value; } std::string status_get() const { - const auto& gameState = GetGameState(); - if (gameState.ScenarioCompletedCompanyValue == kMoney64Undefined) + const auto& gameState = getGameState(); + if (gameState.scenarioCompletedCompanyValue == kMoney64Undefined) return "inProgress"; - if (gameState.ScenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) + if (gameState.scenarioCompletedCompanyValue == kCompanyValueOnFailedObjective) return "failed"; return "completed"; } void status_set(const std::string& value) { ThrowIfGameStateNotMutable(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); if (value == "inProgress") - gameState.ScenarioCompletedCompanyValue = kMoney64Undefined; + gameState.scenarioCompletedCompanyValue = kMoney64Undefined; else if (value == "failed") - gameState.ScenarioCompletedCompanyValue = kCompanyValueOnFailedObjective; + gameState.scenarioCompletedCompanyValue = kCompanyValueOnFailedObjective; else if (value == "completed") - gameState.ScenarioCompletedCompanyValue = gameState.CompanyValue; + gameState.scenarioCompletedCompanyValue = gameState.companyValue; } money64 companyValueRecord_get() const { - return GetGameState().ScenarioCompanyValueRecord; + return getGameState().scenarioCompanyValueRecord; } void companyValueRecord_set(money64 value) { ThrowIfGameStateNotMutable(); - GetGameState().ScenarioCompanyValueRecord = value; + getGameState().scenarioCompanyValueRecord = value; } public: diff --git a/src/openrct2/scripting/bindings/world/ScTileElement.cpp b/src/openrct2/scripting/bindings/world/ScTileElement.cpp index ebb7251d2c..4cc07164a4 100644 --- a/src/openrct2/scripting/bindings/world/ScTileElement.cpp +++ b/src/openrct2/scripting/bindings/world/ScTileElement.cpp @@ -507,7 +507,7 @@ namespace OpenRCT2::Scripting if (ride != nullptr) { - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) throw DukException() << "Cannot read 'sequence' property, TrackElement belongs to a maze."; } @@ -560,7 +560,7 @@ namespace OpenRCT2::Scripting if (ride != nullptr) { - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) throw DukException() << "Cannot set 'sequence' property, TrackElement belongs to a maze."; } @@ -833,7 +833,7 @@ namespace OpenRCT2::Scripting if (ride == nullptr) throw DukException() << "Cannot read 'mazeEntry' property, ride is invalid."; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType != RtdSpecialType::maze) throw DukException() << "Cannot read 'mazeEntry' property, ride is not a maze."; @@ -863,7 +863,7 @@ namespace OpenRCT2::Scripting if (ride == nullptr) throw DukException() << "Cannot set 'mazeEntry' property, ride is invalid."; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType != RtdSpecialType::maze) throw DukException() << "Cannot set 'mazeEntry' property, ride is not a maze."; @@ -891,7 +891,7 @@ namespace OpenRCT2::Scripting if (ride == nullptr) throw DukException() << "Cannot read 'colourScheme' property, ride is invalid."; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) throw DukException() << "Cannot read 'colourScheme' property, TrackElement belongs to a maze."; @@ -921,7 +921,7 @@ namespace OpenRCT2::Scripting if (ride == nullptr) throw DukException() << "Cannot set 'colourScheme', ride is invalid."; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) throw DukException() << "Cannot set 'colourScheme' property, TrackElement belongs to a maze."; @@ -949,7 +949,7 @@ namespace OpenRCT2::Scripting if (ride == nullptr) throw DukException() << "Cannot read 'seatRotation' property, ride is invalid."; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType == RtdSpecialType::maze) throw DukException() << "Cannot read 'seatRotation' property, TrackElement belongs to a maze."; @@ -979,7 +979,7 @@ namespace OpenRCT2::Scripting if (ride == nullptr) throw DukException() << "Cannot set 'seatRotation' property, ride is invalid."; - const auto& rtd = ride->GetRideTypeDescriptor(); + const auto& rtd = ride->getRideTypeDescriptor(); if (rtd.specialType != RtdSpecialType::maze) throw DukException() << "Cannot set 'seatRotation' property, TrackElement belongs to a maze."; diff --git a/src/openrct2/ui/DummyUiContext.cpp b/src/openrct2/ui/DummyUiContext.cpp index 46fd96144b..cf7d49b9a6 100644 --- a/src/openrct2/ui/DummyUiContext.cpp +++ b/src/openrct2/ui/DummyUiContext.cpp @@ -59,7 +59,7 @@ namespace OpenRCT2::Ui { return ScaleQuality::NearestNeighbour; } - void SetFullscreenMode(FULLSCREEN_MODE /*mode*/) override + void SetFullscreenMode(FullscreenMode /*mode*/) override { } const std::vector& GetFullscreenResolutions() override diff --git a/src/openrct2/ui/UiContext.h b/src/openrct2/ui/UiContext.h index 3bf9885588..5a9fa05184 100644 --- a/src/openrct2/ui/UiContext.h +++ b/src/openrct2/ui/UiContext.h @@ -36,11 +36,11 @@ namespace OpenRCT2 { struct IWindowManager; - enum class FULLSCREEN_MODE + enum class FullscreenMode { - WINDOWED, - FULLSCREEN, - FULLSCREEN_DESKTOP, + windowed, + fullscreen, + fullscreenDesktop, }; inline bool operator<(const Resolution& lhs, const Resolution& rhs) @@ -110,7 +110,7 @@ namespace OpenRCT2 virtual int32_t GetWidth() = 0; virtual int32_t GetHeight() = 0; virtual ScaleQuality GetScaleQuality() = 0; - virtual void SetFullscreenMode(FULLSCREEN_MODE mode) = 0; + virtual void SetFullscreenMode(FullscreenMode mode) = 0; virtual const std::vector& GetFullscreenResolutions() = 0; virtual bool HasFocus() = 0; virtual bool IsMinimised() = 0; diff --git a/src/openrct2/windows/Intent.h b/src/openrct2/windows/Intent.h index 3439d33442..575540cd41 100644 --- a/src/openrct2/windows/Intent.h +++ b/src/openrct2/windows/Intent.h @@ -89,12 +89,24 @@ namespace OpenRCT2 uint32_t GetUIntExtra(uint32_t key) const; int32_t GetSIntExtra(uint32_t key) const; CloseCallback GetCloseCallbackExtra(uint32_t key) const; + template + TEnumType GetEnumExtra(uint32_t key) + { + static_assert(std::is_enum_v); + return static_cast(GetUIntExtra(key)); + } Intent* PutExtra(uint32_t key, uint32_t value); Intent* PutExtra(uint32_t key, void* value); Intent* PutExtra(uint32_t key, int32_t value); Intent* PutExtra(uint32_t key, std::string value); Intent* PutExtra(uint32_t key, CloseCallback value); + template + Intent* PutEnumExtra(uint32_t key, TEnumType value) + { + static_assert(std::is_enum_v); + return PutExtra(key, EnumValue(value)); + } template Intent* PutExtra(uint32_t key, const TIdentifier& value) @@ -110,6 +122,7 @@ namespace OpenRCT2 INTENT_EXTRA_RIDE_ID, INTENT_EXTRA_PATH, INTENT_EXTRA_PEEP, + INTENT_EXTRA_LOADSAVE_ACTION, INTENT_EXTRA_LOADSAVE_TYPE, INTENT_EXTRA_CALLBACK, INTENT_EXTRA_TRACK_DESIGN, diff --git a/src/openrct2/world/Banner.cpp b/src/openrct2/world/Banner.cpp index 0667a7ad7f..2552475b9c 100644 --- a/src/openrct2/world/Banner.cpp +++ b/src/openrct2/world/Banner.cpp @@ -27,7 +27,6 @@ #include "../ride/RideManager.hpp" #include "../ride/Track.h" #include "../windows/Intent.h" -#include "Map.h" #include "MapAnimation.h" #include "Park.h" #include "Scenery.h" @@ -74,7 +73,7 @@ void Banner::FormatTextTo(Formatter& ft) const auto ride = GetRide(ride_index); if (ride != nullptr) { - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } else { @@ -108,7 +107,7 @@ static RideId BannerGetRideIndexAt(const CoordsXYZ& bannerCoords) RideId rideIndex = tileElement->AsTrack()->GetRideIndex(); auto ride = GetRide(rideIndex); - if (ride == nullptr || ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (ride == nullptr || ride->getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) continue; if ((tileElement->GetClearanceZ()) + (4 * kCoordsZStep) <= bannerCoords.z) @@ -122,19 +121,19 @@ static RideId BannerGetRideIndexAt(const CoordsXYZ& bannerCoords) static BannerIndex BannerGetNewIndex() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); for (BannerIndex::UnderlyingType bannerIndex = 0; bannerIndex < MAX_BANNERS; bannerIndex++) { - if (bannerIndex < gameState.Banners.size()) + if (bannerIndex < gameState.banners.size()) { - if (gameState.Banners[bannerIndex].IsNull()) + if (gameState.banners[bannerIndex].IsNull()) { return BannerIndex::FromUnderlying(bannerIndex); } } else { - gameState.Banners.emplace_back(); + gameState.banners.emplace_back(); return BannerIndex::FromUnderlying(bannerIndex); } } @@ -147,7 +146,7 @@ static BannerIndex BannerGetNewIndex() */ void BannerInit(GameState_t& gameState) { - gameState.Banners.clear(); + gameState.banners.clear(); } TileElement* BannerGetTileElement(BannerIndex bannerIndex) @@ -229,10 +228,10 @@ RideId BannerGetClosestRideIndex(const CoordsXYZ& mapPos) auto resultDistance = std::numeric_limits::max(); for (auto& ride : GetRideManager()) { - if (ride.GetRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) + if (ride.getRideTypeDescriptor().HasFlag(RtdFlag::isShopOrFacility)) continue; - auto rideCoords = ride.overall_view; + auto rideCoords = ride.overallView; if (rideCoords.IsNull()) continue; @@ -255,11 +254,11 @@ struct BannerElementWithPos // Returns a list of BannerElement's with the tile position. static std::vector GetAllBannerElementsOnMap() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); std::vector banners; - for (int y = 0; y < gameState.MapSize.y; y++) + for (int y = 0; y < gameState.mapSize.y; y++) { - for (int x = 0; x < gameState.MapSize.x; x++) + for (int x = 0; x < gameState.mapSize.x; x++) { const auto tilePos = TileCoordsXY{ x, y }; for (auto* bannerElement : OpenRCT2::TileElementsView(tilePos.ToCoordsXY())) @@ -279,8 +278,8 @@ static std::vector GetAllBannerElementsOnMap() // has a tile with the banner index, if no tile is found then the banner element will be released. static void BannerDeallocateUnlinked() { - auto& gameState = GetGameState(); - for (BannerIndex::UnderlyingType index = 0; index < gameState.Banners.size(); index++) + auto& gameState = getGameState(); + for (BannerIndex::UnderlyingType index = 0; index < gameState.banners.size(); index++) { const auto bannerId = BannerIndex::FromUnderlying(index); auto* tileElement = BannerGetTileElement(bannerId); @@ -374,8 +373,8 @@ void BannerApplyFixes() void UnlinkAllRideBanners() { - auto& gameState = GetGameState(); - for (auto& banner : gameState.Banners) + auto& gameState = getGameState(); + for (auto& banner : gameState.banners) { if (!banner.IsNull()) { @@ -387,8 +386,8 @@ void UnlinkAllRideBanners() void UnlinkAllBannersForRide(RideId rideId) { - auto& gameState = GetGameState(); - for (auto& banner : gameState.Banners) + auto& gameState = getGameState(); + for (auto& banner : gameState.banners) { if (!banner.IsNull() && (banner.flags & BANNER_FLAG_LINKED_TO_RIDE) && banner.ride_index == rideId) { @@ -401,11 +400,11 @@ void UnlinkAllBannersForRide(RideId rideId) Banner* GetBanner(BannerIndex id) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); const auto index = id.ToUnderlying(); - if (index < gameState.Banners.size()) + if (index < gameState.banners.size()) { - auto banner = &gameState.Banners[index]; + auto banner = &gameState.banners[index]; if (banner != nullptr && !banner->IsNull()) { return banner; @@ -416,16 +415,16 @@ Banner* GetBanner(BannerIndex id) Banner* GetOrCreateBanner(BannerIndex id) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); const auto index = id.ToUnderlying(); if (index < MAX_BANNERS) { - if (index >= gameState.Banners.size()) + if (index >= gameState.banners.size()) { - gameState.Banners.resize(index + 1); + gameState.banners.resize(index + 1); } // Create the banner - auto& banner = gameState.Banners[index]; + auto& banner = gameState.banners[index]; banner.id = id; return &banner; } @@ -459,24 +458,24 @@ void DeleteBanner(BannerIndex id) void TrimBanners() { - auto& gameState = GetGameState(); - if (gameState.Banners.size() > 0) + auto& gameState = getGameState(); + if (gameState.banners.size() > 0) { - auto lastBannerId = gameState.Banners.size() - 1; - while (lastBannerId != std::numeric_limits::max() && gameState.Banners[lastBannerId].IsNull()) + auto lastBannerId = gameState.banners.size() - 1; + while (lastBannerId != std::numeric_limits::max() && gameState.banners[lastBannerId].IsNull()) { lastBannerId--; } - gameState.Banners.resize(lastBannerId + 1); - gameState.Banners.shrink_to_fit(); + gameState.banners.resize(lastBannerId + 1); + gameState.banners.shrink_to_fit(); } } size_t GetNumBanners() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); size_t count = 0; - for (const auto& banner : gameState.Banners) + for (const auto& banner : gameState.banners) { if (!banner.IsNull()) { diff --git a/src/openrct2/world/Climate.cpp b/src/openrct2/world/Climate.cpp index 3516e6d3cb..b4acceeede 100644 --- a/src/openrct2/world/Climate.cpp +++ b/src/openrct2/world/Climate.cpp @@ -9,7 +9,6 @@ #include "Climate.h" -#include "../Cheats.h" #include "../Context.h" #include "../Game.h" #include "../GameState.h" @@ -20,33 +19,18 @@ #include "../audio/AudioMixer.h" #include "../config/Config.h" #include "../core/EnumUtils.hpp" -#include "../drawing/Drawing.h" +#include "../object/ClimateObject.h" +#include "../object/ObjectManager.h" #include "../profiling/Profiling.h" -#include "../scenario/Scenario.h" #include "../util/Util.h" #include "../windows/Intent.h" -#include +#include #include using namespace OpenRCT2; using namespace OpenRCT2::Audio; -constexpr int32_t kMaxThunderInstances = 2; - -enum class ThunderStatus -{ - none, - playing, -}; - -struct WeatherPattern -{ - int8_t baseTemperature; - int8_t randomBias; - WeatherType distribution[24]; -}; - struct WeatherTrait { int8_t temperatureDelta; @@ -56,10 +40,27 @@ struct WeatherTrait uint32_t spriteId; }; -// TODO: no need for these to be declared extern, just move the definitions up -extern const WeatherPattern* kClimatePatterns[4]; -extern const WeatherTrait kClimateWeatherTraits[EnumValue(WeatherType::Count)]; -extern const FilterPaletteID kClimateWeatherGloomColours[4]; +// clang-format off +constexpr std::array kClimateWeatherTraits = { { + { 10, WeatherEffectType::None, 0, WeatherLevel::None, SPR_WEATHER_SUN }, // Sunny + { 5, WeatherEffectType::None, 0, WeatherLevel::None, SPR_WEATHER_SUN_CLOUD }, // Partially Cloudy + { 0, WeatherEffectType::None, 0, WeatherLevel::None, SPR_WEATHER_CLOUD }, // Cloudy + { -2, WeatherEffectType::Rain, 1, WeatherLevel::Light, SPR_WEATHER_LIGHT_RAIN }, // Rain + { -4, WeatherEffectType::Rain, 2, WeatherLevel::Heavy, SPR_WEATHER_HEAVY_RAIN }, // Heavy Rain + { 2, WeatherEffectType::Storm, 2, WeatherLevel::Heavy, SPR_WEATHER_STORM }, // Thunderstorm + { -10, WeatherEffectType::Snow, 1, WeatherLevel::Light, SPR_G2_WEATHER_SNOW }, // Snow + { -15, WeatherEffectType::Snow, 2, WeatherLevel::Heavy, SPR_G2_WEATHER_HEAVY_SNOW}, // Heavy Snow + { -20, WeatherEffectType::Blizzard, 2, WeatherLevel::Heavy, SPR_G2_WEATHER_BLIZZARD }, // Blizzard +} }; +// clang-format on + +constexpr int32_t kMaxThunderInstances = 2; + +enum class ThunderStatus +{ + none, + playing, +}; // Climate data uint16_t gClimateLightningFlash; @@ -78,6 +79,13 @@ static int32_t _thunderVolume; static int32_t _thunderStereoEcho = 0; static std::shared_ptr _weatherSoundChannel; +constexpr FilterPaletteID kClimateWeatherGloomColours[4] = { + FilterPaletteID::PaletteNull, + FilterPaletteID::PaletteDarken1, + FilterPaletteID::PaletteDarken2, + FilterPaletteID::PaletteDarken3, +}; + static int8_t ClimateStepWeatherLevel(int8_t currentWeatherLevel, int8_t nextWeatherLevel); static void ClimateDetermineFutureWeather(uint32_t randomValue); static void ClimateUpdateWeatherSound(); @@ -94,21 +102,25 @@ int32_t ClimateCelsiusToFahrenheit(int32_t celsius) /** * Set climate and determine start weather. */ -void ClimateReset(ClimateType climate) +void ClimateReset() { - auto weather = WeatherType::PartiallyCloudy; - int32_t month = GetDate().GetMonth(); + auto& objManager = GetContext()->GetObjectManager(); + auto* climateObj = objManager.GetLoadedObject(0); + if (climateObj == nullptr) + return; - const WeatherPattern& pattern = kClimatePatterns[EnumValue(climate)][month]; + int32_t month = GetDate().GetMonth(); + const WeatherPattern& pattern = climateObj->getPatternForMonth(month); + + auto weather = WeatherType::PartiallyCloudy; const WeatherTrait& trait = kClimateWeatherTraits[EnumValue(weather)]; - auto& gameState = GetGameState(); - gameState.Climate = climate; - gameState.WeatherCurrent.weatherType = weather; - gameState.WeatherCurrent.temperature = pattern.baseTemperature + trait.temperatureDelta; - gameState.WeatherCurrent.weatherEffect = trait.effectLevel; - gameState.WeatherCurrent.weatherGloom = trait.gloomLevel; - gameState.WeatherCurrent.level = trait.level; + auto& gameState = getGameState(); + gameState.weatherCurrent.weatherType = weather; + gameState.weatherCurrent.temperature = pattern.baseTemperature + trait.temperatureDelta; + gameState.weatherCurrent.weatherEffect = trait.effectLevel; + gameState.weatherCurrent.weatherGloom = trait.gloomLevel; + gameState.weatherCurrent.level = trait.level; _lightningTimer = 0; _thunderTimer = 0; @@ -129,58 +141,58 @@ void ClimateUpdate() { PROFILED_FUNCTION(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Only do climate logic if playing (not in scenario editor or title screen) - if (gScreenFlags & (~SCREEN_FLAGS_PLAYING)) + if (gLegacyScene != LegacyScene::playing) return; - if (!GetGameState().Cheats.freezeWeather) + if (!getGameState().cheats.freezeWeather) { - if (gameState.WeatherUpdateTimer) + if (gameState.weatherUpdateTimer) { - if (gameState.WeatherUpdateTimer == 960) + if (gameState.weatherUpdateTimer == 960) { auto intent = Intent(INTENT_ACTION_UPDATE_CLIMATE); ContextBroadcastIntent(&intent); } - gameState.WeatherUpdateTimer--; + gameState.weatherUpdateTimer--; } - else if (!(gameState.CurrentTicks & 0x7F)) + else if (!(gameState.currentTicks & 0x7F)) { - if (gameState.WeatherCurrent.temperature == gameState.WeatherNext.temperature) + if (gameState.weatherCurrent.temperature == gameState.weatherNext.temperature) { - if (gameState.WeatherCurrent.weatherGloom == gameState.WeatherNext.weatherGloom) + if (gameState.weatherCurrent.weatherGloom == gameState.weatherNext.weatherGloom) { - gameState.WeatherCurrent.weatherEffect = gameState.WeatherNext.weatherEffect; + gameState.weatherCurrent.weatherEffect = gameState.weatherNext.weatherEffect; _thunderTimer = 0; _lightningTimer = 0; - if (gameState.WeatherCurrent.level == gameState.WeatherNext.level) + if (gameState.weatherCurrent.level == gameState.weatherNext.level) { - gameState.WeatherCurrent.weatherType = gameState.WeatherNext.weatherType; + gameState.weatherCurrent.weatherType = gameState.weatherNext.weatherType; ClimateDetermineFutureWeather(ScenarioRand()); auto intent = Intent(INTENT_ACTION_UPDATE_CLIMATE); ContextBroadcastIntent(&intent); } - else if (gameState.WeatherNext.level <= WeatherLevel::Heavy) + else if (gameState.weatherNext.level <= WeatherLevel::Heavy) { - gameState.WeatherCurrent.level = static_cast(ClimateStepWeatherLevel( - static_cast(gameState.WeatherCurrent.level), - static_cast(gameState.WeatherNext.level))); + gameState.weatherCurrent.level = static_cast(ClimateStepWeatherLevel( + static_cast(gameState.weatherCurrent.level), + static_cast(gameState.weatherNext.level))); } } else { - gameState.WeatherCurrent.weatherGloom = ClimateStepWeatherLevel( - gameState.WeatherCurrent.weatherGloom, gameState.WeatherNext.weatherGloom); + gameState.weatherCurrent.weatherGloom = ClimateStepWeatherLevel( + gameState.weatherCurrent.weatherGloom, gameState.weatherNext.weatherGloom); GfxInvalidateScreen(); } } else { - gameState.WeatherCurrent.temperature = ClimateStepWeatherLevel( - gameState.WeatherCurrent.temperature, gameState.WeatherNext.temperature); + gameState.weatherCurrent.temperature = ClimateStepWeatherLevel( + gameState.weatherCurrent.temperature, gameState.weatherNext.temperature); auto intent = Intent(INTENT_ACTION_UPDATE_CLIMATE); ContextBroadcastIntent(&intent); } @@ -193,8 +205,8 @@ void ClimateUpdate() ClimateUpdateThunder(); } else if ( - gameState.WeatherCurrent.weatherEffect == WeatherEffectType::Storm - || gameState.WeatherCurrent.weatherEffect == WeatherEffectType::Blizzard) + gameState.weatherCurrent.weatherEffect == WeatherEffectType::Storm + || gameState.weatherCurrent.weatherEffect == WeatherEffectType::Blizzard) { // Create new thunder and lightning uint32_t randomNumber = UtilRand(); @@ -209,18 +221,23 @@ void ClimateUpdate() void ClimateForceWeather(WeatherType weather) { - auto& gameState = GetGameState(); + auto& objManager = GetContext()->GetObjectManager(); + auto* climateObj = objManager.GetLoadedObject(0); + if (climateObj == nullptr) + return; + int32_t month = GetDate().GetMonth(); + const WeatherPattern& pattern = climateObj->getPatternForMonth(month); - const auto& pattern = kClimatePatterns[EnumValue(gameState.Climate)][month]; const auto& trait = kClimateWeatherTraits[EnumValue(weather)]; - gameState.WeatherCurrent.weatherType = weather; - gameState.WeatherCurrent.weatherGloom = trait.gloomLevel; - gameState.WeatherCurrent.level = trait.level; - gameState.WeatherCurrent.weatherEffect = trait.effectLevel; - gameState.WeatherCurrent.temperature = pattern.baseTemperature + trait.temperatureDelta; - gameState.WeatherUpdateTimer = 1920; + auto& gameState = getGameState(); + gameState.weatherCurrent.weatherType = weather; + gameState.weatherCurrent.weatherGloom = trait.gloomLevel; + gameState.weatherCurrent.level = trait.level; + gameState.weatherCurrent.weatherEffect = trait.effectLevel; + gameState.weatherCurrent.temperature = pattern.baseTemperature + trait.temperatureDelta; + gameState.weatherUpdateTimer = 1920; ClimateDetermineFutureWeather(ScenarioRand()); @@ -235,7 +252,7 @@ void ClimateUpdateSound() if (!OpenRCT2::Audio::IsAvailable()) return; - if (gScreenFlags & SCREEN_FLAGS_TITLE_DEMO) + if (gLegacyScene == LegacyScene::titleSequence) return; ClimateUpdateWeatherSound(); @@ -244,19 +261,25 @@ void ClimateUpdateSound() bool ClimateIsRaining() { - auto& weather = GetGameState().WeatherCurrent.weatherType; + auto& weather = getGameState().weatherCurrent.weatherType; return weather == WeatherType::Rain || weather == WeatherType::HeavyRain || weather == WeatherType::Thunder; } bool ClimateIsSnowing() { - auto& weather = GetGameState().WeatherCurrent.weatherType; + auto& weather = getGameState().weatherCurrent.weatherType; + return weather == WeatherType::Snow || weather == WeatherType::HeavySnow || weather == WeatherType::Blizzard; +} + +bool ClimateTransitioningToSnow() +{ + auto& weather = getGameState().weatherNext.weatherType; return weather == WeatherType::Snow || weather == WeatherType::HeavySnow || weather == WeatherType::Blizzard; } bool ClimateIsSnowingHeavily() { - auto& weather = GetGameState().WeatherCurrent.weatherType; + auto& weather = getGameState().weatherCurrent.weatherType; return weather == WeatherType::HeavySnow || weather == WeatherType::Blizzard; } @@ -276,14 +299,9 @@ FilterPaletteID ClimateGetWeatherGloomPaletteId(const WeatherState& state) return paletteId; } -uint32_t ClimateGetWeatherSpriteId(const WeatherState& state) +uint32_t ClimateGetWeatherSpriteId(const WeatherType weatherType) { - uint32_t spriteId = SPR_WEATHER_SUN; - if (EnumValue(state.weatherType) < std::size(kClimateWeatherTraits)) - { - spriteId = kClimateWeatherTraits[EnumValue(state.weatherType)].spriteId; - } - return spriteId; + return kClimateWeatherTraits[EnumValue(weatherType)].spriteId; } static int8_t ClimateStepWeatherLevel(int8_t currentWeatherLevel, int8_t nextWeatherLevel) @@ -304,29 +322,35 @@ static int8_t ClimateStepWeatherLevel(int8_t currentWeatherLevel, int8_t nextWea */ static void ClimateDetermineFutureWeather(uint32_t randomValue) { + auto& objManager = GetContext()->GetObjectManager(); + auto* climateObj = objManager.GetLoadedObject(0); + if (climateObj == nullptr) + return; + int32_t month = GetDate().GetMonth(); - auto& gameState = GetGameState(); + const WeatherPattern& pattern = climateObj->getPatternForMonth(month); // Generate a random index with values 0 up to randomBias-1 // and choose weather from the distribution table accordingly - const auto& pattern = kClimatePatterns[EnumValue(gameState.Climate)][month]; const auto randomIndex = ((randomValue % 256) * pattern.randomBias) / 256; const auto nextWeather = pattern.distribution[randomIndex]; - gameState.WeatherNext.weatherType = nextWeather; + + auto& gameState = getGameState(); + gameState.weatherNext.weatherType = nextWeather; const auto& nextWeatherTrait = kClimateWeatherTraits[EnumValue(nextWeather)]; - gameState.WeatherNext.temperature = pattern.baseTemperature + nextWeatherTrait.temperatureDelta; - gameState.WeatherNext.weatherEffect = nextWeatherTrait.effectLevel; - gameState.WeatherNext.weatherGloom = nextWeatherTrait.gloomLevel; - gameState.WeatherNext.level = nextWeatherTrait.level; + gameState.weatherNext.temperature = pattern.baseTemperature + nextWeatherTrait.temperatureDelta; + gameState.weatherNext.weatherEffect = nextWeatherTrait.effectLevel; + gameState.weatherNext.weatherGloom = nextWeatherTrait.gloomLevel; + gameState.weatherNext.level = nextWeatherTrait.level; - gameState.WeatherUpdateTimer = 1920; + gameState.weatherUpdateTimer = 1920; } static void ClimateUpdateWeatherSound() { - if (GetGameState().WeatherCurrent.weatherEffect == WeatherEffectType::Rain - || GetGameState().WeatherCurrent.weatherEffect == WeatherEffectType::Storm) + if (getGameState().weatherCurrent.weatherEffect == WeatherEffectType::Rain + || getGameState().weatherCurrent.weatherEffect == WeatherEffectType::Storm) { // Start playing the weather sound if (_weatherSoundChannel == nullptr || _weatherSoundChannel->IsDone()) @@ -459,83 +483,3 @@ static void ClimatePlayThunder(int32_t instanceIndex, OpenRCT2::Audio::SoundId s _thunderStatus[instanceIndex] = ThunderStatus::playing; } } - -#pragma region Climate / Weather data tables - -const FilterPaletteID kClimateWeatherGloomColours[4] = { - FilterPaletteID::PaletteNull, - FilterPaletteID::PaletteDarken1, - FilterPaletteID::PaletteDarken2, - FilterPaletteID::PaletteDarken3, -}; - -// clang-format off -const WeatherTrait kClimateWeatherTraits[EnumValue(WeatherType::Count)] = { - { 10, WeatherEffectType::None, 0, WeatherLevel::None, SPR_WEATHER_SUN }, // Sunny - { 5, WeatherEffectType::None, 0, WeatherLevel::None, SPR_WEATHER_SUN_CLOUD }, // Partially Cloudy - { 0, WeatherEffectType::None, 0, WeatherLevel::None, SPR_WEATHER_CLOUD }, // Cloudy - { -2, WeatherEffectType::Rain, 1, WeatherLevel::Light, SPR_WEATHER_LIGHT_RAIN }, // Rain - { -4, WeatherEffectType::Rain, 2, WeatherLevel::Heavy, SPR_WEATHER_HEAVY_RAIN }, // Heavy Rain - { 2, WeatherEffectType::Storm, 2, WeatherLevel::Heavy, SPR_WEATHER_STORM }, // Thunderstorm - { -10, WeatherEffectType::Snow, 1, WeatherLevel::Light, SPR_G2_WEATHER_SNOW }, // Snow - { -15, WeatherEffectType::Snow, 2, WeatherLevel::Heavy, SPR_G2_WEATHER_HEAVY_SNOW}, // Heavy Snow - { -20, WeatherEffectType::Blizzard, 2, WeatherLevel::Heavy, SPR_G2_WEATHER_BLIZZARD }, // Blizzard -}; -// clang-format on - -constexpr auto S = WeatherType::Sunny; -constexpr auto P = WeatherType::PartiallyCloudy; -constexpr auto C = WeatherType::Cloudy; -constexpr auto R = WeatherType::Rain; -constexpr auto H = WeatherType::HeavyRain; -constexpr auto T = WeatherType::Thunder; - -static constexpr WeatherPattern kClimatePatternsCoolAndWet[] = { - { 8, 18, { S, P, P, P, P, P, C, C, C, C, C, C, C, R, R, R, H, H, S, S, S, S, S } }, - { 10, 21, { P, P, P, P, P, C, C, C, C, C, C, C, C, C, R, R, R, H, H, H, T, S, S } }, - { 14, 17, { S, S, S, P, P, P, P, P, P, C, C, C, C, R, R, R, H, S, S, S, S, S, S } }, - { 17, 17, { S, S, S, S, P, P, P, P, P, P, P, C, C, C, C, R, R, S, S, S, S, S, S } }, - { 19, 23, { S, S, S, S, S, S, S, S, S, S, P, P, P, P, P, P, C, C, C, C, C, R, H } }, - { 20, 23, { S, S, S, S, S, S, P, P, P, P, P, P, P, P, C, C, C, C, R, H, H, H, T } }, - { 16, 19, { S, S, S, P, P, P, P, P, C, C, C, C, C, C, R, R, H, H, T, S, S, S, S } }, - { 13, 16, { S, S, P, P, P, P, C, C, C, C, C, C, R, R, H, T, S, S, S, S, S, S, S } }, -}; -static constexpr WeatherPattern kClimatePatternsWarm[] = { - { 12, 21, { S, S, S, S, S, P, P, P, P, P, P, P, P, C, C, C, C, C, C, C, H, S, S } }, - { 13, 22, { S, S, S, S, S, P, P, P, P, P, P, C, C, C, C, C, C, C, C, C, R, T, S } }, - { 16, 17, { S, S, S, S, S, S, P, P, P, P, P, P, C, C, C, C, R, S, S, S, S, S, S } }, - { 19, 18, { S, S, S, S, S, S, P, P, P, P, P, P, P, C, C, C, C, R, S, S, S, S, S } }, - { 21, 22, { S, S, S, S, S, S, S, S, S, S, P, P, P, P, P, P, P, P, P, C, C, C, S } }, - { 22, 17, { S, S, S, S, S, S, S, S, S, P, P, P, P, P, C, C, T, S, S, S, S, S, S } }, - { 19, 17, { S, S, S, S, S, P, P, P, P, P, C, C, C, C, C, C, R, S, S, S, S, S, S } }, - { 16, 17, { S, S, P, P, P, P, P, C, C, C, C, C, C, C, C, C, H, S, S, S, S, S, S } }, -}; -static constexpr WeatherPattern kClimatePatternsHotAndDry[] = { - { 12, 15, { S, S, S, S, P, P, P, P, P, P, P, P, C, C, R, S, S, S, S, S, S, S, S } }, - { 14, 12, { S, S, S, S, S, P, P, P, P, P, C, C, S, S, S, S, S, S, S, S, S, S, S } }, - { 16, 11, { S, S, S, S, S, S, P, P, P, P, C, S, S, S, S, S, S, S, S, S, S, S, S } }, - { 19, 9, { S, S, S, S, S, S, P, P, P, S, S, S, S, S, S, S, S, S, S, S, S, S, S } }, - { 21, 13, { S, S, S, S, S, S, S, S, S, S, P, P, P, S, S, S, S, S, S, S, S, S, S } }, - { 22, 11, { S, S, S, S, S, S, S, S, S, P, P, S, S, S, S, S, S, S, S, S, S, S, S } }, - { 21, 12, { S, S, S, S, S, S, S, P, P, P, C, T, S, S, S, S, S, S, S, S, S, S, S } }, - { 16, 13, { S, S, S, S, S, S, S, S, P, P, P, C, R, S, S, S, S, S, S, S, S, S, S } }, -}; -static constexpr WeatherPattern kClimatePatternsCold[] = { - { 4, 18, { S, S, S, S, P, P, P, P, P, C, C, C, C, C, C, C, R, H, S, S, S, S, S } }, - { 5, 21, { S, S, S, S, P, P, P, P, P, C, C, C, C, C, C, C, C, C, R, H, T, S, S } }, - { 7, 17, { S, S, S, S, P, P, P, P, P, P, P, C, C, C, C, R, H, S, S, S, S, S, S } }, - { 9, 17, { S, S, S, S, P, P, P, P, P, P, P, C, C, C, C, R, R, S, S, S, S, S, S } }, - { 10, 23, { S, S, S, S, S, S, S, S, S, S, P, P, P, P, P, P, C, C, C, C, C, R, H } }, - { 11, 23, { S, S, S, S, S, S, P, P, P, P, P, P, P, P, P, P, C, C, C, C, R, H, T } }, - { 9, 19, { S, S, S, S, S, P, P, P, P, P, C, C, C, C, C, C, R, H, T, S, S, S, S } }, - { 6, 16, { S, S, P, P, P, P, C, C, C, C, C, C, R, R, H, T, S, S, S, S, S, S, S } }, -}; - -const WeatherPattern* kClimatePatterns[] = { - kClimatePatternsCoolAndWet, - kClimatePatternsWarm, - kClimatePatternsHotAndDry, - kClimatePatternsCold, -}; - -#pragma endregion diff --git a/src/openrct2/world/Climate.h b/src/openrct2/world/Climate.h index 78815913ef..e68c5faa26 100644 --- a/src/openrct2/world/Climate.h +++ b/src/openrct2/world/Climate.h @@ -9,16 +9,10 @@ #pragma once -#include +#include "../core/EnumUtils.hpp" -enum class ClimateType : uint8_t -{ - CoolAndWet, - Warm, - HotAndDry, - Cold, - Count -}; +#include +#include enum class WeatherType : uint8_t { @@ -34,6 +28,29 @@ enum class WeatherType : uint8_t Count }; +static constexpr auto kNumWeatherTypes = EnumValue(WeatherType::Count); +static constexpr auto kNumClimateMonths = 8; +static constexpr auto kWeatherDistSize = 23; + +struct WeatherPattern +{ + int8_t baseTemperature; + int8_t randomBias; + WeatherType distribution[kWeatherDistSize]; +}; + +struct TemperatureThresholds +{ + int8_t cold; + int8_t warm; +}; + +struct Climate +{ + std::array patterns; + TemperatureThresholds itemThresholds; +}; + enum class WeatherEffectType : uint8_t { None, @@ -62,7 +79,7 @@ struct WeatherState extern uint16_t gClimateLightningFlash; int32_t ClimateCelsiusToFahrenheit(int32_t celsius); -void ClimateReset(ClimateType climate); +void ClimateReset(); void ClimateUpdate(); void ClimateUpdateSound(); void ClimateStopWeatherSound(); @@ -71,8 +88,9 @@ void ClimateForceWeather(WeatherType weather); enum class FilterPaletteID : int32_t; bool ClimateIsRaining(); +bool ClimateTransitioningToSnow(); bool ClimateIsSnowing(); bool ClimateIsSnowingHeavily(); bool WeatherIsDry(WeatherType); FilterPaletteID ClimateGetWeatherGloomPaletteId(const WeatherState& state); -uint32_t ClimateGetWeatherSpriteId(const WeatherState& state); +uint32_t ClimateGetWeatherSpriteId(const WeatherType weatherType); diff --git a/src/openrct2/world/ConstructionClearance.cpp b/src/openrct2/world/ConstructionClearance.cpp index 35e2167e4b..4d9132edd0 100644 --- a/src/openrct2/world/ConstructionClearance.cpp +++ b/src/openrct2/world/ConstructionClearance.cpp @@ -44,14 +44,14 @@ static int32_t MapPlaceClearFunc( auto* scenery = (*tile_element)->AsSmallScenery()->GetEntry(); - auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) + auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_FORBID_TREE_REMOVAL) { if (scenery != nullptr && scenery->HasFlag(SMALL_SCENERY_FLAG_IS_TREE)) return 1; } - if (!(gameState.Park.Flags & PARK_FLAGS_NO_MONEY) && scenery != nullptr) + if (!(gameState.park.Flags & PARK_FLAGS_NO_MONEY) && scenery != nullptr) *price += scenery->removal_price; if (flags & GAME_COMMAND_FLAG_GHOST) @@ -110,7 +110,7 @@ static bool MapLoc68BABCShouldContinue( && tileElement->AsTrack()->GetTrackType() == TrackElemType::Flat) { auto ride = GetRide(tileElement->AsTrack()->GetRideIndex()); - if (ride != nullptr && ride->GetRideTypeDescriptor().HasFlag(RtdFlag::supportsLevelCrossings)) + if (ride != nullptr && ride->getRideTypeDescriptor().HasFlag(RtdFlag::supportsLevelCrossings)) { return true; } @@ -146,7 +146,7 @@ GameActions::Result MapCanConstructWithClearAt( return res; } - if (GetGameState().Cheats.disableClearanceChecks) + if (getGameState().cheats.disableClearanceChecks) { res.SetData(ConstructClearResult{ groundFlags }); return res; @@ -198,7 +198,7 @@ GameActions::Result MapCanConstructWithClearAt( } } - if (GetGameState().Park.Flags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION && !isTree) + if (getGameState().park.Flags & PARK_FLAGS_FORBID_HIGH_CONSTRUCTION && !isTree) { const auto heightFromGround = pos.clearanceZ - tileElement->GetBaseZ(); @@ -313,7 +313,7 @@ void MapGetObstructionErrorText(TileElement* tileElement, GameActions::Result& r res.ErrorMessage = STR_X_IN_THE_WAY; Formatter ft(res.ErrorMessageArgs.data()); - ride->FormatNameTo(ft); + ride->formatNameTo(ft); } break; case TileElementType::SmallScenery: diff --git a/src/openrct2/world/ConstructionClearance.h b/src/openrct2/world/ConstructionClearance.h index eb6cb9e792..6ee98ef763 100644 --- a/src/openrct2/world/ConstructionClearance.h +++ b/src/openrct2/world/ConstructionClearance.h @@ -10,7 +10,7 @@ #pragma once #include "../actions/GameActionResult.h" -#include "Map.h" +#include "Location.hpp" #include diff --git a/src/openrct2/world/Entrance.cpp b/src/openrct2/world/Entrance.cpp index 1ec57fb7bb..f23bba538b 100644 --- a/src/openrct2/world/Entrance.cpp +++ b/src/openrct2/world/Entrance.cpp @@ -27,7 +27,6 @@ #include "../ride/Station.h" #include "../ride/Track.h" #include "Footpath.h" -#include "Map.h" #include "MapAnimation.h" #include "Park.h" #include "tile_element/EntranceElement.h" @@ -70,7 +69,7 @@ void ParkEntranceRemoveGhost() int32_t ParkEntranceGetIndex(const CoordsXYZ& entrancePos) { int32_t i = 0; - for (const auto& entrance : GetGameState().Park.Entrances) + for (const auto& entrance : getGameState().park.Entrances) { if (entrancePos == entrance) { @@ -83,12 +82,12 @@ int32_t ParkEntranceGetIndex(const CoordsXYZ& entrancePos) void ParkEntranceReset() { - GetGameState().Park.Entrances.clear(); + getGameState().park.Entrances.clear(); } void RideEntranceExitPlaceProvisionalGhost() { - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::entranceOrExit)) { RideEntranceExitPlaceGhost( _currentRideIndex, gRideEntranceExitGhostPosition, gRideEntranceExitGhostPosition.direction, @@ -98,7 +97,7 @@ void RideEntranceExitPlaceProvisionalGhost() void RideEntranceExitRemoveGhost() { - if (_currentTrackSelectionFlags & TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT) + if (_currentTrackSelectionFlags.has(TrackSelectionFlag::entranceOrExit)) { auto rideEntranceExitRemove = RideEntranceExitRemoveAction( gRideEntranceExitGhostPosition, _currentRideIndex, gRideEntranceExitGhostStationIndex, @@ -121,7 +120,7 @@ money64 RideEntranceExitPlaceGhost( if (result != kMoney64Undefined) { - _currentTrackSelectionFlags |= TRACK_SELECTION_FLAG_ENTRANCE_OR_EXIT; + _currentTrackSelectionFlags.set(TrackSelectionFlag::entranceOrExit); gRideEntranceExitGhostPosition.x = entranceExitCoords.x; gRideEntranceExitGhostPosition.y = entranceExitCoords.y; gRideEntranceExitGhostPosition.direction = direction; @@ -212,19 +211,19 @@ void MazeEntranceHedgeRemoval(const CoordsXYE& entrance) void ParkEntranceFixLocations(void) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Fix ParkEntrance locations for which the tile_element no longer exists - gameState.Park.Entrances.erase( + gameState.park.Entrances.erase( std::remove_if( - gameState.Park.Entrances.begin(), gameState.Park.Entrances.end(), + gameState.park.Entrances.begin(), gameState.park.Entrances.end(), [](const auto& entrance) { return MapGetParkEntranceElementAt(entrance, false) == nullptr; }), - gameState.Park.Entrances.end()); + gameState.park.Entrances.end()); } void ParkEntranceUpdateLocations() { - auto& gameState = GetGameState(); - gameState.Park.Entrances.clear(); + auto& gameState = getGameState(); + gameState.park.Entrances.clear(); TileElementIterator it; TileElementIteratorBegin(&it); while (TileElementIteratorNext(&it)) @@ -234,7 +233,7 @@ void ParkEntranceUpdateLocations() && entranceElement->GetSequenceIndex() == 0 && !entranceElement->IsGhost()) { auto entrance = TileCoordsXYZD(it.x, it.y, it.element->BaseHeight, it.element->GetDirection()).ToCoordsXYZD(); - gameState.Park.Entrances.push_back(entrance); + gameState.park.Entrances.push_back(entrance); } } } diff --git a/src/openrct2/world/Footpath.cpp b/src/openrct2/world/Footpath.cpp index b6faece633..6cd92279f3 100644 --- a/src/openrct2/world/Footpath.cpp +++ b/src/openrct2/world/Footpath.cpp @@ -34,7 +34,6 @@ #include "../ride/Track.h" #include "../ride/TrackData.h" #include "Location.hpp" -#include "Map.h" #include "MapAnimation.h" #include "tile_element/BannerElement.h" #include "tile_element/EntranceElement.h" @@ -561,7 +560,7 @@ static void Loc6A6D7E( FootpathNeighbourList* neighbourList) { auto targetPos = CoordsXY{ initialTileElementPos } + CoordsDirectionDelta[direction]; - if (((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode) && MapIsEdge(targetPos)) + if ((gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode) && MapIsEdge(targetPos)) { if (query) { @@ -610,7 +609,7 @@ static void Loc6A6D7E( continue; } - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide)) { continue; } @@ -696,7 +695,7 @@ static void Loc6A6C85( return; } - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide)) { return; } @@ -954,7 +953,7 @@ void FootpathUpdateQueueChains() if (ride == nullptr) continue; - for (const auto& station : ride->GetStations()) + for (const auto& station : ride->getStations()) { if (station.Entrance.IsNull()) continue; @@ -973,7 +972,7 @@ void FootpathUpdateQueueChains() Direction direction = DirectionReverse(tileElement->GetDirection()); FootpathChainRideQueue( - rideIndex, ride->GetStationIndex(&station), station.Entrance.ToCoordsXY(), tileElement, direction); + rideIndex, ride->getStationIndex(&station), station.Entrance.ToCoordsXY(), tileElement, direction); } while (!(tileElement++)->IsLastForTile()); } } @@ -1661,7 +1660,7 @@ bool TileElementWantsPathConnectionTowards(const TileCoordsXYZD& coords, const T if (ride == nullptr) continue; - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide)) break; const auto trackType = tileElement->AsTrack()->GetTrackType(); @@ -1754,7 +1753,7 @@ void FootpathRemoveEdgesAt(const CoordsXY& footpathPos, TileElement* tileElement if (ride == nullptr) return; - if (!ride->GetRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide)) + if (!ride->getRideTypeDescriptor().HasFlag(RtdFlag::isFlatRide)) return; } @@ -1808,7 +1807,7 @@ void FootpathRemoveEdgesAt(const CoordsXY& footpathPos, TileElement* tileElement static ObjectEntryIndex FootpathGetDefaultSurface(bool queue) { - bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode); + bool showEditorPaths = (gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode); for (ObjectEntryIndex i = 0; i < kMaxFootpathSurfaceObjects; i++) { auto pathEntry = GetPathSurfaceEntry(i); @@ -1832,7 +1831,7 @@ static bool FootpathIsSurfaceEntryOkay(ObjectEntryIndex index, bool queue) auto pathEntry = GetPathSurfaceEntry(index); if (pathEntry != nullptr) { - bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode); + bool showEditorPaths = (gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode); if (!showEditorPaths && (pathEntry->Flags & FOOTPATH_ENTRY_FLAG_SHOW_ONLY_IN_SCENARIO_EDITOR)) { return false; @@ -1860,7 +1859,7 @@ static ObjectEntryIndex FootpathGetDefaultRailings() static bool FootpathIsLegacyPathEntryOkay(ObjectEntryIndex index) { - bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.sandboxMode); + bool showEditorPaths = (gLegacyScene == LegacyScene::scenarioEditor || getGameState().cheats.sandboxMode); auto& objManager = OpenRCT2::GetContext()->GetObjectManager(); auto footpathObj = objManager.GetLoadedObject(index); if (footpathObj != nullptr) @@ -1944,32 +1943,19 @@ bool FootpathSelectDefault() const FootpathObject* GetLegacyFootpathEntry(ObjectEntryIndex entryIndex) { auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::paths, entryIndex); - if (obj == nullptr) - return nullptr; - - const FootpathObject* footpathObject = (static_cast(obj)); - return footpathObject; + return objMgr.GetLoadedObject(entryIndex); } const FootpathSurfaceObject* GetPathSurfaceEntry(ObjectEntryIndex entryIndex) { auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::footpathSurface, entryIndex); - if (obj == nullptr) - return nullptr; - - return static_cast(obj); + return objMgr.GetLoadedObject(entryIndex); } const FootpathRailingsObject* GetPathRailingsEntry(ObjectEntryIndex entryIndex) { auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::footpathRailings, entryIndex); - if (obj == nullptr) - return nullptr; - - return static_cast(obj); + return objMgr.GetLoadedObject(entryIndex); } RideId PathElement::GetRideIndex() const @@ -2043,7 +2029,7 @@ bool PathElement::IsLevelCrossing(const CoordsXY& coords) const return false; } - return ride->GetRideTypeDescriptor().HasFlag(RtdFlag::supportsLevelCrossings); + return ride->getRideTypeDescriptor().HasFlag(RtdFlag::supportsLevelCrossings); } bool FootpathIsZAndDirectionValid(const PathElement& pathElement, int32_t currentZ, int32_t currentDirection) diff --git a/src/openrct2/world/Location.hpp b/src/openrct2/world/Location.hpp index 46a69cda6b..ec09d12eab 100644 --- a/src/openrct2/world/Location.hpp +++ b/src/openrct2/world/Location.hpp @@ -536,7 +536,7 @@ struct TileCoordsXYRangedZ : public TileCoordsXY */ using Direction = uint8_t; -const Direction INVALID_DIRECTION = 0xFF; +const Direction kInvalidDirection = 0xFF; /** * Array of all valid cardinal directions, to make it easy to write range-based for loops like: @@ -736,7 +736,7 @@ struct TileCoordsXYZD : public TileCoordsXYZ constexpr void SetNull() { TileCoordsXYZ::SetNull(); - direction = INVALID_DIRECTION; + direction = kInvalidDirection; } }; diff --git a/src/openrct2/world/Map.cpp b/src/openrct2/world/Map.cpp index 160f10c93a..a78c7101ee 100644 --- a/src/openrct2/world/Map.cpp +++ b/src/openrct2/world/Map.cpp @@ -24,6 +24,7 @@ #include "../core/EnumUtils.hpp" #include "../core/Guard.hpp" #include "../entity/Duck.h" +#include "../entity/EntityList.h" #include "../entity/EntityTweener.h" #include "../entity/Fountain.h" #include "../entity/PatrolArea.h" @@ -43,7 +44,6 @@ #include "../ride/Track.h" #include "../ride/TrackData.h" #include "../ride/TrackDesign.h" -#include "../scenario/Scenario.h" #include "../windows/Intent.h" #include "../world/TilePointerIndex.hpp" #include "Banner.h" @@ -114,32 +114,32 @@ static TileCoordsXY _mapSizeStash; void StashMap() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); _tileIndexStash = std::move(_tileIndex); - _tileElementsStash = std::move(gameState.TileElements); - _mapSizeStash = gameState.MapSize; + _tileElementsStash = std::move(gameState.tileElements); + _mapSizeStash = gameState.mapSize; _tileElementsInUseStash = _tileElementsInUse; } void UnstashMap() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); _tileIndex = std::move(_tileIndexStash); - gameState.TileElements = std::move(_tileElementsStash); - gameState.MapSize = _mapSizeStash; + gameState.tileElements = std::move(_tileElementsStash); + gameState.mapSize = _mapSizeStash; _tileElementsInUse = _tileElementsInUseStash; } CoordsXY GetMapSizeUnits() { - auto& gameState = GetGameState(); - return { (gameState.MapSize.x - 1) * kCoordsXYStep, (gameState.MapSize.y - 1) * kCoordsXYStep }; + auto& gameState = getGameState(); + return { (gameState.mapSize.x - 1) * kCoordsXYStep, (gameState.mapSize.y - 1) * kCoordsXYStep }; } CoordsXY GetMapSizeMinus2() { - auto& gameState = GetGameState(); - return { (gameState.MapSize.x * kCoordsXYStep) + (8 * kCoordsXYStep - 2), - (gameState.MapSize.y * kCoordsXYStep) + (8 * kCoordsXYStep - 2) }; + auto& gameState = getGameState(); + return { (gameState.mapSize.x * kCoordsXYStep) + (8 * kCoordsXYStep - 2), + (gameState.mapSize.y * kCoordsXYStep) + (8 * kCoordsXYStep - 2) }; } CoordsXY GetMapSizeMaxXY() { @@ -148,15 +148,15 @@ CoordsXY GetMapSizeMaxXY() const std::vector& GetTileElements() { - return GetGameState().TileElements; + return getGameState().tileElements; } void SetTileElements(GameState_t& gameState, std::vector&& tileElements) { - gameState.TileElements = std::move(tileElements); + gameState.tileElements = std::move(tileElements); _tileIndex = TilePointerIndex( - kMaximumMapSizeTechnical, gameState.TileElements.data(), gameState.TileElements.size()); - _tileElementsInUse = gameState.TileElements.size(); + kMaximumMapSizeTechnical, gameState.tileElements.data(), gameState.tileElements.size()); + _tileElementsInUse = gameState.tileElements.size(); } static TileElement GetDefaultSurfaceElement() @@ -179,7 +179,7 @@ static TileElement GetDefaultSurfaceElement() std::vector GetReorganisedTileElementsWithoutGhosts() { std::vector newElements; - newElements.reserve(std::max(MIN_TILE_ELEMENTS, GetGameState().TileElements.size())); + newElements.reserve(std::max(MIN_TILE_ELEMENTS, getGameState().tileElements.size())); for (int32_t y = 0; y < kMaximumMapSizeTechnical; y++) { for (int32_t x = 0; x < kMaximumMapSizeTechnical; x++) @@ -244,14 +244,14 @@ static void ReorganiseTileElements(GameState_t& gameState, size_t capacity) static void ReorganiseTileElements(size_t capacity) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); ReorganiseTileElements(gameState, capacity); } void ReorganiseTileElements() { - auto& gameState = GetGameState(); - ReorganiseTileElements(gameState, gameState.TileElements.size()); + auto& gameState = getGameState(); + ReorganiseTileElements(gameState, gameState.tileElements.size()); } static bool MapCheckFreeElementsAndReorganise(size_t numElementsOnTile, size_t numNewElements) @@ -262,20 +262,20 @@ static bool MapCheckFreeElementsAndReorganise(size_t numElementsOnTile, size_t n return false; } - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto totalElementsRequired = numElementsOnTile + numNewElements; - auto freeElements = gameState.TileElements.capacity() - gameState.TileElements.size(); + auto freeElements = gameState.tileElements.capacity() - gameState.tileElements.size(); if (freeElements >= totalElementsRequired) { return true; } // if space issue is due to fragmentation then Reorg Tiles without increasing capacity - if (gameState.TileElements.size() > totalElementsRequired + _tileElementsInUse) + if (gameState.tileElements.size() > totalElementsRequired + _tileElementsInUse) { ReorganiseTileElements(); // This check is not expected to fail - freeElements = gameState.TileElements.capacity() - gameState.TileElements.size(); + freeElements = gameState.tileElements.capacity() - gameState.tileElements.size(); if (freeElements >= totalElementsRequired) { return true; @@ -283,7 +283,7 @@ static bool MapCheckFreeElementsAndReorganise(size_t numElementsOnTile, size_t n } // Capacity must increase to handle the space (Note capacity can go above kMaxTileElements) - auto newCapacity = gameState.TileElements.capacity() * 2; + auto newCapacity = gameState.tileElements.capacity() * 2; ReorganiseTileElements(newCapacity); return true; } @@ -319,15 +319,15 @@ int32_t TileElementIteratorNext(TileElementIterator* it) return 1; } - auto& gameState = GetGameState(); - if (it->y < (gameState.MapSize.y - 2)) + auto& gameState = getGameState(); + if (it->y < (gameState.mapSize.y - 2)) { it->y++; it->element = MapGetFirstElementAt(TileCoordsXY{ it->x, it->y }); return it->element == nullptr ? 0 : 1; } - if (it->x < (gameState.MapSize.x - 2)) + if (it->x < (gameState.mapSize.x - 2)) { it->y = 1; it->x++; @@ -465,12 +465,12 @@ void MapInit(const TileCoordsXY& size) { auto numTiles = kMaximumMapSizeTechnical * kMaximumMapSizeTechnical; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); SetTileElements(gameState, std::vector(numTiles, GetDefaultSurfaceElement())); - gameState.GrassSceneryTileLoopPosition = 0; - gameState.WidePathTileLoopPosition = {}; - gameState.MapSize = size; + gameState.grassSceneryTileLoopPosition = 0; + gameState.widePathTileLoopPosition = {}; + gameState.mapSize = size; MapRemoveOutOfRangeElements(); ClearMapAnimations(); @@ -487,11 +487,11 @@ void MapCountRemainingLandRights() { gLandRemainingOwnershipSales = 0; gLandRemainingConstructionSales = 0; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - for (int32_t y = 0; y < gameState.MapSize.y; y++) + for (int32_t y = 0; y < gameState.mapSize.y; y++) { - for (int32_t x = 0; x < gameState.MapSize.x; x++) + for (int32_t x = 0; x < gameState.mapSize.x; x++) { auto* surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y }); // Surface elements are sometimes hacked out to save some space for other map elements @@ -531,8 +531,8 @@ void MapCountRemainingLandRights() */ void MapStripGhostFlagFromElements() { - auto& gameState = GetGameState(); - for (auto& element : gameState.TileElements) + auto& gameState = getGameState(); + for (auto& element : gameState.tileElements) { element.SetGhost(false); } @@ -759,18 +759,18 @@ void MapUpdatePathWideFlags() { PROFILED_FUNCTION(); - if (gScreenFlags & (SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER)) + if (isInTrackDesignerOrManager()) { return; } - const int32_t kPracticalMapSizeBigX = GetGameState().MapSize.x * kCoordsXYStep; - const int32_t kPracticalMapSizeBigY = GetGameState().MapSize.y * kCoordsXYStep; + const int32_t kPracticalMapSizeBigX = getGameState().mapSize.x * kCoordsXYStep; + const int32_t kPracticalMapSizeBigY = getGameState().mapSize.y * kCoordsXYStep; // Presumably update_path_wide_flags is too computationally expensive to call for every // tile every update, so gWidePathTileLoopX and gWidePathTileLoopY store the x and y // progress. A maximum of 128 calls is done per update. - CoordsXY& loopPosition = GetGameState().WidePathTileLoopPosition; + CoordsXY& loopPosition = getGameState().widePathTileLoopPosition; for (int32_t i = 0; i < 128; i++) { FootpathUpdatePathWideFlags(loopPosition); @@ -827,9 +827,9 @@ bool MapIsEdge(const CoordsXY& coords) bool MapCanBuildAt(const CoordsXYZ& loc) { - if (gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) + if (gLegacyScene == LegacyScene::scenarioEditor) return true; - if (GetGameState().Cheats.sandboxMode) + if (getGameState().cheats.sandboxMode) return true; if (MapIsLocationOwned(loc)) return true; @@ -965,7 +965,7 @@ uint8_t MapGetLowestLandHeight(const MapRange& range) if (surfaceElement != nullptr && min_height > surfaceElement->BaseHeight) { - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ xi, yi })) { @@ -994,7 +994,7 @@ uint8_t MapGetHighestLandHeight(const MapRange& range) auto* surfaceElement = MapGetSurfaceElementAt(CoordsXY{ xi, yi }); if (surfaceElement != nullptr) { - if (!(gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) && !GetGameState().Cheats.sandboxMode) + if (gLegacyScene != LegacyScene::scenarioEditor && !getGameState().cheats.sandboxMode) { if (!MapIsLocationInPark(CoordsXY{ xi, yi })) { @@ -1041,10 +1041,10 @@ void TileElementRemove(TileElement* tileElement) (tileElement - 1)->SetLastForTile(true); tileElement->BaseHeight = kMaxTileElementHeight; _tileElementsInUse--; - auto& gameState = GetGameState(); - if (tileElement == &gameState.TileElements.back()) + auto& gameState = getGameState(); + if (tileElement == &gameState.tileElements.back()) { - gameState.TileElements.pop_back(); + gameState.tileElements.pop_back(); } } @@ -1169,11 +1169,11 @@ static TileElement* AllocateTileElements(size_t numElementsOnTile, size_t numNew return nullptr; } - auto& gameState = GetGameState(); - auto oldSize = gameState.TileElements.size(); - gameState.TileElements.resize(gameState.TileElements.size() + numElementsOnTile + numNewElements); + auto& gameState = getGameState(); + auto oldSize = gameState.tileElements.size(); + gameState.tileElements.resize(gameState.tileElements.size() + numElementsOnTile + numNewElements); _tileElementsInUse += numNewElements; - return &gameState.TileElements[oldSize]; + return &gameState.tileElements[oldSize]; } /** @@ -1260,11 +1260,10 @@ void MapUpdateTiles() { PROFILED_FUNCTION(); - int32_t ignoreScreenFlags = SCREEN_FLAGS_SCENARIO_EDITOR | SCREEN_FLAGS_TRACK_DESIGNER | SCREEN_FLAGS_TRACK_MANAGER; - if (gScreenFlags & ignoreScreenFlags) + if (isInEditorMode()) return; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Update 43 more tiles (for each 256x256 block) for (int32_t j = 0; j < 43; j++) @@ -1272,7 +1271,7 @@ void MapUpdateTiles() int32_t x = 0; int32_t y = 0; - uint16_t interleaved_xy = gameState.GrassSceneryTileLoopPosition; + uint16_t interleaved_xy = gameState.grassSceneryTileLoopPosition; for (int32_t i = 0; i < 8; i++) { x = (x << 1) | (interleaved_xy & 1); @@ -1282,9 +1281,9 @@ void MapUpdateTiles() } // Repeat for each 256x256 block on the map - for (int32_t blockY = 0; blockY < gameState.MapSize.y; blockY += 256) + for (int32_t blockY = 0; blockY < gameState.mapSize.y; blockY += 256) { - for (int32_t blockX = 0; blockX < gameState.MapSize.x; blockX += 256) + for (int32_t blockX = 0; blockX < gameState.mapSize.x; blockX += 256) { auto mapPos = TileCoordsXY{ blockX + x, blockY + y }.ToCoordsXY(); if (MapIsEdge(mapPos)) @@ -1299,7 +1298,7 @@ void MapUpdateTiles() } } - gameState.GrassSceneryTileLoopPosition++; + gameState.grassSceneryTileLoopPosition++; } } @@ -1316,9 +1315,9 @@ void MapRemoveOutOfRangeElements() // NOTE: This is only a workaround for non-networked games. // Map resize has to become its own Game Action to properly solve this issue. // - auto& gameState = GetGameState(); - bool buildState = gameState.Cheats.buildInPauseMode; - gameState.Cheats.buildInPauseMode = true; + auto& gameState = getGameState(); + bool buildState = gameState.cheats.buildInPauseMode; + gameState.cheats.buildInPauseMode = true; for (int32_t y = kMaximumMapSizeBig - kCoordsXYStep; y >= 0; y -= kCoordsXYStep) { @@ -1339,7 +1338,7 @@ void MapRemoveOutOfRangeElements() } // Reset cheat state - gameState.Cheats.buildInPauseMode = buildState; + gameState.cheats.buildInPauseMode = buildState; } static void MapExtendBoundarySurfaceExtendTile(const SurfaceElement& sourceTile, SurfaceElement& destTile) @@ -1384,7 +1383,7 @@ static void MapExtendBoundarySurfaceExtendTile(const SurfaceElement& sourceTile, */ void MapExtendBoundarySurfaceY() { - auto y = GetGameState().MapSize.y - 2; + auto y = getGameState().mapSize.y - 2; for (auto x = 0; x < kMaximumMapSizeTechnical; x++) { auto existingTileElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y - 1 }); @@ -1404,7 +1403,7 @@ void MapExtendBoundarySurfaceY() */ void MapExtendBoundarySurfaceX() { - auto x = GetGameState().MapSize.x - 2; + auto x = getGameState().mapSize.x - 2; for (auto y = 0; y < kMaximumMapSizeTechnical; y++) { auto existingTileElement = MapGetSurfaceElementAt(TileCoordsXY{ x - 1, y }); @@ -1511,13 +1510,13 @@ void ClearElementAt(const CoordsXY& loc, TileElement** elementPtr) */ static void ClearElementsAt(const CoordsXY& loc) { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Remove the spawn point (if there is one in the current tile) - gameState.PeepSpawns.erase( + gameState.peepSpawns.erase( std::remove_if( - gameState.PeepSpawns.begin(), gameState.PeepSpawns.end(), + gameState.peepSpawns.begin(), gameState.peepSpawns.end(), [loc](const CoordsXY& spawn) { return spawn.ToTileStart() == loc.ToTileStart(); }), - gameState.PeepSpawns.end()); + gameState.peepSpawns.end()); TileElement* tileElement = MapGetFirstElementAt(loc); if (tileElement == nullptr) @@ -2203,7 +2202,7 @@ void ShiftMap(const TileCoordsXY& amount) return; auto amountToMove = amount.ToCoordsXY(); - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Tile elements auto newElements = std::vector(); @@ -2213,8 +2212,8 @@ void ShiftMap(const TileCoordsXY& amount) { auto srcX = x - amount.x; auto srcY = y - amount.y; - if (x > 0 && y > 0 && x < gameState.MapSize.x - 1 && y < gameState.MapSize.y - 1 && srcX > 0 && srcY > 0 - && srcX < gameState.MapSize.x - 1 && srcY < gameState.MapSize.y - 1) + if (x > 0 && y > 0 && x < gameState.mapSize.x - 1 && y < gameState.mapSize.y - 1 && srcX > 0 && srcY > 0 + && srcX < gameState.mapSize.x - 1 && srcY < gameState.mapSize.y - 1) { auto srcTile = _tileIndex.GetFirstElementAt(TileCoordsXY(srcX, srcY)); do @@ -2222,7 +2221,7 @@ void ShiftMap(const TileCoordsXY& amount) newElements.push_back(*srcTile); } while (!(srcTile++)->IsLastForTile()); } - else if (x == 0 || y == 0 || x == gameState.MapSize.x - 1 || y == gameState.MapSize.y - 1) + else if (x == 0 || y == 0 || x == gameState.mapSize.x - 1 || y == gameState.mapSize.y - 1) { auto surface = GetDefaultSurfaceElement(); surface.SetBaseZ(kMinimumLandZ); @@ -2233,8 +2232,8 @@ void ShiftMap(const TileCoordsXY& amount) } else { - auto copyX = std::clamp(srcX, 1, gameState.MapSize.x - 2); - auto copyY = std::clamp(srcY, 1, gameState.MapSize.y - 2); + auto copyX = std::clamp(srcX, 1, gameState.mapSize.x - 2); + auto copyY = std::clamp(srcY, 1, gameState.mapSize.y - 2); auto srcTile = MapGetSurfaceElementAt(TileCoordsXY(copyX, copyY)); if (srcTile != nullptr) { @@ -2255,10 +2254,10 @@ void ShiftMap(const TileCoordsXY& amount) SetTileElements(gameState, std::move(newElements)); MapRemoveOutOfRangeElements(); - for (auto& spawn : gameState.PeepSpawns) + for (auto& spawn : gameState.peepSpawns) shiftIfNotNull(spawn, amountToMove); - for (auto& entrance : gameState.Park.Entrances) + for (auto& entrance : gameState.park.Entrances) shiftIfNotNull(entrance, amountToMove); // Entities @@ -2350,7 +2349,7 @@ void ShiftMap(const TileCoordsXY& amount) // Rides for (auto& ride : GetRideManager()) { - auto stations = ride.GetStations(); + auto stations = ride.getStations(); for (auto& station : stations) { shiftIfNotNull(station.Start, amountToMove); @@ -2358,12 +2357,12 @@ void ShiftMap(const TileCoordsXY& amount) shiftIfNotNull(station.Exit, amount); } - shiftIfNotNull(ride.overall_view, amountToMove); - shiftIfNotNull(ride.boat_hire_return_position, amount); - shiftIfNotNull(ride.CurTestTrackLocation, amount); - shiftIfNotNull(ride.ChairliftBullwheelLocation[0], amount); - shiftIfNotNull(ride.ChairliftBullwheelLocation[1], amount); - shiftIfNotNull(ride.CableLiftLoc, amountToMove); + shiftIfNotNull(ride.overallView, amountToMove); + shiftIfNotNull(ride.boatHireReturnPosition, amount); + shiftIfNotNull(ride.curTestTrackLocation, amount); + shiftIfNotNull(ride.chairliftBullwheelLocation[0], amount); + shiftIfNotNull(ride.chairliftBullwheelLocation[1], amount); + shiftIfNotNull(ride.cableLiftLoc, amountToMove); } // Banners diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index 98c1819b82..323d41c992 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -26,7 +26,6 @@ #include "../ride/Track.h" #include "Banner.h" #include "Footpath.h" -#include "Map.h" #include "Scenery.h" #include "tile_element/EntranceElement.h" #include "tile_element/LargeSceneryElement.h" @@ -120,7 +119,7 @@ static bool MapAnimationInvalidateRideEntrance(const CoordsXYZ& loc) auto ride = GetRide(tileElement->AsEntrance()->GetRideIndex()); if (ride != nullptr) { - auto stationObj = ride->GetStationObject(); + auto stationObj = ride->getStationObject(); if (stationObj != nullptr) { int32_t height = loc.z + stationObj->Height + 8; @@ -202,7 +201,7 @@ static bool MapAnimationInvalidateSmallScenery(const CoordsXYZ& loc) if (sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_IS_CLOCK)) { // Peep, looking at scenery - if (!(GetGameState().CurrentTicks & 0x3FF) && GameIsNotPaused()) + if (!(getGameState().currentTicks & 0x3FF) && GameIsNotPaused()) { int32_t direction = tileElement->GetDirection(); auto quad = EntityTileList(CoordsXY{ loc } - CoordsDirectionDelta[direction]); @@ -490,7 +489,7 @@ static bool MapAnimationInvalidateWallDoor(const CoordsXYZ& loc) TileCoordsXYZ tileLoc{ loc }; TileElement* tileElement; - if (GetGameState().CurrentTicks & 1) + if (getGameState().currentTicks & 1) return false; bool removeAnimation = true; diff --git a/src/openrct2/world/Park.cpp b/src/openrct2/world/Park.cpp index 9b8fc31761..25367a7456 100644 --- a/src/openrct2/world/Park.cpp +++ b/src/openrct2/world/Park.cpp @@ -18,6 +18,7 @@ #include "../actions/ParkSetParameterAction.h" #include "../core/Memory.hpp" #include "../core/String.hpp" +#include "../entity/EntityList.h" #include "../entity/Litter.h" #include "../entity/Peep.h" #include "../entity/Staff.h" @@ -32,13 +33,11 @@ #include "../ride/RideData.h" #include "../ride/RideManager.hpp" #include "../ride/ShopItem.h" -#include "../scenario/Scenario.h" #include "../scripting/ScriptEngine.h" #include "../ui/WindowManager.h" #include "../util/Util.h" #include "../windows/Intent.h" #include "Entrance.h" -#include "Map.h" #include "tile_element/EntranceElement.h" #include "tile_element/SurfaceElement.h" @@ -63,10 +62,10 @@ namespace OpenRCT2::Park */ static PeepSpawn* GetRandomPeepSpawn() { - auto& gameState = GetGameState(); - if (!gameState.PeepSpawns.empty()) + auto& gameState = getGameState(); + if (!gameState.peepSpawns.empty()) { - return &gameState.PeepSpawns[ScenarioRand() % gameState.PeepSpawns.size()]; + return &gameState.peepSpawns[ScenarioRand() % gameState.peepSpawns.size()]; } return nullptr; @@ -75,9 +74,9 @@ namespace OpenRCT2::Park static money64 calculateRideValue(const Ride& ride) { money64 result = 0; - if (ride.value != RIDE_VALUE_UNDEFINED) + if (ride.value != kRideValueUndefined) { - const auto& rtd = ride.GetRideTypeDescriptor(); + const auto& rtd = ride.getRideTypeDescriptor(); result = (ride.value * 10) * (static_cast(RideCustomersInLast5Minutes(ride)) + rtd.BonusValue * 4LL); } return result; @@ -86,18 +85,18 @@ namespace OpenRCT2::Park static money64 calculateTotalRideValueForMoney() { money64 totalRideValue = 0; - bool ridePricesUnlocked = RidePricesUnlocked() && !(GetGameState().Park.Flags & PARK_FLAGS_NO_MONEY); + bool ridePricesUnlocked = RidePricesUnlocked() && !(getGameState().park.Flags & PARK_FLAGS_NO_MONEY); for (auto& ride : GetRideManager()) { - if (ride.status != RideStatus::Open) + if (ride.status != RideStatus::open) continue; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) continue; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_CRASHED) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_CRASHED) continue; // Add ride value - if (ride.value != RIDE_VALUE_UNDEFINED) + if (ride.value != kRideValueUndefined) { money64 rideValue = ride.value; if (ridePricesUnlocked) @@ -118,40 +117,40 @@ namespace OpenRCT2::Park uint32_t suggestedMaxGuests = 0; uint32_t difficultGenerationBonus = 0; - auto& gameState = GetGameState(); + auto& gameState = getGameState(); for (auto& ride : GetRideManager()) { - if (ride.status != RideStatus::Open) + if (ride.status != RideStatus::open) continue; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN) continue; - if (ride.lifecycle_flags & RIDE_LIFECYCLE_CRASHED) + if (ride.lifecycleFlags & RIDE_LIFECYCLE_CRASHED) continue; // Add guest score for ride type - suggestedMaxGuests += ride.GetRideTypeDescriptor().BonusValue; + suggestedMaxGuests += ride.getRideTypeDescriptor().BonusValue; // If difficult guest generation, extra guests are available for good rides - if (gameState.Park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) + if (gameState.park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) { - if (!(ride.lifecycle_flags & RIDE_LIFECYCLE_TESTED)) + if (!(ride.lifecycleFlags & RIDE_LIFECYCLE_TESTED)) continue; - if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) + if (!ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) continue; - if (!ride.GetRideTypeDescriptor().HasFlag(RtdFlag::hasDataLogging)) + if (!ride.getRideTypeDescriptor().HasFlag(RtdFlag::hasDataLogging)) continue; - if (ride.GetStation().SegmentLength < (600 << 16)) + if (ride.getStation().SegmentLength < (600 << 16)) continue; if (ride.ratings.excitement < MakeRideRating(6, 00)) continue; // Bonus guests for good ride - difficultGenerationBonus += ride.GetRideTypeDescriptor().BonusValue * 2; + difficultGenerationBonus += ride.getRideTypeDescriptor().BonusValue * 2; } } - if (gameState.Park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) + if (gameState.park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) { suggestedMaxGuests = std::min(suggestedMaxGuests, 1000); suggestedMaxGuests += difficultGenerationBonus; @@ -161,13 +160,13 @@ namespace OpenRCT2::Park #ifdef ENABLE_SCRIPTING auto& hookEngine = GetContext()->GetScriptEngine().GetHookEngine(); - if (hookEngine.HasSubscriptions(HOOK_TYPE::PARK_CALCULATE_GUEST_CAP)) + if (hookEngine.HasSubscriptions(HookType::parkCalculateGuestCap)) { auto ctx = GetContext()->GetScriptEngine().GetContext(); auto obj = DukObject(ctx); obj.Set("suggestedGuestMaximum", suggestedMaxGuests); auto e = obj.Take(); - hookEngine.Call(HOOK_TYPE::PARK_CALCULATE_GUEST_CAP, e, true); + hookEngine.Call(HookType::parkCalculateGuestCap, e, true); suggestedMaxGuests = AsOrDefault(e["suggestedGuestMaximum"], static_cast(suggestedMaxGuests)); suggestedMaxGuests = std::clamp(suggestedMaxGuests, 0, UINT16_MAX); @@ -178,18 +177,18 @@ namespace OpenRCT2::Park static uint32_t calculateGuestGenerationProbability() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); // Begin with 50 + park rating - uint32_t probability = 50 + std::clamp(gameState.Park.Rating - 200, 0, 650); + uint32_t probability = 50 + std::clamp(gameState.park.Rating - 200, 0, 650); // The more guests, the lower the chance of a new one - uint32_t numGuests = gameState.NumGuestsInPark + gameState.NumGuestsHeadingForPark; - if (numGuests > gameState.SuggestedGuestMaximum) + uint32_t numGuests = gameState.numGuestsInPark + gameState.numGuestsHeadingForPark; + if (numGuests > gameState.suggestedGuestMaximum) { probability /= 4; // Even lower for difficult guest generation - if (gameState.Park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) + if (gameState.park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) { probability /= 4; } @@ -203,18 +202,18 @@ namespace OpenRCT2::Park // Penalty for overpriced entrance fee relative to total ride value auto entranceFee = GetEntranceFee(); - if (entranceFee > gameState.TotalRideValueForMoney) + if (entranceFee > gameState.totalRideValueForMoney) { probability /= 4; // Extra penalty for very overpriced entrance fee - if (entranceFee / 2 > gameState.TotalRideValueForMoney) + if (entranceFee / 2 > gameState.totalRideValueForMoney) { probability /= 4; } } // Reward or penalties for park awards - for (const auto& award : GetGameState().CurrentAwards) + for (const auto& award : getGameState().currentAwards) { // +/- 0.25% of the probability if (AwardIsPositive(award.Type)) @@ -233,17 +232,17 @@ namespace OpenRCT2::Park static void generateGuests(GameState_t& gameState) { // Generate a new guest for some probability - if (static_cast(ScenarioRand() & 0xFFFF) < gameState.GuestGenerationProbability) + if (static_cast(ScenarioRand() & 0xFFFF) < gameState.guestGenerationProbability) { - bool difficultGeneration = (gameState.Park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) != 0; - if (!difficultGeneration || gameState.SuggestedGuestMaximum + 150 >= gameState.NumGuestsInPark) + bool difficultGeneration = (gameState.park.Flags & PARK_FLAGS_DIFFICULT_GUEST_GENERATION) != 0; + if (!difficultGeneration || gameState.suggestedGuestMaximum + 150 >= gameState.numGuestsInPark) { GenerateGuest(); } } // Extra guests generated by advertising campaigns - for (const auto& campaign : gameState.MarketingCampaigns) + for (const auto& campaign : gameState.marketingCampaigns) { // Random chance of guest generation auto probability = MarketingGetCampaignGuestGenerationProbability(campaign.Type); @@ -277,21 +276,21 @@ namespace OpenRCT2::Park void Initialise(GameState_t& gameState) { - gameState.Park.Name = LanguageGetString(STR_UNNAMED_PARK); - gameState.PluginStorage = {}; - gameState.StaffHandymanColour = COLOUR_BRIGHT_RED; - gameState.StaffMechanicColour = COLOUR_LIGHT_BLUE; - gameState.StaffSecurityColour = COLOUR_YELLOW; - gameState.NumGuestsInPark = 0; - gameState.NumGuestsInParkLastWeek = 0; - gameState.NumGuestsHeadingForPark = 0; - gameState.GuestChangeModifier = 0; - gameState.Park.Rating = 0; - gameState.GuestGenerationProbability = 0; - gameState.TotalRideValueForMoney = 0; - gameState.SuggestedGuestMaximum = 0; - gameState.ResearchLastItem = std::nullopt; - gameState.MarketingCampaigns.clear(); + gameState.park.Name = LanguageGetString(STR_UNNAMED_PARK); + gameState.pluginStorage = {}; + gameState.staffHandymanColour = COLOUR_BRIGHT_RED; + gameState.staffMechanicColour = COLOUR_LIGHT_BLUE; + gameState.staffSecurityColour = COLOUR_YELLOW; + gameState.numGuestsInPark = 0; + gameState.numGuestsInParkLastWeek = 0; + gameState.numGuestsHeadingForPark = 0; + gameState.guestChangeModifier = 0; + gameState.park.Rating = 0; + gameState.guestGenerationProbability = 0; + gameState.totalRideValueForMoney = 0; + gameState.suggestedGuestMaximum = 0; + gameState.researchLastItem = std::nullopt; + gameState.marketingCampaigns.clear(); ResearchResetItems(gameState); FinanceInit(); @@ -300,32 +299,32 @@ namespace OpenRCT2::Park SetAllSceneryItemsInvented(); - gameState.Park.EntranceFee = 10.00_GBP; + gameState.park.EntranceFee = 10.00_GBP; - gameState.PeepSpawns.clear(); + gameState.peepSpawns.clear(); ParkEntranceReset(); - gameState.ResearchPriorities = EnumsToFlags( + gameState.researchPriorities = EnumsToFlags( ResearchCategory::Transport, ResearchCategory::Gentle, ResearchCategory::Rollercoaster, ResearchCategory::Thrill, ResearchCategory::Water, ResearchCategory::Shop, ResearchCategory::SceneryGroup); - gameState.ResearchFundingLevel = RESEARCH_FUNDING_NORMAL; + gameState.researchFundingLevel = RESEARCH_FUNDING_NORMAL; - gameState.GuestInitialCash = 50.00_GBP; - gameState.GuestInitialHappiness = Park::CalculateGuestInitialHappiness(50); - gameState.GuestInitialHunger = 200; - gameState.GuestInitialThirst = 200; - gameState.ScenarioObjective.Type = OBJECTIVE_GUESTS_BY; - gameState.ScenarioObjective.Year = 4; - gameState.ScenarioObjective.NumGuests = 1000; - gameState.LandPrice = 90.00_GBP; - gameState.ConstructionRightsPrice = 40.00_GBP; - gameState.Park.Flags = PARK_FLAGS_NO_MONEY | PARK_FLAGS_SHOW_REAL_GUEST_NAMES; + gameState.guestInitialCash = 50.00_GBP; + gameState.guestInitialHappiness = Park::CalculateGuestInitialHappiness(50); + gameState.guestInitialHunger = 200; + gameState.guestInitialThirst = 200; + gameState.scenarioObjective.Type = OBJECTIVE_GUESTS_BY; + gameState.scenarioObjective.Year = 4; + gameState.scenarioObjective.NumGuests = 1000; + gameState.landPrice = 90.00_GBP; + gameState.constructionRightsPrice = 40.00_GBP; + gameState.park.Flags = PARK_FLAGS_NO_MONEY | PARK_FLAGS_SHOW_REAL_GUEST_NAMES; ResetHistories(gameState); FinanceResetHistory(); AwardReset(); - gameState.ScenarioName.clear(); - gameState.ScenarioDetails = String::toStd(LanguageGetString(STR_NO_DETAILS_YET)); + gameState.scenarioName.clear(); + gameState.scenarioDetails = String::toStd(LanguageGetString(STR_NO_DETAILS_YET)); } void Update(GameState_t& gameState, const Date& date) @@ -338,18 +337,18 @@ namespace OpenRCT2::Park UpdateHistories(gameState); } - const auto currentTicks = gameState.CurrentTicks; + const auto currentTicks = gameState.currentTicks; auto* windowMgr = Ui::GetWindowManager(); // Every ~13 seconds if (currentTicks % 512 == 0) { - gameState.Park.Rating = CalculateParkRating(); - gameState.Park.Value = Park::CalculateParkValue(); - gameState.CompanyValue = CalculateCompanyValue(); - gameState.TotalRideValueForMoney = calculateTotalRideValueForMoney(); - gameState.SuggestedGuestMaximum = calculateSuggestedMaxGuests(); - gameState.GuestGenerationProbability = calculateGuestGenerationProbability(); + gameState.park.Rating = CalculateParkRating(); + gameState.park.Value = Park::CalculateParkValue(); + gameState.companyValue = CalculateCompanyValue(); + gameState.totalRideValueForMoney = calculateTotalRideValueForMoney(); + gameState.suggestedGuestMaximum = calculateSuggestedMaxGuests(); + gameState.guestGenerationProbability = calculateGuestGenerationProbability(); windowMgr->InvalidateByClass(WindowClass::Finances); auto intent = Intent(INTENT_ACTION_UPDATE_PARK_RATING); @@ -359,7 +358,7 @@ namespace OpenRCT2::Park // Every ~102 seconds if (currentTicks % 4096 == 0) { - gameState.Park.Size = CalculateParkSize(); + gameState.park.Size = CalculateParkSize(); windowMgr->InvalidateByClass(WindowClass::ParkInformation); } @@ -382,10 +381,10 @@ namespace OpenRCT2::Park } } while (TileElementIteratorNext(&it)); - auto& gameState = GetGameState(); - if (tiles != gameState.Park.Size) + auto& gameState = getGameState(); + if (tiles != gameState.park.Size) { - gameState.Park.Size = tiles; + gameState.park.Size = tiles; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::ParkInformation); } @@ -395,15 +394,15 @@ namespace OpenRCT2::Park int32_t CalculateParkRating() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); - if (gameState.Cheats.forcedParkRating != kForcedParkRatingDisabled) + if (gameState.cheats.forcedParkRating != kForcedParkRatingDisabled) { - return gameState.Cheats.forcedParkRating; + return gameState.cheats.forcedParkRating; } int32_t result = 1150; - if (gameState.Park.Flags & PARK_FLAGS_DIFFICULT_PARK_RATING) + if (gameState.park.Flags & PARK_FLAGS_DIFFICULT_PARK_RATING) { result = 1050; } @@ -411,7 +410,7 @@ namespace OpenRCT2::Park // Guests { // -150 to +3 based on a range of guests from 0 to 2000 - result -= 150 - (std::min(2000, gameState.NumGuestsInPark) / 13); + result -= 150 - (std::min(2000, gameState.numGuestsInPark) / 13); // Find the number of happy peeps and the number of peeps who can't find the park exit uint32_t happyGuestCount = 0; @@ -433,9 +432,9 @@ namespace OpenRCT2::Park // Peep happiness -500 to +0 result -= 500; - if (gameState.NumGuestsInPark > 0) + if (gameState.numGuestsInPark > 0) { - result += 2 * std::min(250u, (happyGuestCount * 300) / gameState.NumGuestsInPark); + result += 2 * std::min(250u, (happyGuestCount * 300) / gameState.numGuestsInPark); } // Up to 25 guests can be lost without affecting the park rating. @@ -506,7 +505,7 @@ namespace OpenRCT2::Park result -= 600 - (4 * (150 - std::min(150, litterCount))); } - result -= gameState.Park.RatingCasualtyPenalty; + result -= gameState.park.RatingCasualtyPenalty; result = std::clamp(result, 0, 999); return result; } @@ -521,16 +520,16 @@ namespace OpenRCT2::Park } // +7.00 per guest - result += static_cast(GetGameState().NumGuestsInPark) * 7.00_GBP; + result += static_cast(getGameState().numGuestsInPark) * 7.00_GBP; return result; } money64 CalculateCompanyValue() { - const auto& gameState = GetGameState(); + const auto& gameState = getGameState(); - auto result = gameState.Park.Value - gameState.BankLoan; + auto result = gameState.park.Value - gameState.bankLoan; // Clamp addition to prevent overflow result = AddClamp(result, FinanceGetCurrentCash()); @@ -585,16 +584,16 @@ namespace OpenRCT2::Park void ResetHistories(GameState_t& gameState) { std::fill( - std::begin(gameState.Park.RatingHistory), std::end(gameState.Park.RatingHistory), kParkRatingHistoryUndefined); + std::begin(gameState.park.RatingHistory), std::end(gameState.park.RatingHistory), kParkRatingHistoryUndefined); std::fill( - std::begin(gameState.GuestsInParkHistory), std::end(gameState.GuestsInParkHistory), kGuestsInParkHistoryUndefined); + std::begin(gameState.guestsInParkHistory), std::end(gameState.guestsInParkHistory), kGuestsInParkHistoryUndefined); } void UpdateHistories(GameState_t& gameState) { uint8_t guestChangeModifier = 1; - int32_t changeInGuestsInPark = static_cast(gameState.NumGuestsInPark) - - static_cast(gameState.NumGuestsInParkLastWeek); + int32_t changeInGuestsInPark = static_cast(gameState.numGuestsInPark) + - static_cast(gameState.numGuestsInParkLastWeek); if (changeInGuestsInPark > -20) { guestChangeModifier++; @@ -603,32 +602,32 @@ namespace OpenRCT2::Park guestChangeModifier = 0; } } - gameState.GuestChangeModifier = guestChangeModifier; - gameState.NumGuestsInParkLastWeek = gameState.NumGuestsInPark; + gameState.guestChangeModifier = guestChangeModifier; + gameState.numGuestsInParkLastWeek = gameState.numGuestsInPark; // Update park rating, guests in park and current cash history constexpr auto ratingHistorySize = std::extent_v; - HistoryPushRecord(gameState.Park.RatingHistory, gameState.Park.Rating); - constexpr auto numGuestsHistorySize = std::extent_v; - HistoryPushRecord(gameState.GuestsInParkHistory, gameState.NumGuestsInPark); + HistoryPushRecord(gameState.park.RatingHistory, gameState.park.Rating); + constexpr auto numGuestsHistorySize = std::extent_v; + HistoryPushRecord(gameState.guestsInParkHistory, gameState.numGuestsInPark); - constexpr auto cashHistorySize = std::extent_v; - HistoryPushRecord(gameState.CashHistory, FinanceGetCurrentCash() - gameState.BankLoan); + constexpr auto cashHistorySize = std::extent_v; + HistoryPushRecord(gameState.cashHistory, FinanceGetCurrentCash() - gameState.bankLoan); // Update weekly profit history - auto currentWeeklyProfit = gameState.WeeklyProfitAverageDividend; - if (gameState.WeeklyProfitAverageDivisor != 0) + auto currentWeeklyProfit = gameState.weeklyProfitAverageDividend; + if (gameState.weeklyProfitAverageDivisor != 0) { - currentWeeklyProfit /= gameState.WeeklyProfitAverageDivisor; + currentWeeklyProfit /= gameState.weeklyProfitAverageDivisor; } - constexpr auto profitHistorySize = std::extent_v; - HistoryPushRecord(gameState.WeeklyProfitHistory, currentWeeklyProfit); - gameState.WeeklyProfitAverageDividend = 0; - gameState.WeeklyProfitAverageDivisor = 0; + constexpr auto profitHistorySize = std::extent_v; + HistoryPushRecord(gameState.weeklyProfitHistory, currentWeeklyProfit); + gameState.weeklyProfitAverageDividend = 0; + gameState.weeklyProfitAverageDivisor = 0; // Update park value history - constexpr auto parkValueHistorySize = std::extent_v; - HistoryPushRecord(gameState.Park.ValueHistory, gameState.Park.Value); + constexpr auto parkValueHistorySize = std::extent_v; + HistoryPushRecord(gameState.park.ValueHistory, gameState.park.Value); // Invalidate relevant windows auto intent = Intent(INTENT_ACTION_UPDATE_GUEST_COUNT); @@ -642,9 +641,9 @@ namespace OpenRCT2::Park uint32_t UpdateSize(GameState_t& gameState) { auto tiles = CalculateParkSize(); - if (tiles != gameState.Park.Size) + if (tiles != gameState.park.Size) { - gameState.Park.Size = tiles; + gameState.park.Size = tiles; auto* windowMgr = Ui::GetWindowManager(); windowMgr->InvalidateByClass(WindowClass::ParkInformation); @@ -739,9 +738,9 @@ namespace OpenRCT2::Park void SetForcedRating(int32_t rating) { - auto& gameState = GetGameState(); - gameState.Cheats.forcedParkRating = rating; - gameState.Park.Rating = CalculateParkRating(); + auto& gameState = getGameState(); + gameState.cheats.forcedParkRating = rating; + gameState.park.Rating = CalculateParkRating(); auto intent = Intent(INTENT_ACTION_UPDATE_PARK_RATING); ContextBroadcastIntent(&intent); @@ -749,13 +748,13 @@ namespace OpenRCT2::Park int32_t GetForcedRating() { - return GetGameState().Cheats.forcedParkRating; + return getGameState().cheats.forcedParkRating; } money64 GetEntranceFee() { - const auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_NO_MONEY) + const auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_NO_MONEY) { return 0; } @@ -763,17 +762,17 @@ namespace OpenRCT2::Park { return 0; } - return gameState.Park.EntranceFee; + return gameState.park.EntranceFee; } bool RidePricesUnlocked() { - const auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_UNLOCK_ALL_PRICES) + const auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_UNLOCK_ALL_PRICES) { return true; } - if (gameState.Park.Flags & PARK_FLAGS_PARK_FREE_ENTRY) + if (gameState.park.Flags & PARK_FLAGS_PARK_FREE_ENTRY) { return true; } @@ -782,12 +781,12 @@ namespace OpenRCT2::Park bool EntranceFeeUnlocked() { - const auto& gameState = GetGameState(); - if (gameState.Park.Flags & PARK_FLAGS_UNLOCK_ALL_PRICES) + const auto& gameState = getGameState(); + if (gameState.park.Flags & PARK_FLAGS_UNLOCK_ALL_PRICES) { return true; } - if (!(gameState.Park.Flags & PARK_FLAGS_PARK_FREE_ENTRY)) + if (!(gameState.park.Flags & PARK_FLAGS_PARK_FREE_ENTRY)) { return true; } diff --git a/src/openrct2/world/Park.h b/src/openrct2/world/Park.h index 7adab5dba8..a964e86fa0 100644 --- a/src/openrct2/world/Park.h +++ b/src/openrct2/world/Park.h @@ -10,9 +10,10 @@ #pragma once #include "../management/Finance.h" -#include "Map.h" +#include "Location.hpp" #include +#include constexpr auto kMaxEntranceFee = 999.00_GBP; diff --git a/src/openrct2/world/Scenery.cpp b/src/openrct2/world/Scenery.cpp index 1cbb9f3b47..456ed9ece4 100644 --- a/src/openrct2/world/Scenery.cpp +++ b/src/openrct2/world/Scenery.cpp @@ -33,9 +33,7 @@ #include "../object/SceneryGroupObject.h" #include "../object/SmallSceneryEntry.h" #include "../object/WallSceneryEntry.h" -#include "../scenario/Scenario.h" #include "Footpath.h" -#include "Map.h" #include "Park.h" #include "tile_element/PathElement.h" #include "tile_element/SmallSceneryElement.h" @@ -178,13 +176,13 @@ void SmallSceneryElement::UpdateAge(const CoordsXY& sceneryPos) return; } - auto& gameState = GetGameState(); - if (gameState.Cheats.disablePlantAging && sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_CAN_BE_WATERED)) + auto& gameState = getGameState(); + if (gameState.cheats.disablePlantAging && sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_CAN_BE_WATERED)) { return; } - if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_CAN_BE_WATERED) || WeatherIsDry(gameState.WeatherCurrent.weatherType) + if (!sceneryEntry->HasFlag(SMALL_SCENERY_FLAG_CAN_BE_WATERED) || WeatherIsDry(gameState.weatherCurrent.weatherType) || GetAge() < 5) { IncreaseAge(sceneryPos); @@ -304,13 +302,13 @@ void SceneryRemoveGhostToolPlacement() bool IsSceneryAvailableToBuild(const ScenerySelection& item) { // All scenery can be built when in the scenario editor - if (gScreenFlags & SCREEN_FLAGS_EDITOR) + if (isInEditorMode()) { return true; } - auto& gameState = GetGameState(); - if (!gameState.Cheats.ignoreResearchStatus) + auto& gameState = getGameState(); + if (!gameState.cheats.ignoreResearchStatus) { if (!SceneryIsInvented(item)) { @@ -318,7 +316,7 @@ bool IsSceneryAvailableToBuild(const ScenerySelection& item) } } - if (!gameState.Cheats.sandboxMode && !(gScreenFlags & SCREEN_FLAGS_EDITOR)) + if (!gameState.cheats.sandboxMode && !isInEditorMode()) { if (IsSceneryItemRestricted(item)) { @@ -369,38 +367,38 @@ static bool IsSceneryEntryValid(const ScenerySelection& item) bool IsSceneryItemRestricted(const ScenerySelection& item) { - auto& gameState = GetGameState(); - return std::find(std::begin(gameState.RestrictedScenery), std::end(gameState.RestrictedScenery), item) - != std::end(gameState.RestrictedScenery); + auto& gameState = getGameState(); + return std::find(std::begin(gameState.restrictedScenery), std::end(gameState.restrictedScenery), item) + != std::end(gameState.restrictedScenery); } void ClearRestrictedScenery() { - GetGameState().RestrictedScenery.clear(); + getGameState().restrictedScenery.clear(); } std::vector& GetRestrictedScenery() { - return GetGameState().RestrictedScenery; + return getGameState().restrictedScenery; } void SetSceneryItemRestricted(const ScenerySelection& item, bool on) { - auto& gameState = GetGameState(); - auto existingItem = std::find(std::begin(gameState.RestrictedScenery), std::end(gameState.RestrictedScenery), item); - const bool existingItemIsPresent = existingItem != std::end(gameState.RestrictedScenery); + auto& gameState = getGameState(); + auto existingItem = std::find(std::begin(gameState.restrictedScenery), std::end(gameState.restrictedScenery), item); + const bool existingItemIsPresent = existingItem != std::end(gameState.restrictedScenery); if (on) { if (!existingItemIsPresent) { - gameState.RestrictedScenery.push_back(item); + gameState.restrictedScenery.push_back(item); } } else { if (existingItemIsPresent) { - gameState.RestrictedScenery.erase(existingItem); + gameState.restrictedScenery.erase(existingItem); } } } @@ -524,14 +522,14 @@ static MiscScenery GetAllMiscScenery() void RestrictAllMiscScenery() { - auto& gameState = GetGameState(); + auto& gameState = getGameState(); auto miscScenery = GetAllMiscScenery().miscScenery; - gameState.RestrictedScenery.insert(gameState.RestrictedScenery.begin(), miscScenery.begin(), miscScenery.end()); + gameState.restrictedScenery.insert(gameState.restrictedScenery.begin(), miscScenery.begin(), miscScenery.end()); } static void MarkAllUnrestrictedSceneryInVectorInvented(const std::vector& vector) { - auto& restrictedScenery = GetGameState().RestrictedScenery; + auto& restrictedScenery = getGameState().restrictedScenery; for (const auto& sceneryItem : vector) { diff --git a/src/openrct2/world/TileInspector.cpp b/src/openrct2/world/TileInspector.cpp index 1ba81876df..833102d5c4 100644 --- a/src/openrct2/world/TileInspector.cpp +++ b/src/openrct2/world/TileInspector.cpp @@ -20,7 +20,6 @@ #include "Banner.h" #include "Footpath.h" #include "Location.hpp" -#include "Map.h" #include "MapAnimation.h" #include "Park.h" #include "Scenery.h" @@ -240,7 +239,7 @@ namespace OpenRCT2::TileInspector if (ride != nullptr) { auto stationIndex = tileElement->AsEntrance()->GetStationIndex(); - auto& station = ride->GetStation(stationIndex); + auto& station = ride->getStation(stationIndex); auto entrance = station.Entrance; auto exit = station.Exit; uint8_t entranceType = tileElement->AsEntrance()->GetEntranceType(); @@ -470,7 +469,7 @@ namespace OpenRCT2::TileInspector if (ride != nullptr) { auto entranceIndex = tileElement->AsEntrance()->GetStationIndex(); - auto& station = ride->GetStation(entranceIndex); + auto& station = ride->getStation(entranceIndex); const auto& entranceLoc = station.Entrance; const auto& exitLoc = station.Exit; uint8_t z = tileElement->BaseHeight; @@ -653,7 +652,7 @@ namespace OpenRCT2::TileInspector if (isExecuting) { auto stationIndex = entranceElement->AsEntrance()->GetStationIndex(); - auto& station = ride->GetStation(stationIndex); + auto& station = ride->getStation(stationIndex); switch (entranceElement->AsEntrance()->GetEntranceType()) { diff --git a/src/openrct2/world/TileInspector.h b/src/openrct2/world/TileInspector.h index dc34da7ab9..ff7687594f 100644 --- a/src/openrct2/world/TileInspector.h +++ b/src/openrct2/world/TileInspector.h @@ -9,9 +9,10 @@ #pragma once -#include "Map.h" +#include "Location.hpp" struct Banner; +struct TileElement; namespace OpenRCT2::GameActions { diff --git a/src/openrct2/world/map_generator/HeightMap.hpp b/src/openrct2/world/map_generator/HeightMap.hpp index 1ff4e86189..83bdaf62df 100644 --- a/src/openrct2/world/map_generator/HeightMap.hpp +++ b/src/openrct2/world/map_generator/HeightMap.hpp @@ -24,17 +24,27 @@ namespace OpenRCT2::World::MapGenerator std::vector _height; public: - const uint16_t width; - const uint16_t height; + uint16_t width{}; + uint16_t height{}; + uint8_t density{}; - HeightMap(int32_t tagetWidth, int32_t targetHeight) - : _height(tagetWidth * targetHeight) - , width(tagetWidth) + HeightMap(int32_t targetWidth, int32_t targetHeight) + : _height(targetWidth * targetHeight) + , width(targetWidth) , height(targetHeight) + , density(1) { } - HeightMap(const HeightMap& heightMap) = default; + HeightMap(int32_t baseWidth, int32_t baseHeight, uint8_t density_) + : _height((baseWidth * density_) * (baseHeight * density_)) + , width(baseWidth * density_) + , height(baseHeight * density_) + , density(density_) + { + } + + HeightMap() = default; uint8_t& operator[](TileCoordsXY pos) { @@ -48,6 +58,11 @@ namespace OpenRCT2::World::MapGenerator return _height[pos.y * width + pos.x]; } + void clear() + { + _height.clear(); + } + uint8_t* data() { return _height.data(); @@ -58,6 +73,11 @@ namespace OpenRCT2::World::MapGenerator return _height.data(); } + bool empty() const + { + return _height.empty(); + } + size_t size() const { return _height.size(); diff --git a/src/openrct2/world/map_generator/MapGen.cpp b/src/openrct2/world/map_generator/MapGen.cpp index 44c9fdc29e..e2ec3e227a 100644 --- a/src/openrct2/world/map_generator/MapGen.cpp +++ b/src/openrct2/world/map_generator/MapGen.cpp @@ -111,10 +111,10 @@ namespace OpenRCT2::World::MapGenerator */ void setWaterLevel(int32_t waterLevel) { - auto& gameState = GetGameState(); - for (int32_t y = 1; y < gameState.MapSize.y - 1; y++) + auto& gameState = getGameState(); + for (int32_t y = 1; y < gameState.mapSize.y - 1; y++) { - for (int32_t x = 1; x < gameState.MapSize.x - 1; x++) + for (int32_t x = 1; x < gameState.mapSize.x - 1; x++) { auto surfaceElement = MapGetSurfaceElementAt(TileCoordsXY{ x, y }); if (surfaceElement != nullptr && surfaceElement->BaseHeight < waterLevel) @@ -128,12 +128,12 @@ namespace OpenRCT2::World::MapGenerator */ void setMapHeight(Settings* settings, const HeightMap& heightMap) { - for (auto y = 1; y < heightMap.height / 2 - 1; y++) + for (auto y = 1; y < heightMap.height / heightMap.density - 1; y++) { - for (auto x = 1; x < heightMap.width / 2 - 1; x++) + for (auto x = 1; x < heightMap.width / heightMap.density - 1; x++) { - auto heightX = x * 2; - auto heightY = y * 2; + auto heightX = x * heightMap.density; + auto heightY = y * heightMap.density; uint8_t q00 = heightMap[{ heightX + 0, heightY + 0 }]; uint8_t q01 = heightMap[{ heightX + 0, heightY + 1 }]; diff --git a/src/openrct2/world/map_generator/PngTerrainGenerator.cpp b/src/openrct2/world/map_generator/PngTerrainGenerator.cpp index 31cd3096b2..84a6005c88 100644 --- a/src/openrct2/world/map_generator/PngTerrainGenerator.cpp +++ b/src/openrct2/world/map_generator/PngTerrainGenerator.cpp @@ -17,6 +17,7 @@ #include "../../localisation/StringIds.h" #include "../Map.h" #include "../tile_element/SurfaceElement.h" +#include "HeightMap.hpp" #include "MapGen.h" #include "MapHelpers.h" #include "SurfaceSelection.h" @@ -25,12 +26,7 @@ namespace OpenRCT2::World::MapGenerator { - static struct - { - uint32_t width = 0; - uint32_t height = 0; - std::vector mono_bitmap; - } _heightMapData; + static HeightMap _heightMapData{}; /** * Return the tile coordinate that matches the given pixel of a heightmap @@ -44,10 +40,10 @@ namespace OpenRCT2::World::MapGenerator bool LoadHeightmapImage(const utf8* path) { auto format = Imaging::GetImageFormatFromPath(path); - if (format == IMAGE_FORMAT::PNG) + if (format == ImageFormat::png) { // Promote to 32-bit - format = IMAGE_FORMAT::PNG_32; + format = ImageFormat::png32; } try @@ -61,9 +57,7 @@ namespace OpenRCT2::World::MapGenerator } // Allocate memory for the height map values, one byte pixel - _heightMapData.mono_bitmap.resize(width * height); - _heightMapData.width = width; - _heightMapData.height = height; + _heightMapData = HeightMap(width, height); // Copy average RGB value to mono bitmap constexpr auto numChannels = 4; @@ -76,7 +70,7 @@ namespace OpenRCT2::World::MapGenerator const auto red = pixels[x * numChannels + y * pitch]; const auto green = pixels[x * numChannels + y * pitch + 1]; const auto blue = pixels[x * numChannels + y * pitch + 2]; - _heightMapData.mono_bitmap[x + y * _heightMapData.width] = (red + green + blue) / 3; + _heightMapData[TileCoordsXY(x, y)] = (red + green + blue) / 3; } } return true; @@ -85,10 +79,10 @@ namespace OpenRCT2::World::MapGenerator { switch (format) { - case IMAGE_FORMAT::BITMAP: + case ImageFormat::bitmap: ContextShowError(STR_HEIGHT_MAP_ERROR, STR_ERROR_READING_BITMAP, {}); break; - case IMAGE_FORMAT::PNG_32: + case ImageFormat::png32: ContextShowError(STR_HEIGHT_MAP_ERROR, STR_ERROR_READING_PNG, {}); break; default: @@ -104,25 +98,23 @@ namespace OpenRCT2::World::MapGenerator */ void UnloadHeightmapImage() { - _heightMapData.mono_bitmap.clear(); - _heightMapData.width = 0; - _heightMapData.height = 0; + _heightMapData.clear(); } /** * Applies box blur to the surface N times */ - static void SmoothHeightmap(std::vector& src, int32_t strength) + static void SmoothHeightmap(HeightMap& src, int32_t strength) { // Create buffer to store one channel - std::vector dest(src.size()); + HeightMap temp{ src.width, src.height }; for (int32_t i = 0; i < strength; i++) { // Calculate box blur value to all pixels of the surface - for (uint32_t y = 0; y < _heightMapData.height; y++) + for (auto y = 0; y < temp.height; y++) { - for (uint32_t x = 0; x < _heightMapData.width; x++) + for (auto x = 0; x < temp.width; x++) { uint32_t heightSum = 0; @@ -133,23 +125,23 @@ namespace OpenRCT2::World::MapGenerator { // Clamp x and y so they stay within the image // This assumes the height map is not tiled, and increases the weight of the edges - const int32_t readX = std::clamp(x + offsetX, 0, _heightMapData.width - 1); - const int32_t readY = std::clamp(y + offsetY, 0, _heightMapData.height - 1); - heightSum += src[readX + readY * _heightMapData.width]; + const auto readX = std::clamp(x + offsetX, 0, temp.width - 1); + const auto readY = std::clamp(y + offsetY, 0, temp.height - 1); + heightSum += src[{ readX, readY }]; } } // Take average - dest[x + y * _heightMapData.width] = heightSum / 9; + temp[{ x, y }] = heightSum / 9; } } - // Now apply the blur to the source pixels - for (uint32_t y = 0; y < _heightMapData.height; y++) + // Now copy the blur to the source pixels + for (auto y = 0; y < temp.height; y++) { - for (uint32_t x = 0; x < _heightMapData.width; x++) + for (auto x = 0; x < temp.width; x++) { - src[x + y * _heightMapData.width] = dest[x + y * _heightMapData.width]; + src[{ x, y }] = temp[{ x, y }]; } } } @@ -157,15 +149,15 @@ namespace OpenRCT2::World::MapGenerator void GenerateFromHeightmapImage(Settings* settings) { - Guard::Assert(!_heightMapData.mono_bitmap.empty(), "No height map loaded"); + Guard::Assert(!_heightMapData.empty(), "No height map loaded"); Guard::Assert(settings->heightmapHigh != settings->heightmapLow, "Low and high setting cannot be the same"); // Make a copy of the original height map that we can edit - auto dest = _heightMapData.mono_bitmap; + HeightMap dest = _heightMapData; // Get technical map size, +2 for the black tiles around the map - auto maxWidth = static_cast(_heightMapData.width + 2); - auto maxHeight = static_cast(_heightMapData.height + 2); + auto maxWidth = static_cast(dest.width + 2); + auto maxHeight = static_cast(dest.height + 2); MapInit({ maxHeight, maxWidth }); if (settings->smooth_height_map) @@ -180,12 +172,12 @@ namespace OpenRCT2::World::MapGenerator { // Get highest and lowest pixel value maxValue = 0; - minValue = 0xff; - for (uint32_t y = 0; y < _heightMapData.height; y++) + minValue = 255; + for (auto y = 0; y < dest.height; y++) { - for (uint32_t x = 0; x < _heightMapData.width; x++) + for (auto x = 0; x < dest.width; x++) { - uint8_t value = dest[x + y * _heightMapData.width]; + uint8_t value = dest[{ x, y }]; maxValue = std::max(maxValue, value); minValue = std::min(minValue, value); } @@ -207,9 +199,9 @@ namespace OpenRCT2::World::MapGenerator const uint8_t rangeIn = maxValue - minValue; const uint8_t rangeOut = (settings->heightmapHigh - settings->heightmapLow) * 2; - for (uint32_t y = 0; y < _heightMapData.height; y++) + for (auto y = 0; y < dest.height; y++) { - for (uint32_t x = 0; x < _heightMapData.width; x++) + for (auto x = 0; x < dest.width; x++) { // The x and y axis are flipped in the world, so this uses y for x and x for y. auto tileCoords = HeightmapCoordToTileCoordsXY(x, y); @@ -218,7 +210,7 @@ namespace OpenRCT2::World::MapGenerator continue; // Read value from bitmap, and convert its range - uint8_t value = dest[x + y * _heightMapData.width]; + uint8_t value = dest[{ x, y }]; value = static_cast(static_cast(value - minValue) / rangeIn * rangeOut) + (settings->heightmapLow * 2); surfaceElement->BaseHeight = value; @@ -247,9 +239,9 @@ namespace OpenRCT2::World::MapGenerator while (true) { uint32_t numTilesChanged = 0; - for (uint32_t y = 0; y < _heightMapData.height; y++) + for (auto y = 0; y < dest.height; y++) { - for (uint32_t x = 0; x < _heightMapData.width; x++) + for (auto x = 0; x < dest.width; x++) { auto tileCoords = HeightmapCoordToTileCoordsXY(x, y); numTilesChanged += TileSmooth(tileCoords); diff --git a/src/openrct2/world/map_generator/SimplexNoise.cpp b/src/openrct2/world/map_generator/SimplexNoise.cpp index e65273feb9..a03890130d 100644 --- a/src/openrct2/world/map_generator/SimplexNoise.cpp +++ b/src/openrct2/world/map_generator/SimplexNoise.cpp @@ -204,8 +204,9 @@ namespace OpenRCT2::World::MapGenerator resetSurfaces(settings); // Create the temporary height map and initialise - auto& mapSize = settings->mapSize; - auto heightMap = HeightMap(mapSize.x * 2, mapSize.y * 2); + const auto& mapSize = settings->mapSize; + const auto density = 2; + auto heightMap = HeightMap(mapSize.x, mapSize.y, density); generateSimplexNoise(settings, heightMap); smoothHeightMap(2 + (UtilRand() % 6), heightMap); diff --git a/src/openrct2/world/map_generator/SurfaceSelection.cpp b/src/openrct2/world/map_generator/SurfaceSelection.cpp index 723b62f696..109b770524 100644 --- a/src/openrct2/world/map_generator/SurfaceSelection.cpp +++ b/src/openrct2/world/map_generator/SurfaceSelection.cpp @@ -63,7 +63,7 @@ namespace OpenRCT2::World::MapGenerator if (edgeTexture.empty()) { - auto surfaceObject = objectManager.GetLoadedObject(ObjectType::terrainSurface, surfaceTextureId); + auto surfaceObject = objectManager.GetLoadedObject(surfaceTextureId); auto surfaceTexture = surfaceObject->GetIdentifier(); // Base edge type on surface type diff --git a/src/openrct2/world/map_generator/TreePlacement.cpp b/src/openrct2/world/map_generator/TreePlacement.cpp index 47f5ec1632..b87417c07c 100644 --- a/src/openrct2/world/map_generator/TreePlacement.cpp +++ b/src/openrct2/world/map_generator/TreePlacement.cpp @@ -150,10 +150,10 @@ namespace OpenRCT2::World::MapGenerator // Randomise simplex noise NoiseRand(); - auto& gameState = GetGameState(); - for (int32_t y = 1; y < gameState.MapSize.y - 1; y++) + auto& gameState = getGameState(); + for (int32_t y = 1; y < gameState.mapSize.y - 1; y++) { - for (int32_t x = 1; x < gameState.MapSize.x - 1; x++) + for (int32_t x = 1; x < gameState.mapSize.x - 1; x++) { auto pos = CoordsXY{ x, y } * kCoordsXYStep; auto* surfaceElement = MapGetSurfaceElementAt(pos); @@ -185,9 +185,9 @@ namespace OpenRCT2::World::MapGenerator const auto offset = CoordsXY{ offsetX * kCoordsXYStep, offsetY * kCoordsXYStep }; auto neighbourPos = pos + offset; neighbourPos.x = std::clamp( - neighbourPos.x, kCoordsXYStep, kCoordsXYStep * (gameState.MapSize.x - 1)); + neighbourPos.x, kCoordsXYStep, kCoordsXYStep * (gameState.mapSize.x - 1)); neighbourPos.y = std::clamp( - neighbourPos.y, kCoordsXYStep, kCoordsXYStep * (gameState.MapSize.y - 1)); + neighbourPos.y, kCoordsXYStep, kCoordsXYStep * (gameState.mapSize.y - 1)); const auto neighboutSurface = MapGetSurfaceElementAt(neighbourPos); if (neighboutSurface != nullptr && neighboutSurface->GetWaterHeight() > 0) diff --git a/src/openrct2/world/tile_element/SurfaceElement.cpp b/src/openrct2/world/tile_element/SurfaceElement.cpp index b15ab422e8..097482f0c5 100644 --- a/src/openrct2/world/tile_element/SurfaceElement.cpp +++ b/src/openrct2/world/tile_element/SurfaceElement.cpp @@ -64,11 +64,10 @@ bool SurfaceElement::CanGrassGrow() const { auto surfaceStyle = GetSurfaceObjectIndex(); auto& objMgr = OpenRCT2::GetContext()->GetObjectManager(); - auto obj = objMgr.GetLoadedObject(ObjectType::terrainSurface, surfaceStyle); - if (obj != nullptr) + const auto* surfaceObject = objMgr.GetLoadedObject(surfaceStyle); + if (surfaceObject != nullptr) { - const auto* surfaceObject = static_cast(obj); - if (surfaceObject->Flags & TERRAIN_SURFACE_FLAGS::CAN_GROW) + if (surfaceObject->Flags & TerrainSurfaceFlags::canGrow) { return true; } diff --git a/src/openrct2/world/tile_element/TrackElement.cpp b/src/openrct2/world/tile_element/TrackElement.cpp index 9dfe8a1e50..1bb21b422f 100644 --- a/src/openrct2/world/tile_element/TrackElement.cpp +++ b/src/openrct2/world/tile_element/TrackElement.cpp @@ -64,7 +64,7 @@ bool TrackElement::IsStation() const uint8_t TrackElement::GetSeatRotation() const { const auto* ride = GetRide(GetRideIndex()); - if (ride != nullptr && ride->GetRideTypeDescriptor().HasFlag(RtdFlag::hasLandscapeDoors)) + if (ride != nullptr && ride->getRideTypeDescriptor().HasFlag(RtdFlag::hasLandscapeDoors)) return DEFAULT_SEAT_ROTATION; return URide.ColourScheme >> 4; @@ -252,7 +252,7 @@ void TrackElement::SetBrakeClosed(bool isClosed) bool TrackElement::IsIndestructible() const { - return (Flags2 & TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE) != 0 && !GetGameState().Cheats.makeAllDestructible; + return (Flags2 & TRACK_ELEMENT_FLAGS2_INDESTRUCTIBLE_TRACK_PIECE) != 0 && !getGameState().cheats.makeAllDestructible; } void TrackElement::SetIsIndestructible(bool isIndestructible) diff --git a/src/thirdparty/sfl/compact_vector.hpp b/src/thirdparty/sfl/compact_vector.hpp new file mode 100644 index 0000000000..0d87d94d7f --- /dev/null +++ b/src/thirdparty/sfl/compact_vector.hpp @@ -0,0 +1,1795 @@ +// +// Copyright (c) 2022 Slaven Falandys +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef SFL_COMPACT_VECTOR_HPP_INCLUDED +#define SFL_COMPACT_VECTOR_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include // copy, move, swap, swap_ranges +#include // initializer_list +#include // distance, next, reverse_iterator +#include // numeric_limits +#include // allocator, allocator_traits, pointer_traits +#include // is_same, is_nothrow_xxxxx +#include // forward, move, pair + +namespace sfl +{ + +template > +class compact_vector +{ +public: + + using allocator_type = Allocator; + using allocator_traits = std::allocator_traits; + using value_type = T; + using size_type = typename allocator_traits::size_type; + using difference_type = typename allocator_traits::difference_type; + using reference = T&; + using const_reference = const T&; + using pointer = typename allocator_traits::pointer; + using const_pointer = typename allocator_traits::const_pointer; + using iterator = sfl::dtl::normal_iterator; + using const_iterator = sfl::dtl::normal_iterator; + using reverse_iterator = std::reverse_iterator; + using const_reverse_iterator = std::reverse_iterator; + + static_assert + ( + std::is_same::value, + "Allocator::value_type must be same as sfl::compact_vector::value_type." + ); + +private: + + class data_base + { + public: + + pointer first_; + pointer last_; + + data_base() noexcept + : first_(nullptr) + , last_(nullptr) + {} + }; + + class data : public data_base , public allocator_type + { + public: + + data() noexcept(std::is_nothrow_default_constructible::value) + : allocator_type() + {} + + data(const allocator_type& alloc) noexcept(std::is_nothrow_copy_constructible::value) + : allocator_type(alloc) + {} + + data(allocator_type&& other) noexcept(std::is_nothrow_move_constructible::value) + : allocator_type(std::move(other)) + {} + + allocator_type& ref_to_alloc() noexcept + { + return *this; + } + + const allocator_type& ref_to_alloc() const noexcept + { + return *this; + } + }; + + data data_; + +public: + + // + // ---- CONSTRUCTION AND DESTRUCTION -------------------------------------- + // + + compact_vector() noexcept + ( + std::is_nothrow_default_constructible::value + ) + : data_() + {} + + explicit compact_vector(const Allocator& alloc) noexcept + ( + std::is_nothrow_copy_constructible::value + ) + : data_(alloc) + {} + + explicit compact_vector(size_type n) + : data_() + { + initialize_default_n(n); + } + + explicit compact_vector(size_type n, const Allocator& alloc) + : data_(alloc) + { + initialize_default_n(n); + } + + compact_vector(size_type n, const T& value) + : data_() + { + initialize_fill_n(n, value); + } + + compact_vector(size_type n, const T& value, const Allocator& alloc) + : data_(alloc) + { + initialize_fill_n(n, value); + } + + template ::value>* = nullptr> + compact_vector(InputIt first, InputIt last) + : data_() + { + initialize_range(first, last); + } + + template ::value>* = nullptr> + compact_vector(InputIt first, InputIt last, const Allocator& alloc) + : data_(alloc) + { + initialize_range(first, last); + } + + compact_vector(std::initializer_list ilist) + : compact_vector(ilist.begin(), ilist.end()) + {} + + compact_vector(std::initializer_list ilist, const Allocator& alloc) + : compact_vector(ilist.begin(), ilist.end(), alloc) + {} + + compact_vector(const compact_vector& other) + : data_ + ( + allocator_traits::select_on_container_copy_construction + ( + other.data_.ref_to_alloc() + ) + ) + { + initialize_copy(other); + } + + compact_vector(const compact_vector& other, const Allocator& alloc) + : data_(alloc) + { + initialize_copy(other); + } + + compact_vector(compact_vector&& other) + : data_(std::move(other.data_.ref_to_alloc())) + { + initialize_move(other); + } + + compact_vector(compact_vector&& other, const Allocator& alloc) + : data_(alloc) + { + initialize_move(other); + } + +#if SFL_CPP_VERSION >= SFL_CPP_20 + + template Range> + compact_vector(sfl::from_range_t, Range&& range) + : data_() + { + initialize_range(std::forward(range)); + } + + template Range> + compact_vector(sfl::from_range_t, Range&& range, const Allocator& alloc) + : data_(alloc) + { + initialize_range(std::forward(range)); + } + +#else // before C++20 + + template + compact_vector(sfl::from_range_t, Range&& range) + : data_() + { + initialize_range(std::forward(range)); + } + + template + compact_vector(sfl::from_range_t, Range&& range, const Allocator& alloc) + : data_(alloc) + { + initialize_range(std::forward(range)); + } + +#endif // before C++20 + + ~compact_vector() + { + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ - data_.first_ + ); + } + + // + // ---- ASSIGNMENT -------------------------------------------------------- + // + + void assign(size_type n, const T& value) + { + assign_fill_n(n, value); + } + + template ::value>* = nullptr> + void assign(InputIt first, InputIt last) + { + assign_range(first, last); + } + + void assign(std::initializer_list ilist) + { + assign_range(ilist.begin(), ilist.end()); + } + +#if SFL_CPP_VERSION >= SFL_CPP_20 + + template Range> + void assign_range(Range&& range) + { + if constexpr (std::ranges::forward_range) + { + assign_range(std::ranges::begin(range), std::ranges::end(range), std::forward_iterator_tag()); + } + else + { + assign_range(std::ranges::begin(range), std::ranges::end(range), std::input_iterator_tag()); + } + } + +#else // before C++20 + + template + void assign_range(Range&& range) + { + using std::begin; + using std::end; + assign_range(begin(range), end(range)); + } + +#endif // before C++20 + + compact_vector& operator=(const compact_vector& other) + { + assign_copy(other); + return *this; + } + + compact_vector& operator=(compact_vector&& other) + { + assign_move(other); + return *this; + } + + compact_vector& operator=(std::initializer_list ilist) + { + assign_range(ilist.begin(), ilist.end()); + return *this; + } + + // + // ---- ALLOCATOR --------------------------------------------------------- + // + + SFL_NODISCARD + allocator_type get_allocator() const noexcept + { + return data_.ref_to_alloc(); + } + + // + // ---- ITERATORS --------------------------------------------------------- + // + + SFL_NODISCARD + iterator begin() noexcept + { + return iterator(data_.first_); + } + + SFL_NODISCARD + const_iterator begin() const noexcept + { + return const_iterator(data_.first_); + } + + SFL_NODISCARD + const_iterator cbegin() const noexcept + { + return const_iterator(data_.first_); + } + + SFL_NODISCARD + iterator end() noexcept + { + return iterator(data_.last_); + } + + SFL_NODISCARD + const_iterator end() const noexcept + { + return const_iterator(data_.last_); + } + + SFL_NODISCARD + const_iterator cend() const noexcept + { + return const_iterator(data_.last_); + } + + SFL_NODISCARD + reverse_iterator rbegin() noexcept + { + return reverse_iterator(end()); + } + + SFL_NODISCARD + const_reverse_iterator rbegin() const noexcept + { + return const_reverse_iterator(end()); + } + + SFL_NODISCARD + const_reverse_iterator crbegin() const noexcept + { + return const_reverse_iterator(end()); + } + + SFL_NODISCARD + reverse_iterator rend() noexcept + { + return reverse_iterator(begin()); + } + + SFL_NODISCARD + const_reverse_iterator rend() const noexcept + { + return const_reverse_iterator(begin()); + } + + SFL_NODISCARD + const_reverse_iterator crend() const noexcept + { + return const_reverse_iterator(begin()); + } + + SFL_NODISCARD + iterator nth(size_type pos) noexcept + { + SFL_ASSERT(pos <= size()); + return iterator(data_.first_ + pos); + } + + SFL_NODISCARD + const_iterator nth(size_type pos) const noexcept + { + SFL_ASSERT(pos <= size()); + return const_iterator(data_.first_ + pos); + } + + SFL_NODISCARD + size_type index_of(const_iterator pos) const noexcept + { + SFL_ASSERT(cbegin() <= pos && pos <= cend()); + return std::distance(cbegin(), pos); + } + + // + // ---- SIZE AND CAPACITY ------------------------------------------------- + // + + SFL_NODISCARD + bool empty() const noexcept + { + return data_.first_ == data_.last_; + } + + SFL_NODISCARD + size_type size() const noexcept + { + return std::distance(data_.first_, data_.last_); + } + + SFL_NODISCARD + size_type max_size() const noexcept + { + return std::min + ( + allocator_traits::max_size(data_.ref_to_alloc()), + std::numeric_limits::max() / sizeof(value_type) + ); + } + + SFL_NODISCARD + size_type capacity() const noexcept + { + return size(); + } + + SFL_NODISCARD + size_type available() const noexcept + { + return 0; + } + + // + // ---- ELEMENT ACCESS ---------------------------------------------------- + // + + SFL_NODISCARD + reference at(size_type pos) + { + if (pos >= size()) + { + sfl::dtl::throw_out_of_range("sfl::compact_vector::at"); + } + + return *(data_.first_ + pos); + } + + SFL_NODISCARD + const_reference at(size_type pos) const + { + if (pos >= size()) + { + sfl::dtl::throw_out_of_range("sfl::compact_vector::at"); + } + + return *(data_.first_ + pos); + } + + SFL_NODISCARD + reference operator[](size_type pos) noexcept + { + SFL_ASSERT(pos < size()); + return *(data_.first_ + pos); + } + + SFL_NODISCARD + const_reference operator[](size_type pos) const noexcept + { + SFL_ASSERT(pos < size()); + return *(data_.first_ + pos); + } + + SFL_NODISCARD + reference front() noexcept + { + SFL_ASSERT(!empty()); + return *data_.first_; + } + + SFL_NODISCARD + const_reference front() const noexcept + { + SFL_ASSERT(!empty()); + return *data_.first_; + } + + SFL_NODISCARD + reference back() noexcept + { + SFL_ASSERT(!empty()); + return *(data_.last_ - 1); + } + + SFL_NODISCARD + const_reference back() const noexcept + { + SFL_ASSERT(!empty()); + return *(data_.last_ - 1); + } + + SFL_NODISCARD + T* data() noexcept + { + return sfl::dtl::to_address(data_.first_); + } + + SFL_NODISCARD + const T* data() const noexcept + { + return sfl::dtl::to_address(data_.first_); + } + + // + // ---- MODIFIERS --------------------------------------------------------- + // + + void clear() noexcept + { + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ - data_.first_ + ); + + data_.first_ = nullptr; + data_.last_ = nullptr; + } + + template + iterator emplace(const_iterator pos, Args&&... args) + { + SFL_ASSERT(cbegin() <= pos && pos <= cend()); + + const difference_type offset = std::distance(cbegin(), pos); + + const size_type new_size = size() + 1; + + if (new_size < size() || new_size > max_size()) + { + sfl::dtl::throw_length_error("sfl::compact_vector::emplace"); + } + + pointer new_first = sfl::dtl::allocate(data_.ref_to_alloc(), new_size); + pointer new_last = new_first; + + SFL_TRY + { + // The order of operations is critical. First we will construct + // new element in new storage because arguments `args...` can + // contain reference to element in this container and after + // that we will move elements from old to new storage. + + sfl::dtl::construct_at_a + ( + data_.ref_to_alloc(), + new_first + offset, + std::forward(args)... + ); + + new_last = nullptr; + + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.first_ + offset, + new_first + ); + + ++new_last; + + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_ + offset, + data_.last_, + new_last + ); + } + SFL_CATCH (...) + { + if (new_last == nullptr) + { + sfl::dtl::destroy_at_a + ( + data_.ref_to_alloc(), + new_first + offset + ); + } + else + { + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + new_first, + new_last + ); + } + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + new_first, + new_size + ); + + SFL_RETHROW; + } + + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ - data_.first_ + ); + + data_.first_ = new_first; + data_.last_ = new_last; + + return begin() + offset; + } + + iterator insert(const_iterator pos, const T& value) + { + SFL_ASSERT(cbegin() <= pos && pos <= cend()); + return emplace(pos, value); + } + + iterator insert(const_iterator pos, T&& value) + { + SFL_ASSERT(cbegin() <= pos && pos <= cend()); + return emplace(pos, std::move(value)); + } + + iterator insert(const_iterator pos, size_type n, const T& value) + { + SFL_ASSERT(cbegin() <= pos && pos <= cend()); + return insert_fill_n(pos, n, value); + } + + template ::value>* = nullptr> + iterator insert(const_iterator pos, InputIt first, InputIt last) + { + SFL_ASSERT(cbegin() <= pos && pos <= cend()); + return insert_range(pos, first, last); + } + + iterator insert(const_iterator pos, std::initializer_list ilist) + { + SFL_ASSERT(cbegin() <= pos && pos <= cend()); + return insert_range(pos, ilist.begin(), ilist.end()); + } + +#if SFL_CPP_VERSION >= SFL_CPP_20 + + template Range> + iterator insert_range(const_iterator pos, Range&& range) + { + SFL_ASSERT(cbegin() <= pos && pos <= cend()); + if constexpr (std::ranges::forward_range) + { + return insert_range(pos, std::ranges::begin(range), std::ranges::end(range), std::forward_iterator_tag()); + } + else + { + return insert_range(pos, std::ranges::begin(range), std::ranges::end(range), std::input_iterator_tag()); + } + } + +#else // before C++20 + + template + iterator insert_range(const_iterator pos, Range&& range) + { + SFL_ASSERT(cbegin() <= pos && pos <= cend()); + using std::begin; + using std::end; + return insert_range(pos, begin(range), end(range)); + } + +#endif // before C++20 + + template + reference emplace_back(Args&&... args) + { + return *emplace(cend(), std::forward(args)...); + } + + void push_back(const T& value) + { + emplace(cend(), value); + } + + void push_back(T&& value) + { + emplace(cend(), std::move(value)); + } + +#if SFL_CPP_VERSION >= SFL_CPP_20 + + template Range> + void append_range(Range&& range) + { + insert_range(end(), std::forward(range)); + } + +#else // before C++20 + + template + void append_range(Range&& range) + { + insert_range(end(), std::forward(range)); + } + +#endif // before C++20 + + void pop_back() + { + SFL_ASSERT(!empty()); + erase(const_iterator(data_.last_ - 1)); + } + + iterator erase(const_iterator pos) + { + SFL_ASSERT(cbegin() <= pos && pos < cend()); + return erase(pos, pos + 1); + } + + iterator erase(const_iterator first, const_iterator last) + { + SFL_ASSERT(cbegin() <= first && first <= last && last <= cend()); + + if (first == last) + { + return begin() + std::distance(cbegin(), first); + } + + const difference_type offset1 = std::distance(cbegin(), first); + const difference_type offset2 = std::distance(cbegin(), last); + + const size_type new_size = size() - std::distance(first, last); + + pointer new_first = sfl::dtl::allocate(data_.ref_to_alloc(), new_size); + pointer new_last = new_first; + + SFL_TRY + { + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.first_ + offset1, + new_first + ); + + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_ + offset2, + data_.last_, + new_last + ); + } + SFL_CATCH (...) + { + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + new_first, + new_last + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + new_first, + new_size + ); + + SFL_RETHROW; + } + + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ - data_.first_ + ); + + data_.first_ = new_first; + data_.last_ = new_last; + + return begin() + offset1; + } + + void resize(size_type n) + { + if (n == size()) + { + return; + } + + if (n > max_size()) + { + sfl::dtl::throw_length_error("sfl::compact_vector::resize"); + } + + pointer new_first = sfl::dtl::allocate(data_.ref_to_alloc(), n); + pointer new_last = new_first; + + SFL_TRY + { + if (n > size()) + { + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_, + new_first + ); + + new_last = sfl::dtl::uninitialized_default_construct_n_a + ( + data_.ref_to_alloc(), + new_last, + n - size() + ); + } + else if (n < size()) + { + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.first_ + n, + new_first + ); + } + } + SFL_CATCH (...) + { + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + new_first, + new_last + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + new_first, + n + ); + + SFL_RETHROW; + } + + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ - data_.first_ + ); + + data_.first_ = new_first; + data_.last_ = new_last; + } + + void resize(size_type n, const T& value) + { + if (n == size()) + { + return; + } + + if (n > max_size()) + { + sfl::dtl::throw_length_error("sfl::compact_vector::resize"); + } + + pointer new_first = sfl::dtl::allocate(data_.ref_to_alloc(), n); + pointer new_last = new_first; + + SFL_TRY + { + if (n > size()) + { + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_, + new_first + ); + + new_last = sfl::dtl::uninitialized_fill_n_a + ( + data_.ref_to_alloc(), + new_last, + n - size(), + value + ); + } + else if (n < size()) + { + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.first_ + n, + new_first + ); + } + } + SFL_CATCH (...) + { + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + new_first, + new_last + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + new_first, + n + ); + + SFL_RETHROW; + } + + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ - data_.first_ + ); + + data_.first_ = new_first; + data_.last_ = new_last; + } + + void swap(compact_vector& other) + { + if (this == &other) + { + return; + } + + using std::swap; + + SFL_ASSERT + ( + allocator_traits::propagate_on_container_swap::value || + this->data_.ref_to_alloc() == other.data_.ref_to_alloc() + ); + + // If this and other allocator compares equal then one allocator + // can deallocate memory allocated by another allocator. + // One allocator can safely destroy_a elements constructed by other + // allocator regardless the two allocators compare equal or not. + + if (allocator_traits::propagate_on_container_swap::value) + { + swap(this->data_.ref_to_alloc(), other.data_.ref_to_alloc()); + } + + swap(this->data_.first_, other.data_.first_); + swap(this->data_.last_, other.data_.last_); + } + +private: + + void initialize_default_n(size_type n) + { + if (n > max_size()) + { + sfl::dtl::throw_length_error + ( + "sfl::compact_vector::initialize_default_n" + ); + } + + data_.first_ = sfl::dtl::allocate(data_.ref_to_alloc(), n); + data_.last_ = data_.first_; + + SFL_TRY + { + data_.last_ = sfl::dtl::uninitialized_default_construct_n_a + ( + data_.ref_to_alloc(), + data_.first_, + n + ); + } + SFL_CATCH (...) + { + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + n + ); + + SFL_RETHROW; + } + } + + void initialize_fill_n(size_type n, const T& value) + { + if (n > max_size()) + { + sfl::dtl::throw_length_error + ( + "sfl::compact_vector::initialize_fill_n" + ); + } + + data_.first_ = sfl::dtl::allocate(data_.ref_to_alloc(), n); + data_.last_ = data_.first_; + + SFL_TRY + { + data_.last_ = sfl::dtl::uninitialized_fill_n_a + ( + data_.ref_to_alloc(), + data_.first_, + n, + value + ); + } + SFL_CATCH (...) + { + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + n + ); + + SFL_RETHROW; + } + } + + template + void initialize_range(InputIt first, InputIt last) + { + initialize_range(first, last, typename std::iterator_traits::iterator_category()); + } + + template + void initialize_range(InputIt first, Sentinel last, std::input_iterator_tag) + { + SFL_TRY + { + while (first != last) + { + emplace_back(*first); + ++first; + } + } + SFL_CATCH (...) + { + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ - data_.first_ + ); + + SFL_RETHROW; + } + } + + template + void initialize_range(ForwardIt first, Sentinel last, std::forward_iterator_tag) + { + const size_type n = std::distance(first, last); + + if (n > max_size()) + { + sfl::dtl::throw_length_error + ( + "sfl::compact_vector::initialize_range" + ); + } + + data_.first_ = sfl::dtl::allocate(data_.ref_to_alloc(), n); + data_.last_ = data_.first_; + + SFL_TRY + { + data_.last_ = sfl::dtl::uninitialized_copy_a + ( + data_.ref_to_alloc(), + first, + last, + data_.first_ + ); + } + SFL_CATCH (...) + { + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + n + ); + + SFL_RETHROW; + } + } + +#if SFL_CPP_VERSION >= SFL_CPP_20 + + template Range> + void initialize_range(Range&& range) + { + if constexpr (std::ranges::forward_range) + { + initialize_range(std::ranges::begin(range), std::ranges::end(range), std::forward_iterator_tag()); + } + else + { + initialize_range(std::ranges::begin(range), std::ranges::end(range), std::input_iterator_tag()); + } + } + +#else // before C++20 + + template + void initialize_range(Range&& range) + { + using std::begin; + using std::end; + initialize_range(begin(range), end(range)); + } + +#endif // before C++20 + + void initialize_copy(const compact_vector& other) + { + const size_type n = other.size(); + + if (n > max_size()) + { + sfl::dtl::throw_length_error + ( + "sfl::compact_vector::initialize_copy" + ); + } + + data_.first_ = sfl::dtl::allocate(data_.ref_to_alloc(), n); + data_.last_ = data_.first_; + + SFL_TRY + { + data_.last_ = sfl::dtl::uninitialized_copy_a + ( + data_.ref_to_alloc(), + other.data_.first_, + other.data_.last_, + data_.first_ + ); + } + SFL_CATCH (...) + { + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + n + ); + + SFL_RETHROW; + } + } + + void initialize_move(compact_vector& other) + { + if (data_.ref_to_alloc() == other.data_.ref_to_alloc()) + { + data_.first_ = other.data_.first_; + data_.last_ = other.data_.last_; + + other.data_.first_ = nullptr; + other.data_.last_ = nullptr; + } + else + { + const size_type n = other.size(); + + if (n > max_size()) + { + sfl::dtl::throw_length_error + ( + "sfl::compact_vector::initialize_move" + ); + } + + data_.first_ = sfl::dtl::allocate(data_.ref_to_alloc(), n); + data_.last_ = data_.first_; + + SFL_TRY + { + data_.last_ = sfl::dtl::uninitialized_move_a + ( + data_.ref_to_alloc(), + other.data_.first_, + other.data_.last_, + data_.first_ + ); + } + SFL_CATCH (...) + { + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + n + ); + + SFL_RETHROW; + } + } + } + + void assign_fill_n(size_type n, const T& value) + { + if (n > max_size()) + { + sfl::dtl::throw_length_error + ( + "sfl::compact_vector::assign_fill_n" + ); + } + + if (n == size()) + { + sfl::dtl::fill + ( + data_.first_, + data_.last_, + value + ); + } + else + { + clear(); + + data_.first_ = sfl::dtl::allocate(data_.ref_to_alloc(), n); + data_.last_ = data_.first_; + + SFL_TRY + { + data_.last_ = sfl::dtl::uninitialized_fill_n_a + ( + data_.ref_to_alloc(), + data_.first_, + n, + value + ); + } + SFL_CATCH (...) + { + clear(); + SFL_RETHROW; + } + } + } + + template + void assign_range(InputIt first, InputIt last) + { + assign_range(first, last, typename std::iterator_traits::iterator_category()); + } + + template + void assign_range(InputIt first, Sentinel last, std::input_iterator_tag) + { + clear(); + + while (first != last) + { + emplace_back(*first); + ++first; + } + } + + template + void assign_range(ForwardIt first, Sentinel last, std::forward_iterator_tag) + { + const size_type n = std::distance(first, last); + + if (n > max_size()) + { + sfl::dtl::throw_length_error + ( + "sfl::compact_vector::assign_fill_n" + ); + } + + if (n == size()) + { + sfl::dtl::copy + ( + first, + last, + data_.first_ + ); + } + else + { + clear(); + + data_.first_ = sfl::dtl::allocate(data_.ref_to_alloc(), n); + data_.last_ = data_.first_; + + SFL_TRY + { + data_.last_ = sfl::dtl::uninitialized_copy_a + ( + data_.ref_to_alloc(), + first, + last, + data_.first_ + ); + } + SFL_CATCH (...) + { + clear(); + SFL_RETHROW; + } + } + } + + void assign_copy(const compact_vector& other) + { + if (this != &other) + { + if (allocator_traits::propagate_on_container_copy_assignment::value) + { + if (data_.ref_to_alloc() != other.data_.ref_to_alloc()) + { + clear(); + } + + data_.ref_to_alloc() = other.data_.ref_to_alloc(); + } + + assign_range + ( + other.data_.first_, + other.data_.last_ + ); + } + } + + void assign_move(compact_vector& other) + { + if (allocator_traits::propagate_on_container_move_assignment::value) + { + if (data_.ref_to_alloc() != other.data_.ref_to_alloc()) + { + clear(); + } + + data_.ref_to_alloc() = std::move(other.data_.ref_to_alloc()); + } + + if (data_.ref_to_alloc() == other.data_.ref_to_alloc()) + { + clear(); + + data_.first_ = other.data_.first_; + data_.last_ = other.data_.last_; + + other.data_.first_ = nullptr; + other.data_.last_ = nullptr; + } + else + { + assign_range + ( + std::make_move_iterator(other.data_.first_), + std::make_move_iterator(other.data_.last_) + ); + } + } + + iterator insert_fill_n(const_iterator pos, size_type n, const T& value) + { + const difference_type offset = std::distance(cbegin(), pos); + + if (n != 0) + { + const size_type new_size = size() + n; + + if (new_size < size() || new_size > max_size()) + { + sfl::dtl::throw_length_error + ( + "sfl::compact_vector::insert_fill_n" + ); + } + + pointer new_first = sfl::dtl::allocate(data_.ref_to_alloc(), new_size); + pointer new_last = new_first; + + SFL_TRY + { + // `value` can be a reference to an element in this + // container. First we will create `n` copies of `value` + // and after that we can move elements. + + sfl::dtl::uninitialized_fill_n_a + ( + data_.ref_to_alloc(), + new_first + offset, + n, + value + ); + + new_last = nullptr; + + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.first_ + offset, + new_first + ); + + new_last += n; + + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_ + offset, + data_.last_, + new_last + ); + } + SFL_CATCH (...) + { + if (new_last == nullptr) + { + sfl::dtl::destroy_n_a + ( + data_.ref_to_alloc(), + new_first + offset, + n + ); + } + else + { + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + new_first, + new_last + ); + } + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + new_first, + new_size + ); + + SFL_RETHROW; + } + + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ - data_.first_ + ); + + data_.first_ = new_first; + data_.last_ = new_last; + } + + return begin() + offset; + } + + template + iterator insert_range(const_iterator pos, InputIt first, InputIt last) + { + return insert_range(pos, first, last, typename std::iterator_traits::iterator_category()); + } + + template + iterator insert_range(const_iterator pos, InputIt first, Sentinel last, std::input_iterator_tag) + { + const difference_type offset = std::distance(cbegin(), pos); + + while (first != last) + { + pos = insert(pos, *first); + ++pos; + ++first; + } + + return begin() + offset; + } + + template + iterator insert_range(const_iterator pos, ForwardIt first, Sentinel last, std::forward_iterator_tag) + { + const difference_type offset = std::distance(cbegin(), pos); + + if (first != last) + { + const size_type new_size = size() + std::distance(first, last); + + if (new_size < size() || new_size > max_size()) + { + sfl::dtl::throw_length_error + ( + "sfl::compact_vector::insert_range" + ); + } + + pointer new_first = sfl::dtl::allocate(data_.ref_to_alloc(), new_size); + pointer new_last = new_first; + + SFL_TRY + { + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.first_ + offset, + new_first + ); + + new_last = sfl::dtl::uninitialized_copy_a + ( + data_.ref_to_alloc(), + first, + last, + new_last + ); + + new_last = sfl::dtl::uninitialized_move_if_noexcept_a + ( + data_.ref_to_alloc(), + data_.first_ + offset, + data_.last_, + new_last + ); + } + SFL_CATCH (...) + { + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + new_first, + new_last + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + new_first, + new_size + ); + + SFL_RETHROW; + } + + sfl::dtl::destroy_a + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ + ); + + sfl::dtl::deallocate + ( + data_.ref_to_alloc(), + data_.first_, + data_.last_ - data_.first_ + ); + + data_.first_ = new_first; + data_.last_ = new_last; + } + + return begin() + offset; + } +}; + +// +// ---- NON-MEMBER FUNCTIONS -------------------------------------------------- +// + +template +SFL_NODISCARD +bool operator== +( + const compact_vector& x, + const compact_vector& y +) +{ + return x.size() == y.size() && std::equal(x.begin(), x.end(), y.begin()); +} + +template +SFL_NODISCARD +bool operator!= +( + const compact_vector& x, + const compact_vector& y +) +{ + return !(x == y); +} + +template +SFL_NODISCARD +bool operator< +( + const compact_vector& x, + const compact_vector& y +) +{ + return std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); +} + +template +SFL_NODISCARD +bool operator> +( + const compact_vector& x, + const compact_vector& y +) +{ + return y < x; +} + +template +SFL_NODISCARD +bool operator<= +( + const compact_vector& x, + const compact_vector& y +) +{ + return !(y < x); +} + +template +SFL_NODISCARD +bool operator>= +( + const compact_vector& x, + const compact_vector& y +) +{ + return !(x < y); +} + +template +void swap +( + compact_vector& x, + compact_vector& y +) +{ + x.swap(y); +} + +template +typename compact_vector::size_type + erase(compact_vector& c, const U& value) +{ + auto it = std::remove(c.begin(), c.end(), value); + auto r = std::distance(it, c.end()); + c.erase(it, c.end()); + return r; +} + +template +typename compact_vector::size_type + erase_if(compact_vector& c, Predicate pred) +{ + auto it = std::remove_if(c.begin(), c.end(), pred); + auto r = std::distance(it, c.end()); + c.erase(it, c.end()); + return r; +} + +} // namespace sfl + +#endif // SFL_COMPACT_VECTOR_HPP_INCLUDED diff --git a/src/thirdparty/sfl/detail/allocator_traits.hpp b/src/thirdparty/sfl/detail/allocator_traits.hpp new file mode 100644 index 0000000000..eecc3e6845 --- /dev/null +++ b/src/thirdparty/sfl/detail/allocator_traits.hpp @@ -0,0 +1,277 @@ +// +// Copyright (c) 2022 Slaven Falandys +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. +// + +#ifndef SFL_DETAIL_ALLOCATOR_TRAITS_HPP_INCLUDED +#define SFL_DETAIL_ALLOCATOR_TRAITS_HPP_INCLUDED + +#include +#include +#include + +#include // numeric_limits +#include // pointer_traits +#include // true_type, false_type +#include // declval + +#ifdef _MSC_VER // Visual C++ +#pragma warning(push) +#pragma warning(disable : 4996) +#endif + +namespace sfl +{ + +namespace dtl +{ + +template +class allocator_traits +{ +private: + + template + struct has_rebind + { + private: + template + static std::true_type test(typename Alloc2::template rebind*); + + template + static std::false_type test(...); + + public: + using type = decltype(test(nullptr)); + }; + + template ::type> + struct rebind_alloc_aux; + + template + struct rebind_alloc_aux + { + using type = typename Alloc::template rebind::other; + }; + + template